]> git.baikalelectronics.ru Git - kernel.git/commit
kbuild: fix infinite make recursion
authorSam Ravnborg <sam@neptun.(none)>
Wed, 26 Sep 2007 17:38:44 +0000 (19:38 +0200)
committerSam Ravnborg <sam@neptun.(none)>
Fri, 12 Oct 2007 19:15:32 +0000 (21:15 +0200)
commit28f8a48725540ffc7697a5560c44419244520720
tree8d73e1d7bd0e4a728f7896b766f6ce596bd8e0b2
parent46b2c1a3831438ba6fed3102682c9d65ca6cdee1
kbuild: fix infinite make recursion

Jan Engelhardt <jengelh@computergmbh.de> 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 <jengelh@computergmbh.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Makefile