Skip to content

Commit

Permalink
kbuild: fix mkmakefile
Browse files Browse the repository at this point in the history
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 <jbeulich@novell.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
  • Loading branch information
Jan Beulich authored and Sam Ravnborg committed Feb 19, 2006
1 parent 6176aa9 commit 9667828
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/mkmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 9667828

Please sign in to comment.