Thread (1 message) 1 message, 1 author, 2016-06-15

Re: Compiling git with makepp patch

From: Andreas Schwab <hidden>
Date: 2016-06-15 22:49:23

Daniel Pfeiffer [off-list ref] writes:
 la 08/24/2010 06:32 AM Jonathan Nieder skribis:
quoted
Hi,

Daniel Pfeiffer wrote:
quoted
The file needs to be built immediately so
that it can be included, before reading the rest of the makefile.
But the dependency is only known to be phony after running the rule.
Here you have a hen-egg problem, where I have no clue how Gnu make
can cope (this is the one case where it requires .PHONY).
GNU make, unlike, say, pmake, reads all the rules before it runs
anything iirc.  So you can have

  -include foo

  foo:
	echo bar:>foo
	echo '	echo hi'>>foo

and it will cope okay.
While that is not the usual use-case for -include, the file might very
well define some macros, and the rest of the makefile, indeed the foo-rule
itself might depend on those macros.
GNU make will restart reading all makefiles when any of them was remade.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help