kbuild: change kbuild to not rely on incorrect GNU make behavior
[deliverable/linux.git] / scripts / Makefile.modpost
index 563e3c5bd8ddd43951c17ddaee80293e15cf4a92..0cfbe1cf24336e91fc8671e3aee6017e03194b51 100644 (file)
@@ -32,7 +32,7 @@
 # Step 4 is solely used to allow module versioning in external modules,
 # where the CRC of each module is retrieved from the Module.symers file.
 
-.PHONY: _modpost
+PHONY := _modpost
 _modpost: __modpost
 
 include .config
@@ -60,7 +60,7 @@ quiet_cmd_modpost = MODPOST
        $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \
        $(filter-out FORCE,$^)
 
-.PHONY: __modpost
+PHONY += __modpost
 __modpost: $(wildcard vmlinux) $(modules:.ko=.o) FORCE
        $(call cmd,modpost)
 
@@ -97,7 +97,7 @@ targets += $(modules)
 # Add FORCE to the prequisites of a target to force it to be always rebuilt.
 # ---------------------------------------------------------------------------
 
-.PHONY: FORCE
+PHONY += FORCE
 
 FORCE:
 
@@ -112,3 +112,9 @@ cmd_files := $(wildcard $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd))
 ifneq ($(cmd_files),)
   include $(cmd_files)
 endif
+
+
+# Declare the contents of the .PHONY variable as phony.  We keep that
+# information in a variable se we can use it in if_changed and friends.
+
+.PHONY: $(PHONY)
This page took 0.025173 seconds and 5 git commands to generate.