[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
match-anything rule takes precedence over earlier rule
From: |
gk |
Subject: |
match-anything rule takes precedence over earlier rule |
Date: |
Wed, 15 Jan 2003 00:02:59 -0800 |
I do not understand why the following makefile will not build the second
target.
I thought the explicit rule should take precedence over a match-anything
rule, especially since it appears earier in the makefile. Thanks for any clues.
# makefile
# .PHONY directive makes no difference regarding this problem
.PHONY: error project
error :
@echo 'rule: $@'
@echo type "'make project'"
@exit 1
# this target cannot be made:
project :
@echo 'rule: $@'
# if this final rule is removed, it works fine
% : error
@echo this will never print
#eof
address@hidden junk]$ make project
rule: error
type 'make project'
make: *** [error] Error 1
- Greg Keraunen
- match-anything rule takes precedence over earlier rule,
gk <=