Skip to content

Commit

Permalink
kbuild: fix building with O=.. options
Browse files Browse the repository at this point in the history
The check introduced in commit:
4f1127e "kbuild: fix
infinite make recursion"

caused certain external modules not to build and
also caused 'make targz-pkg' to fail.
This is a minimal fix so we revert to previous
behaviour - but we do not overwrite the Makefile
in the top-level directory.

Signed-off-by: Sam Ravnborg <[email protected]>
Tested-by: Jay Cliburn <[email protected]>
Cc: Jay Cliburn <[email protected]>
  • Loading branch information
Sam Ravnborg committed Dec 9, 2007
1 parent 1cacc9a commit 18c32da
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 0 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,6 @@ saved-output := $(KBUILD_OUTPUT)
KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd)
$(if $(KBUILD_OUTPUT),, \
$(error output directory "$(saved-output)" does not exist))
# Check that OUTPUT directory is not the same as where we have kernel src
$(if $(filter-out $(KBUILD_OUTPUT),$(shell /bin/pwd)),, \
$(error Output directory (O=...) specifies kernel src dir))

PHONY += $(MAKECMDGOALS) sub-make

Expand Down
6 changes: 6 additions & 0 deletions scripts/mkmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@


test ! -r $2/Makefile -o -O $2/Makefile || exit 0
# Only overwrite automatically generated Makefiles
# (so we do not overwrite kernel Makefile)
if ! grep -q Automatically $2/Makefile
then
exit 0
fi
echo " GEN $2/Makefile"

cat << EOF > $2/Makefile
Expand Down

0 comments on commit 18c32da

Please sign in to comment.