Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4f1127e204377cbd2a56d112d323466f668e8334 Commit: 4f1127e204377cbd2a56d112d323466f668e8334 Parent: a67cb1319f53fa68012a23d6ca45279c6bc627f8 Author: Sam Ravnborg <[EMAIL PROTECTED](none)> AuthorDate: Wed Sep 26 19:38:44 2007 +0200 Committer: Sam Ravnborg <[EMAIL PROTECTED](none)> CommitDate: Fri Oct 12 21:15:32 2007 +0200
kbuild: fix infinite make recursion Jan Engelhardt <[EMAIL PROTECTED]> reported: You can cause a recursion in kbuild/make with the following: make O=$PWD kernel/time.o make mrproper Of course no one would use O=$PWD (that's just the testcase), but this happened too often: /ws/linux/linux-2.6.23$ make O=/ws/linux/linux-2.6.23 kernel/time.o (Oops - should have been O=/ws/linux/obj-2.6.23!) Fixed by an explicit test for this case - we error out if output directory and source directory are the same. Tested-by: Jan Engelhardt <[EMAIL PROTECTED]> Signed-off-by: Sam Ravnborg <[EMAIL PROTECTED]> --- Makefile | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index 2738966..1b0d84d 100644 --- a/Makefile +++ b/Makefile @@ -115,7 +115,9 @@ 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) $(filter-out _all,$(MAKECMDGOALS)) _all: - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html