From: Jan Beulich Date: Mon, 30 Jan 2006 09:05:09 +0000 (+0100) Subject: kbuild: fix mkmakefile X-Git-Tag: v2.6.17-rc1~733^2~33 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=96678281bfaa5f04752a98f9b93454041169fd3b;p=linux.git kbuild: fix mkmakefile With the current way of generating the Makefile in the output directory for builds outside of the source tree, specifying real targets (rather than phony ones) doesn't work in an already (partially) built tree, as the stub Makefile doesn't have any dependency information available. Thus, all targets where files may actually exist must be listed explicitly and, due to what I'd call a make misbehavior, directory targets must then also be special cased. Signed-Off-By: Jan Beulich Signed-off-by: Sam Ravnborg --- diff --git a/scripts/mkmakefile b/scripts/mkmakefile index c4d621b30d0d..a22cbedd3b3e 100644 --- a/scripts/mkmakefile +++ b/scripts/mkmakefile @@ -21,11 +21,13 @@ KERNELOUTPUT := $2 MAKEFLAGS += --no-print-directory +.PHONY: all \$(MAKECMDGOALS) + all: \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) -%:: - \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) \$@ +Makefile:; +\$(filter-out all Makefile,\$(MAKECMDGOALS)) %/: + \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) \$@ EOF -