[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Rules with no targets ignored too well?
From: |
Henning Makholm |
Subject: |
Rules with no targets ignored too well? |
Date: |
Fri, 13 Dec 2002 00:17:27 +0100 |
User-agent: |
Mutt/1.4i |
Is the following a bug?
pc-043:~/tmp/foo$ cat Makefile
declare = $(eval all:: ; : $1)
$(call declare, A)
foo: $(call declare, B) ; $(call declare, C)
: $(call declare, D) ; $(call declare, E)
pc-043:~/tmp/foo$ gmake
: A
: B
pc-043:~/tmp/foo$
Intuitively I'd expect make to run ": D" too.
It's not as it life and death depends on this, anyway - I only
discovered this effect while looking trying to understand the
source. It is caused by rules without targets being ignored at the
"case w_dcolon:" switch label in eval() in read.c - without expanding
the dependency list. Back when expansion wasn't supposed to have side
effects this must have been a sound optimization.
--
Henning Makholm "De kan rejse hid og did i verden nok så flot
Og er helt fortrolig med alverdens militær"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Rules with no targets ignored too well?,
Henning Makholm <=