Commit 18c32dac authored by Sam Ravnborg's avatar Sam Ravnborg

kbuild: fix building with O=.. options

The check introduced in commit:
4f1127e2 "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: default avatarSam Ravnborg <sam@ravnborg.org>
Tested-by: default avatarJay Cliburn <jacliburn@bellsouth.net>
Cc: Jay Cliburn <jacliburn@bellsouth.net>
parent 1cacc9ab
...@@ -118,9 +118,6 @@ saved-output := $(KBUILD_OUTPUT) ...@@ -118,9 +118,6 @@ saved-output := $(KBUILD_OUTPUT)
KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd) KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd)
$(if $(KBUILD_OUTPUT),, \ $(if $(KBUILD_OUTPUT),, \
$(error output directory "$(saved-output)" does not exist)) $(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 PHONY += $(MAKECMDGOALS) sub-make
......
...@@ -11,6 +11,12 @@ ...@@ -11,6 +11,12 @@
test ! -r $2/Makefile -o -O $2/Makefile || exit 0 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" echo " GEN $2/Makefile"
cat << EOF > $2/Makefile cat << EOF > $2/Makefile
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment