]> git.hungrycats.org Git - linux/commitdiff
kbuild: Normal sources should not include <linux/compile.h>
authorKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Tue, 28 May 2002 08:38:55 +0000 (03:38 -0500)
committerKai Germaschewski <kai@tp1.ruhr-uni-bochum.de>
Tue, 28 May 2002 08:38:55 +0000 (03:38 -0500)
include/linux/compile.h is a generated file, only init/Makefile knows
about it - including it outside of init/* will cause trouble on
parallel builds.

Also, when compile.h already exists when 'make dep' is run, that'll pick
up a dependency on $(TOPDIR)/include/linux/compile.h. So init/Makefile
needs to tell make that this is actually the same file as
../include/linux.compile.h

init/Makefile
kernel/suspend.c

index f5b2fe86ea691a48c8f73d57daedbba18098de56..5fc90741e578f672c98dd766fbc70c6cd233fed3 100644 (file)
@@ -12,6 +12,10 @@ include $(TOPDIR)/Rules.make
 
 version.o: ../include/linux/compile.h
 
+# 'make dep' may add a dependency on $(TOPDIR)/include/linux/compile.h
+
+$(TOPDIR)/include/linux/compile.h: ../include/linux/compile.h ;
+
 # compile.h changes depending on hostname, generation number, etc,
 # so we regenerate it always.
 # mkcompile_h will make sure to only update the
index c5b0e6daccc88adc78de1ddc48c370d1dc780161..ad527e5addd85da3385b60d2939b1de4bd7ad628 100644 (file)
@@ -49,7 +49,6 @@
 #include <linux/file.h>
 #include <linux/utsname.h>
 #include <linux/version.h>
-#include <linux/compile.h>
 #include <linux/delay.h>
 #include <linux/reboot.h>
 #include <linux/init.h>