[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
unexpected behaviour with match anything rule
From: |
Warlich, Christof |
Subject: |
unexpected behaviour with match anything rule |
Date: |
Wed, 14 Nov 2012 09:22:22 +0100 |
Hi,
please consider the following Makefile:
t1: ; @echo specific rule for target $@
ifeq (,$(UNEXPECTED))
%: ; @echo expected anything rule for target $@
else
%: all ;
all: ; @echo unextected anything rule for target $@
endif
I very much like its behaviour in the ifeq clause, as only the most specific
rule is executed:
$ make t1
specific rule for target t1
$ make t2
expected anything rule for target t2
But its behaviour in the else clause seems to be rather unexpected to me:
$ make UNEXPECTED=true t1
unextected anything rule for target all
specific rule for target t1
$ make UNEXPECTED=true t2
unextected anything rule for target all
make: `t2' is up to date.
Can anyone help? I'd like to see the same output in both cases, if possible. Or
is the
current behaviour intended?
Cheers,
Chris
- unexpected behaviour with match anything rule,
Warlich, Christof <=