diff options
-rw-r--r-- | Documentation/DocBook/Makefile | 8 | ||||
-rw-r--r-- | Makefile | 64 | ||||
-rw-r--r-- | arch/arm/Makefile | 5 | ||||
-rw-r--r-- | arch/arm/boot/Makefile | 5 | ||||
-rw-r--r-- | arch/arm/boot/bootp/Makefile | 5 | ||||
-rw-r--r-- | arch/arm26/Makefile | 7 | ||||
-rw-r--r-- | arch/arm26/boot/Makefile | 5 | ||||
-rw-r--r-- | arch/i386/Makefile | 4 | ||||
-rw-r--r-- | arch/ia64/Makefile | 5 | ||||
-rw-r--r-- | arch/m32r/Makefile | 5 | ||||
-rw-r--r-- | arch/powerpc/Makefile | 2 | ||||
-rw-r--r-- | arch/ppc/Makefile | 2 | ||||
-rw-r--r-- | arch/ppc/boot/Makefile | 5 | ||||
-rw-r--r-- | arch/ppc/boot/openfirmware/Makefile | 7 | ||||
-rw-r--r-- | arch/sh/Makefile | 2 | ||||
-rw-r--r-- | arch/um/Makefile | 7 | ||||
-rw-r--r-- | arch/x86_64/Makefile | 4 | ||||
-rw-r--r-- | scripts/Kbuild.include | 13 | ||||
-rw-r--r-- | scripts/Makefile.build | 12 | ||||
-rw-r--r-- | scripts/Makefile.clean | 10 | ||||
-rw-r--r-- | scripts/Makefile.modinst | 10 | ||||
-rw-r--r-- | scripts/Makefile.modpost | 12 | ||||
-rw-r--r-- | scripts/kconfig/Makefile | 4 | ||||
-rw-r--r-- | scripts/kconfig/lxdialog/Makefile | 6 | ||||
-rw-r--r-- | scripts/package/Makefile | 10 |
25 files changed, 144 insertions, 75 deletions
diff --git a/Documentation/DocBook/Makefile b/Documentation/DocBook/Makefile index 1c955883cf58..2c6f66dea650 100644 --- a/Documentation/DocBook/Makefile +++ b/Documentation/DocBook/Makefile | |||
@@ -28,7 +28,7 @@ PS_METHOD = $(prefer-db2x) | |||
28 | 28 | ||
29 | ### | 29 | ### |
30 | # The targets that may be used. | 30 | # The targets that may be used. |
31 | .PHONY: xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs | 31 | PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs |
32 | 32 | ||
33 | BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) | 33 | BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) |
34 | xmldocs: $(BOOKS) | 34 | xmldocs: $(BOOKS) |
@@ -211,3 +211,9 @@ clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) | |||
211 | 211 | ||
212 | #man put files in man subdir - traverse down | 212 | #man put files in man subdir - traverse down |
213 | subdir- := man/ | 213 | subdir- := man/ |
214 | |||
215 | |||
216 | # Declare the contents of the .PHONY variable as phony. We keep that | ||
217 | # information in a variable se we can use it in if_changed and friends. | ||
218 | |||
219 | .PHONY: $(PHONY) | ||
@@ -95,7 +95,7 @@ ifdef O | |||
95 | endif | 95 | endif |
96 | 96 | ||
97 | # That's our default target when none is given on the command line | 97 | # That's our default target when none is given on the command line |
98 | .PHONY: _all | 98 | PHONY := _all |
99 | _all: | 99 | _all: |
100 | 100 | ||
101 | ifneq ($(KBUILD_OUTPUT),) | 101 | ifneq ($(KBUILD_OUTPUT),) |
@@ -106,7 +106,7 @@ KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd) | |||
106 | $(if $(KBUILD_OUTPUT),, \ | 106 | $(if $(KBUILD_OUTPUT),, \ |
107 | $(error output directory "$(saved-output)" does not exist)) | 107 | $(error output directory "$(saved-output)" does not exist)) |
108 | 108 | ||
109 | .PHONY: $(MAKECMDGOALS) | 109 | PHONY += $(MAKECMDGOALS) |
110 | 110 | ||
111 | $(filter-out _all,$(MAKECMDGOALS)) _all: | 111 | $(filter-out _all,$(MAKECMDGOALS)) _all: |
112 | $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \ | 112 | $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \ |
@@ -123,7 +123,7 @@ ifeq ($(skip-makefile),) | |||
123 | 123 | ||
124 | # If building an external module we do not care about the all: rule | 124 | # If building an external module we do not care about the all: rule |
125 | # but instead _all depend on modules | 125 | # but instead _all depend on modules |
126 | .PHONY: all | 126 | PHONY += all |
127 | ifeq ($(KBUILD_EXTMOD),) | 127 | ifeq ($(KBUILD_EXTMOD),) |
128 | _all: all | 128 | _all: all |
129 | else | 129 | else |
@@ -337,14 +337,14 @@ export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exc | |||
337 | # Rules shared between *config targets and build targets | 337 | # Rules shared between *config targets and build targets |
338 | 338 | ||
339 | # Basic helpers built in scripts/ | 339 | # Basic helpers built in scripts/ |
340 | .PHONY: scripts_basic | 340 | PHONY += scripts_basic |
341 | scripts_basic: | 341 | scripts_basic: |
342 | $(Q)$(MAKE) $(build)=scripts/basic | 342 | $(Q)$(MAKE) $(build)=scripts/basic |
343 | 343 | ||
344 | # To avoid any implicit rule to kick in, define an empty command. | 344 | # To avoid any implicit rule to kick in, define an empty command. |
345 | scripts/basic/%: scripts_basic ; | 345 | scripts/basic/%: scripts_basic ; |
346 | 346 | ||
347 | .PHONY: outputmakefile | 347 | PHONY += outputmakefile |
348 | # outputmakefile generate a Makefile to be placed in output directory, if | 348 | # outputmakefile generate a Makefile to be placed in output directory, if |
349 | # using a seperate output directory. This allows convinient use | 349 | # using a seperate output directory. This allows convinient use |
350 | # of make in output directory | 350 | # of make in output directory |
@@ -420,7 +420,7 @@ ifeq ($(KBUILD_EXTMOD),) | |||
420 | # Additional helpers built in scripts/ | 420 | # Additional helpers built in scripts/ |
421 | # Carefully list dependencies so we do not try to build scripts twice | 421 | # Carefully list dependencies so we do not try to build scripts twice |
422 | # in parrallel | 422 | # in parrallel |
423 | .PHONY: scripts | 423 | PHONY += scripts |
424 | scripts: scripts_basic include/config/MARKER | 424 | scripts: scripts_basic include/config/MARKER |
425 | $(Q)$(MAKE) $(build)=$(@) | 425 | $(Q)$(MAKE) $(build)=$(@) |
426 | 426 | ||
@@ -720,7 +720,7 @@ $(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ; | |||
720 | # make menuconfig etc. | 720 | # make menuconfig etc. |
721 | # Error messages still appears in the original language | 721 | # Error messages still appears in the original language |
722 | 722 | ||
723 | .PHONY: $(vmlinux-dirs) | 723 | PHONY += $(vmlinux-dirs) |
724 | $(vmlinux-dirs): prepare scripts | 724 | $(vmlinux-dirs): prepare scripts |
725 | $(Q)$(MAKE) $(build)=$@ | 725 | $(Q)$(MAKE) $(build)=$@ |
726 | 726 | ||
@@ -773,10 +773,10 @@ kernelrelease = $(KERNELVERSION)$(localver-full) | |||
773 | # version.h and scripts_basic is processed / created. | 773 | # version.h and scripts_basic is processed / created. |
774 | 774 | ||
775 | # Listed in dependency order | 775 | # Listed in dependency order |
776 | .PHONY: prepare archprepare prepare0 prepare1 prepare2 prepare3 | 776 | PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3 |
777 | 777 | ||
778 | # prepare-all is deprecated, use prepare as valid replacement | 778 | # prepare-all is deprecated, use prepare as valid replacement |
779 | .PHONY: prepare-all | 779 | PHONY += prepare-all |
780 | 780 | ||
781 | # prepare3 is used to check if we are building in a separate output directory, | 781 | # prepare3 is used to check if we are building in a separate output directory, |
782 | # and if so do: | 782 | # and if so do: |
@@ -857,7 +857,7 @@ include/linux/version.h: $(srctree)/Makefile .config .kernelrelease FORCE | |||
857 | 857 | ||
858 | # --------------------------------------------------------------------------- | 858 | # --------------------------------------------------------------------------- |
859 | 859 | ||
860 | .PHONY: depend dep | 860 | PHONY += depend dep |
861 | depend dep: | 861 | depend dep: |
862 | @echo '*** Warning: make $@ is unnecessary now.' | 862 | @echo '*** Warning: make $@ is unnecessary now.' |
863 | 863 | ||
@@ -872,21 +872,21 @@ all: modules | |||
872 | 872 | ||
873 | # Build modules | 873 | # Build modules |
874 | 874 | ||
875 | .PHONY: modules | 875 | PHONY += modules |
876 | modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) | 876 | modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) |
877 | @echo ' Building modules, stage 2.'; | 877 | @echo ' Building modules, stage 2.'; |
878 | $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost | 878 | $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost |
879 | 879 | ||
880 | 880 | ||
881 | # Target to prepare building external modules | 881 | # Target to prepare building external modules |
882 | .PHONY: modules_prepare | 882 | PHONY += modules_prepare |
883 | modules_prepare: prepare scripts | 883 | modules_prepare: prepare scripts |
884 | 884 | ||
885 | # Target to install modules | 885 | # Target to install modules |
886 | .PHONY: modules_install | 886 | PHONY += modules_install |
887 | modules_install: _modinst_ _modinst_post | 887 | modules_install: _modinst_ _modinst_post |
888 | 888 | ||
889 | .PHONY: _modinst_ | 889 | PHONY += _modinst_ |
890 | _modinst_: | 890 | _modinst_: |
891 | @if [ -z "`$(DEPMOD) -V 2>/dev/null | grep module-init-tools`" ]; then \ | 891 | @if [ -z "`$(DEPMOD) -V 2>/dev/null | grep module-init-tools`" ]; then \ |
892 | echo "Warning: you may need to install module-init-tools"; \ | 892 | echo "Warning: you may need to install module-init-tools"; \ |
@@ -913,7 +913,7 @@ depmod_opts := | |||
913 | else | 913 | else |
914 | depmod_opts := -b $(INSTALL_MOD_PATH) -r | 914 | depmod_opts := -b $(INSTALL_MOD_PATH) -r |
915 | endif | 915 | endif |
916 | .PHONY: _modinst_post | 916 | PHONY += _modinst_post |
917 | _modinst_post: _modinst_ | 917 | _modinst_post: _modinst_ |
918 | if [ -r System.map -a -x $(DEPMOD) ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi | 918 | if [ -r System.map -a -x $(DEPMOD) ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi |
919 | 919 | ||
@@ -956,7 +956,7 @@ clean: rm-dirs := $(CLEAN_DIRS) | |||
956 | clean: rm-files := $(CLEAN_FILES) | 956 | clean: rm-files := $(CLEAN_FILES) |
957 | clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs)) | 957 | clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs)) |
958 | 958 | ||
959 | .PHONY: $(clean-dirs) clean archclean | 959 | PHONY += $(clean-dirs) clean archclean |
960 | $(clean-dirs): | 960 | $(clean-dirs): |
961 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) | 961 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) |
962 | 962 | ||
@@ -974,7 +974,7 @@ mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS)) | |||
974 | mrproper: rm-files := $(wildcard $(MRPROPER_FILES)) | 974 | mrproper: rm-files := $(wildcard $(MRPROPER_FILES)) |
975 | mrproper-dirs := $(addprefix _mrproper_,Documentation/DocBook scripts) | 975 | mrproper-dirs := $(addprefix _mrproper_,Documentation/DocBook scripts) |
976 | 976 | ||
977 | .PHONY: $(mrproper-dirs) mrproper archmrproper | 977 | PHONY += $(mrproper-dirs) mrproper archmrproper |
978 | $(mrproper-dirs): | 978 | $(mrproper-dirs): |
979 | $(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@) | 979 | $(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@) |
980 | 980 | ||
@@ -984,7 +984,7 @@ mrproper: clean archmrproper $(mrproper-dirs) | |||
984 | 984 | ||
985 | # distclean | 985 | # distclean |
986 | # | 986 | # |
987 | .PHONY: distclean | 987 | PHONY += distclean |
988 | 988 | ||
989 | distclean: mrproper | 989 | distclean: mrproper |
990 | @find $(srctree) $(RCS_FIND_IGNORE) \ | 990 | @find $(srctree) $(RCS_FIND_IGNORE) \ |
@@ -1000,7 +1000,7 @@ distclean: mrproper | |||
1000 | # rpm target kept for backward compatibility | 1000 | # rpm target kept for backward compatibility |
1001 | package-dir := $(srctree)/scripts/package | 1001 | package-dir := $(srctree)/scripts/package |
1002 | 1002 | ||
1003 | .PHONY: %-pkg rpm | 1003 | PHONY += %-pkg rpm |
1004 | 1004 | ||
1005 | %pkg: FORCE | 1005 | %pkg: FORCE |
1006 | $(Q)$(MAKE) -f $(package-dir)/Makefile $@ | 1006 | $(Q)$(MAKE) -f $(package-dir)/Makefile $@ |
@@ -1092,12 +1092,12 @@ else # KBUILD_EXTMOD | |||
1092 | 1092 | ||
1093 | # We are always building modules | 1093 | # We are always building modules |
1094 | KBUILD_MODULES := 1 | 1094 | KBUILD_MODULES := 1 |
1095 | .PHONY: crmodverdir | 1095 | PHONY += crmodverdir |
1096 | crmodverdir: | 1096 | crmodverdir: |
1097 | $(Q)rm -rf $(MODVERDIR) | 1097 | $(Q)rm -rf $(MODVERDIR) |
1098 | $(Q)mkdir -p $(MODVERDIR) | 1098 | $(Q)mkdir -p $(MODVERDIR) |
1099 | 1099 | ||
1100 | .PHONY: $(objtree)/Module.symvers | 1100 | PHONY += $(objtree)/Module.symvers |
1101 | $(objtree)/Module.symvers: | 1101 | $(objtree)/Module.symvers: |
1102 | @test -e $(objtree)/Module.symvers || ( \ | 1102 | @test -e $(objtree)/Module.symvers || ( \ |
1103 | echo; \ | 1103 | echo; \ |
@@ -1106,7 +1106,7 @@ $(objtree)/Module.symvers: | |||
1106 | echo ) | 1106 | echo ) |
1107 | 1107 | ||
1108 | module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD)) | 1108 | module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD)) |
1109 | .PHONY: $(module-dirs) modules | 1109 | PHONY += $(module-dirs) modules |
1110 | $(module-dirs): crmodverdir $(objtree)/Module.symvers | 1110 | $(module-dirs): crmodverdir $(objtree)/Module.symvers |
1111 | $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@) | 1111 | $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@) |
1112 | 1112 | ||
@@ -1114,11 +1114,11 @@ modules: $(module-dirs) | |||
1114 | @echo ' Building modules, stage 2.'; | 1114 | @echo ' Building modules, stage 2.'; |
1115 | $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost | 1115 | $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost |
1116 | 1116 | ||
1117 | .PHONY: modules_install | 1117 | PHONY += modules_install |
1118 | modules_install: _emodinst_ _emodinst_post | 1118 | modules_install: _emodinst_ _emodinst_post |
1119 | 1119 | ||
1120 | install-dir := $(if $(INSTALL_MOD_DIR),$(INSTALL_MOD_DIR),extra) | 1120 | install-dir := $(if $(INSTALL_MOD_DIR),$(INSTALL_MOD_DIR),extra) |
1121 | .PHONY: _emodinst_ | 1121 | PHONY += _emodinst_ |
1122 | _emodinst_: | 1122 | _emodinst_: |
1123 | $(Q)rm -rf $(MODLIB)/$(install-dir) | 1123 | $(Q)rm -rf $(MODLIB)/$(install-dir) |
1124 | $(Q)mkdir -p $(MODLIB)/$(install-dir) | 1124 | $(Q)mkdir -p $(MODLIB)/$(install-dir) |
@@ -1133,13 +1133,13 @@ quiet_cmd_depmod = DEPMOD $(KERNELRELEASE) | |||
1133 | $(KERNELRELEASE); \ | 1133 | $(KERNELRELEASE); \ |
1134 | fi | 1134 | fi |
1135 | 1135 | ||
1136 | .PHONY: _emodinst_post | 1136 | PHONY += _emodinst_post |
1137 | _emodinst_post: _emodinst_ | 1137 | _emodinst_post: _emodinst_ |
1138 | $(call cmd,depmod) | 1138 | $(call cmd,depmod) |
1139 | 1139 | ||
1140 | clean-dirs := $(addprefix _clean_,$(KBUILD_EXTMOD)) | 1140 | clean-dirs := $(addprefix _clean_,$(KBUILD_EXTMOD)) |
1141 | 1141 | ||
1142 | .PHONY: $(clean-dirs) clean | 1142 | PHONY += $(clean-dirs) clean |
1143 | $(clean-dirs): | 1143 | $(clean-dirs): |
1144 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) | 1144 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) |
1145 | 1145 | ||
@@ -1161,7 +1161,7 @@ help: | |||
1161 | @echo '' | 1161 | @echo '' |
1162 | 1162 | ||
1163 | # Dummies... | 1163 | # Dummies... |
1164 | .PHONY: prepare scripts | 1164 | PHONY += prepare scripts |
1165 | prepare: ; | 1165 | prepare: ; |
1166 | scripts: ; | 1166 | scripts: ; |
1167 | endif # KBUILD_EXTMOD | 1167 | endif # KBUILD_EXTMOD |
@@ -1274,7 +1274,7 @@ namespacecheck: | |||
1274 | endif #ifeq ($(config-targets),1) | 1274 | endif #ifeq ($(config-targets),1) |
1275 | endif #ifeq ($(mixed-targets),1) | 1275 | endif #ifeq ($(mixed-targets),1) |
1276 | 1276 | ||
1277 | .PHONY: checkstack | 1277 | PHONY += checkstack |
1278 | checkstack: | 1278 | checkstack: |
1279 | $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \ | 1279 | $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \ |
1280 | $(PERL) $(src)/scripts/checkstack.pl $(ARCH) | 1280 | $(PERL) $(src)/scripts/checkstack.pl $(ARCH) |
@@ -1357,4 +1357,10 @@ clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean obj | |||
1357 | 1357 | ||
1358 | endif # skip-makefile | 1358 | endif # skip-makefile |
1359 | 1359 | ||
1360 | PHONY += FORCE | ||
1360 | FORCE: | 1361 | FORCE: |
1362 | |||
1363 | |||
1364 | # Declare the contents of the .PHONY variable as phony. We keep that | ||
1365 | # information in a variable se we can use it in if_changed and friends. | ||
1366 | .PHONY: $(PHONY) | ||
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index fbfc14a56b96..585d334234f4 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -1,6 +1,9 @@ | |||
1 | # | 1 | # |
2 | # arch/arm/Makefile | 2 | # arch/arm/Makefile |
3 | # | 3 | # |
4 | # This file is included by the global makefile so that you can add your own | ||
5 | # architecture-specific flags and dependencies. | ||
6 | # | ||
4 | # This file is subject to the terms and conditions of the GNU General Public | 7 | # This file is subject to the terms and conditions of the GNU General Public |
5 | # License. See the file "COPYING" in the main directory of this archive | 8 | # License. See the file "COPYING" in the main directory of this archive |
6 | # for more details. | 9 | # for more details. |
@@ -176,7 +179,7 @@ endif | |||
176 | 179 | ||
177 | archprepare: maketools | 180 | archprepare: maketools |
178 | 181 | ||
179 | .PHONY: maketools FORCE | 182 | PHONY += maketools FORCE |
180 | maketools: include/linux/version.h include/asm-arm/.arch FORCE | 183 | maketools: include/linux/version.h include/asm-arm/.arch FORCE |
181 | $(Q)$(MAKE) $(build)=arch/arm/tools include/asm-arm/mach-types.h | 184 | $(Q)$(MAKE) $(build)=arch/arm/tools include/asm-arm/mach-types.h |
182 | 185 | ||
diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile index a174d63395ea..ec9c400c7f82 100644 --- a/arch/arm/boot/Makefile +++ b/arch/arm/boot/Makefile | |||
@@ -1,6 +1,9 @@ | |||
1 | # | 1 | # |
2 | # arch/arm/boot/Makefile | 2 | # arch/arm/boot/Makefile |
3 | # | 3 | # |
4 | # This file is included by the global makefile so that you can add your own | ||
5 | # architecture-specific flags and dependencies. | ||
6 | # | ||
4 | # This file is subject to the terms and conditions of the GNU General Public | 7 | # This file is subject to the terms and conditions of the GNU General Public |
5 | # License. See the file "COPYING" in the main directory of this archive | 8 | # License. See the file "COPYING" in the main directory of this archive |
6 | # for more details. | 9 | # for more details. |
@@ -73,7 +76,7 @@ $(obj)/bootpImage: $(obj)/bootp/bootp FORCE | |||
73 | $(call if_changed,objcopy) | 76 | $(call if_changed,objcopy) |
74 | @echo ' Kernel: $@ is ready' | 77 | @echo ' Kernel: $@ is ready' |
75 | 78 | ||
76 | .PHONY: initrd FORCE | 79 | PHONY += initrd FORCE |
77 | initrd: | 80 | initrd: |
78 | @test "$(INITRD_PHYS)" != "" || \ | 81 | @test "$(INITRD_PHYS)" != "" || \ |
79 | (echo This machine does not support INITRD; exit -1) | 82 | (echo This machine does not support INITRD; exit -1) |
diff --git a/arch/arm/boot/bootp/Makefile b/arch/arm/boot/bootp/Makefile index 8e8879b6b3d7..c394e305447c 100644 --- a/arch/arm/boot/bootp/Makefile +++ b/arch/arm/boot/bootp/Makefile | |||
@@ -1,6 +1,9 @@ | |||
1 | # | 1 | # |
2 | # linux/arch/arm/boot/bootp/Makefile | 2 | # linux/arch/arm/boot/bootp/Makefile |
3 | # | 3 | # |
4 | # This file is included by the global makefile so that you can add your own | ||
5 | # architecture-specific flags and dependencies. | ||
6 | # | ||
4 | 7 | ||
5 | LDFLAGS_bootp :=-p --no-undefined -X \ | 8 | LDFLAGS_bootp :=-p --no-undefined -X \ |
6 | --defsym initrd_phys=$(INITRD_PHYS) \ | 9 | --defsym initrd_phys=$(INITRD_PHYS) \ |
@@ -21,4 +24,4 @@ $(obj)/kernel.o: arch/arm/boot/zImage FORCE | |||
21 | 24 | ||
22 | $(obj)/initrd.o: $(INITRD) FORCE | 25 | $(obj)/initrd.o: $(INITRD) FORCE |
23 | 26 | ||
24 | .PHONY: $(INITRD) FORCE | 27 | PHONY += $(INITRD) FORCE |
diff --git a/arch/arm26/Makefile b/arch/arm26/Makefile index 844a9e46886e..fe91eda98a94 100644 --- a/arch/arm26/Makefile +++ b/arch/arm26/Makefile | |||
@@ -1,6 +1,9 @@ | |||
1 | # | 1 | # |
2 | # arch/arm26/Makefile | 2 | # arch/arm26/Makefile |
3 | # | 3 | # |
4 | # This file is included by the global makefile so that you can add your own | ||
5 | # architecture-specific flags and dependencies. | ||
6 | # | ||
4 | # This file is subject to the terms and conditions of the GNU General Public | 7 | # This file is subject to the terms and conditions of the GNU General Public |
5 | # License. See the file "COPYING" in the main directory of this archive | 8 | # License. See the file "COPYING" in the main directory of this archive |
6 | # for more details. | 9 | # for more details. |
@@ -49,9 +52,9 @@ all: zImage | |||
49 | 52 | ||
50 | boot := arch/arm26/boot | 53 | boot := arch/arm26/boot |
51 | 54 | ||
52 | .PHONY: maketools FORCE | 55 | PHONY += maketools FORCE |
53 | maketools: FORCE | 56 | maketools: FORCE |
54 | 57 | ||
55 | 58 | ||
56 | # Convert bzImage to zImage | 59 | # Convert bzImage to zImage |
57 | bzImage: vmlinux | 60 | bzImage: vmlinux |
diff --git a/arch/arm26/boot/Makefile b/arch/arm26/boot/Makefile index b5c2277654d4..68acb7b0d47f 100644 --- a/arch/arm26/boot/Makefile +++ b/arch/arm26/boot/Makefile | |||
@@ -1,6 +1,9 @@ | |||
1 | # | 1 | # |
2 | # arch/arm26/boot/Makefile | 2 | # arch/arm26/boot/Makefile |
3 | # | 3 | # |
4 | # This file is included by the global makefile so that you can add your own | ||
5 | # architecture-specific flags and dependencies. | ||
6 | # | ||
4 | # This file is subject to the terms and conditions of the GNU General Public | 7 | # This file is subject to the terms and conditions of the GNU General Public |
5 | # License. See the file "COPYING" in the main directory of this archive | 8 | # License. See the file "COPYING" in the main directory of this archive |
6 | # for more details. | 9 | # for more details. |
@@ -60,7 +63,7 @@ $(obj)/xipImage: vmlinux FORCE | |||
60 | @echo ' Kernel: $@ is ready' | 63 | @echo ' Kernel: $@ is ready' |
61 | endif | 64 | endif |
62 | 65 | ||
63 | .PHONY: initrd | 66 | PHONY += initrd |
64 | initrd: | 67 | initrd: |
65 | @test "$(INITRD_PHYS)" != "" || \ | 68 | @test "$(INITRD_PHYS)" != "" || \ |
66 | (echo This machine does not support INITRD; exit -1) | 69 | (echo This machine does not support INITRD; exit -1) |
diff --git a/arch/i386/Makefile b/arch/i386/Makefile index 36bef6543ac1..ff6973a85c8f 100644 --- a/arch/i386/Makefile +++ b/arch/i386/Makefile | |||
@@ -99,8 +99,8 @@ AFLAGS += $(mflags-y) | |||
99 | 99 | ||
100 | boot := arch/i386/boot | 100 | boot := arch/i386/boot |
101 | 101 | ||
102 | .PHONY: zImage bzImage compressed zlilo bzlilo \ | 102 | PHONY += zImage bzImage compressed zlilo bzlilo \ |
103 | zdisk bzdisk fdimage fdimage144 fdimage288 install | 103 | zdisk bzdisk fdimage fdimage144 fdimage288 install |
104 | 104 | ||
105 | all: bzImage | 105 | all: bzImage |
106 | 106 | ||
diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile index f722e1a25948..80ea7506fa1a 100644 --- a/arch/ia64/Makefile +++ b/arch/ia64/Makefile | |||
@@ -1,6 +1,9 @@ | |||
1 | # | 1 | # |
2 | # ia64/Makefile | 2 | # ia64/Makefile |
3 | # | 3 | # |
4 | # This file is included by the global makefile so that you can add your own | ||
5 | # architecture-specific flags and dependencies. | ||
6 | # | ||
4 | # This file is subject to the terms and conditions of the GNU General Public | 7 | # This file is subject to the terms and conditions of the GNU General Public |
5 | # License. See the file "COPYING" in the main directory of this archive | 8 | # License. See the file "COPYING" in the main directory of this archive |
6 | # for more details. | 9 | # for more details. |
@@ -62,7 +65,7 @@ drivers-$(CONFIG_OPROFILE) += arch/ia64/oprofile/ | |||
62 | 65 | ||
63 | boot := arch/ia64/hp/sim/boot | 66 | boot := arch/ia64/hp/sim/boot |
64 | 67 | ||
65 | .PHONY: boot compressed check | 68 | PHONY += boot compressed check |
66 | 69 | ||
67 | all: compressed unwcheck | 70 | all: compressed unwcheck |
68 | 71 | ||
diff --git a/arch/m32r/Makefile b/arch/m32r/Makefile index 983d438b14b6..229f66fc8e5e 100644 --- a/arch/m32r/Makefile +++ b/arch/m32r/Makefile | |||
@@ -1,6 +1,9 @@ | |||
1 | # | 1 | # |
2 | # m32r/Makefile | 2 | # m32r/Makefile |
3 | # | 3 | # |
4 | # This file is included by the global makefile so that you can add your own | ||
5 | # architecture-specific flags and dependencies. | ||
6 | # | ||
4 | 7 | ||
5 | LDFLAGS := | 8 | LDFLAGS := |
6 | OBJCOPYFLAGS := -O binary -R .note -R .comment -S | 9 | OBJCOPYFLAGS := -O binary -R .note -R .comment -S |
@@ -39,7 +42,7 @@ drivers-$(CONFIG_OPROFILE) += arch/m32r/oprofile/ | |||
39 | 42 | ||
40 | boot := arch/m32r/boot | 43 | boot := arch/m32r/boot |
41 | 44 | ||
42 | .PHONY: zImage | 45 | PHONY += zImage |
43 | 46 | ||
44 | all: zImage | 47 | all: zImage |
45 | 48 | ||
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 5500ab55d042..5787d55a20b6 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile | |||
@@ -150,7 +150,7 @@ CPPFLAGS_vmlinux.lds := -Upowerpc | |||
150 | 150 | ||
151 | BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm uImage | 151 | BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm uImage |
152 | 152 | ||
153 | .PHONY: $(BOOT_TARGETS) | 153 | PHONY += $(BOOT_TARGETS) |
154 | 154 | ||
155 | boot := arch/$(ARCH)/boot | 155 | boot := arch/$(ARCH)/boot |
156 | 156 | ||
diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile index 98e940beeb3b..9fbdf54ba2be 100644 --- a/arch/ppc/Makefile +++ b/arch/ppc/Makefile | |||
@@ -82,7 +82,7 @@ drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/ | |||
82 | 82 | ||
83 | BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm | 83 | BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm |
84 | 84 | ||
85 | .PHONY: $(BOOT_TARGETS) | 85 | PHONY += $(BOOT_TARGETS) |
86 | 86 | ||
87 | all: uImage zImage | 87 | all: uImage zImage |
88 | 88 | ||
diff --git a/arch/ppc/boot/Makefile b/arch/ppc/boot/Makefile index efd8ce515d5f..84eec0bef93c 100644 --- a/arch/ppc/boot/Makefile +++ b/arch/ppc/boot/Makefile | |||
@@ -1,6 +1,9 @@ | |||
1 | # | 1 | # |
2 | # arch/ppc/boot/Makefile | 2 | # arch/ppc/boot/Makefile |
3 | # | 3 | # |
4 | # This file is included by the global makefile so that you can add your own | ||
5 | # architecture-specific flags and dependencies. | ||
6 | # | ||
4 | # This file is subject to the terms and conditions of the GNU General Public | 7 | # This file is subject to the terms and conditions of the GNU General Public |
5 | # License. See the file "COPYING" in the main directory of this archive | 8 | # License. See the file "COPYING" in the main directory of this archive |
6 | # for more details. | 9 | # for more details. |
@@ -25,7 +28,7 @@ subdir- += simple openfirmware | |||
25 | 28 | ||
26 | hostprogs-y := $(addprefix utils/, addnote mknote hack-coff mkprep mkbugboot mktree) | 29 | hostprogs-y := $(addprefix utils/, addnote mknote hack-coff mkprep mkbugboot mktree) |
27 | 30 | ||
28 | .PHONY: $(BOOT_TARGETS) $(bootdir-y) | 31 | PHONY += $(BOOT_TARGETS) $(bootdir-y) |
29 | 32 | ||
30 | $(BOOT_TARGETS): $(bootdir-y) | 33 | $(BOOT_TARGETS): $(bootdir-y) |
31 | 34 | ||
diff --git a/arch/ppc/boot/openfirmware/Makefile b/arch/ppc/boot/openfirmware/Makefile index 2a411ec2e650..66b739743759 100644 --- a/arch/ppc/boot/openfirmware/Makefile +++ b/arch/ppc/boot/openfirmware/Makefile | |||
@@ -1,5 +1,8 @@ | |||
1 | # Makefile for making bootable images on various OpenFirmware machines. | 1 | # Makefile for making bootable images on various OpenFirmware machines. |
2 | # | 2 | # |
3 | # This file is included by the global makefile so that you can add your own | ||
4 | # architecture-specific flags and dependencies. | ||
5 | # | ||
3 | # Paul Mackerras January 1997 | 6 | # Paul Mackerras January 1997 |
4 | # XCOFF bootable images for PowerMacs | 7 | # XCOFF bootable images for PowerMacs |
5 | # Geert Uytterhoeven September 1997 | 8 | # Geert Uytterhoeven September 1997 |
@@ -86,7 +89,7 @@ $(images)/zImage.chrp-rs6k $(images)/zImage.initrd.chrp-rs6k: \ | |||
86 | 89 | ||
87 | # The targets used on the make command-line | 90 | # The targets used on the make command-line |
88 | 91 | ||
89 | .PHONY: zImage zImage.initrd | 92 | PHONY += zImage zImage.initrd |
90 | zImage: $(images)/zImage.chrp \ | 93 | zImage: $(images)/zImage.chrp \ |
91 | $(images)/zImage.chrp-rs6k | 94 | $(images)/zImage.chrp-rs6k |
92 | @echo ' kernel: $@ is ready ($<)' | 95 | @echo ' kernel: $@ is ready ($<)' |
@@ -96,7 +99,7 @@ zImage.initrd: $(images)/zImage.initrd.chrp \ | |||
96 | 99 | ||
97 | TFTPIMAGE := /tftpboot/zImage | 100 | TFTPIMAGE := /tftpboot/zImage |
98 | 101 | ||
99 | .PHONY: znetboot znetboot.initrd | 102 | PHONY += znetboot znetboot.initrd |
100 | znetboot: $(images)/zImage.chrp | 103 | znetboot: $(images)/zImage.chrp |
101 | cp $(images)/zImage.chrp $(TFTPIMAGE).chrp$(END) | 104 | cp $(images)/zImage.chrp $(TFTPIMAGE).chrp$(END) |
102 | @echo ' kernel: $@ is ready ($<)' | 105 | @echo ' kernel: $@ is ready ($<)' |
diff --git a/arch/sh/Makefile b/arch/sh/Makefile index 08c9515c4806..c72e17a96eed 100644 --- a/arch/sh/Makefile +++ b/arch/sh/Makefile | |||
@@ -172,7 +172,7 @@ include/asm-sh/.mach: $(wildcard include/config/sh/*.h) include/config/MARKER | |||
172 | 172 | ||
173 | archprepare: maketools include/asm-sh/.cpu include/asm-sh/.mach | 173 | archprepare: maketools include/asm-sh/.cpu include/asm-sh/.mach |
174 | 174 | ||
175 | .PHONY: maketools FORCE | 175 | PHONY += maketools FORCE |
176 | maketools: include/linux/version.h FORCE | 176 | maketools: include/linux/version.h FORCE |
177 | $(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h | 177 | $(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h |
178 | 178 | ||
diff --git a/arch/um/Makefile b/arch/um/Makefile index c58b657f0097..8d14c7a831be 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile | |||
@@ -1,4 +1,7 @@ | |||
1 | # | 1 | # |
2 | # This file is included by the global makefile so that you can add your own | ||
3 | # architecture-specific flags and dependencies. | ||
4 | # | ||
2 | # Copyright (C) 2002 Jeff Dike (jdike@karaya.com) | 5 | # Copyright (C) 2002 Jeff Dike (jdike@karaya.com) |
3 | # Licensed under the GPL | 6 | # Licensed under the GPL |
4 | # | 7 | # |
@@ -88,7 +91,7 @@ CONFIG_KERNEL_HALF_GIGS ?= 0 | |||
88 | 91 | ||
89 | SIZE = (($(CONFIG_NEST_LEVEL) + $(CONFIG_KERNEL_HALF_GIGS)) * 0x20000000) | 92 | SIZE = (($(CONFIG_NEST_LEVEL) + $(CONFIG_KERNEL_HALF_GIGS)) * 0x20000000) |
90 | 93 | ||
91 | .PHONY: linux | 94 | PHONY += linux |
92 | 95 | ||
93 | all: linux | 96 | all: linux |
94 | 97 | ||
diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile index d7fd46479c55..7405dfd6522b 100644 --- a/arch/x86_64/Makefile +++ b/arch/x86_64/Makefile | |||
@@ -67,8 +67,8 @@ drivers-$(CONFIG_OPROFILE) += arch/x86_64/oprofile/ | |||
67 | 67 | ||
68 | boot := arch/x86_64/boot | 68 | boot := arch/x86_64/boot |
69 | 69 | ||
70 | .PHONY: bzImage bzlilo install archmrproper \ | 70 | PHONY += bzImage bzlilo install archmrproper \ |
71 | fdimage fdimage144 fdimage288 archclean | 71 | fdimage fdimage144 fdimage288 archclean |
72 | 72 | ||
73 | #Default target when executing "make" | 73 | #Default target when executing "make" |
74 | all: bzImage | 74 | all: bzImage |
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index c3d2e4e068c4..59620b1554e0 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
@@ -116,16 +116,18 @@ make-cmd = $(subst \#,\\\#,$(subst $$,$$$$,$(call escsq,$(cmd_$(1))))) | |||
116 | # function to only execute the passed command if necessary | 116 | # function to only execute the passed command if necessary |
117 | # >'< substitution is for echo to work, >$< substitution to preserve $ when reloading .cmd file | 117 | # >'< substitution is for echo to work, >$< substitution to preserve $ when reloading .cmd file |
118 | # note: when using inline perl scripts [perl -e '...$$t=1;...'] in $(cmd_xxx) double $$ your perl vars | 118 | # note: when using inline perl scripts [perl -e '...$$t=1;...'] in $(cmd_xxx) double $$ your perl vars |
119 | # | 119 | # |
120 | if_changed = $(if $(strip $? $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ), \ | 120 | if_changed = $(if $(strip $(filter-out $(PHONY),$?) \ |
121 | $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ), \ | ||
121 | @set -e; \ | 122 | @set -e; \ |
122 | $(echo-cmd) $(cmd_$(1)); \ | 123 | $(echo-cmd) $(cmd_$(1)); \ |
123 | echo 'cmd_$@ := $(make-cmd)' > $(@D)/.$(@F).cmd) | 124 | echo 'cmd_$@ := $(make-cmd)' > $(@D)/.$(@F).cmd) |
124 | 125 | ||
125 | # execute the command and also postprocess generated .d dependencies | 126 | # execute the command and also postprocess generated .d dependencies |
126 | # file | 127 | # file |
127 | if_changed_dep = $(if $(strip $? $(filter-out FORCE $(wildcard $^),$^)\ | 128 | if_changed_dep = $(if $(strip $(filter-out $(PHONY),$?) \ |
128 | $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ), \ | 129 | $(filter-out FORCE $(wildcard $^),$^) \ |
130 | $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ), \ | ||
129 | @set -e; \ | 131 | @set -e; \ |
130 | $(echo-cmd) $(cmd_$(1)); \ | 132 | $(echo-cmd) $(cmd_$(1)); \ |
131 | scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(@D)/.$(@F).tmp; \ | 133 | scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(@D)/.$(@F).tmp; \ |
@@ -135,6 +137,7 @@ if_changed_dep = $(if $(strip $? $(filter-out FORCE $(wildcard $^),$^)\ | |||
135 | # Usage: $(call if_changed_rule,foo) | 137 | # Usage: $(call if_changed_rule,foo) |
136 | # will check if $(cmd_foo) changed, or any of the prequisites changed, | 138 | # will check if $(cmd_foo) changed, or any of the prequisites changed, |
137 | # and if so will execute $(rule_foo) | 139 | # and if so will execute $(rule_foo) |
138 | if_changed_rule = $(if $(strip $? $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ),\ | 140 | if_changed_rule = $(if $(strip $(filter-out $(PHONY),$?) \ |
141 | $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ),\ | ||
139 | @set -e; \ | 142 | @set -e; \ |
140 | $(rule_$(1))) | 143 | $(rule_$(1))) |
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 6ac96ea92bfc..7afe3e76cb5a 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | src := $(obj) | 5 | src := $(obj) |
6 | 6 | ||
7 | .PHONY: __build | 7 | PHONY := __build |
8 | __build: | 8 | __build: |
9 | 9 | ||
10 | # Read .config if it exist, otherwise ignore | 10 | # Read .config if it exist, otherwise ignore |
@@ -308,14 +308,14 @@ targets += $(multi-used-y) $(multi-used-m) | |||
308 | # Descending | 308 | # Descending |
309 | # --------------------------------------------------------------------------- | 309 | # --------------------------------------------------------------------------- |
310 | 310 | ||
311 | .PHONY: $(subdir-ym) | 311 | PHONY += $(subdir-ym) |
312 | $(subdir-ym): | 312 | $(subdir-ym): |
313 | $(Q)$(MAKE) $(build)=$@ | 313 | $(Q)$(MAKE) $(build)=$@ |
314 | 314 | ||
315 | # Add FORCE to the prequisites of a target to force it to be always rebuilt. | 315 | # Add FORCE to the prequisites of a target to force it to be always rebuilt. |
316 | # --------------------------------------------------------------------------- | 316 | # --------------------------------------------------------------------------- |
317 | 317 | ||
318 | .PHONY: FORCE | 318 | PHONY += FORCE |
319 | 319 | ||
320 | FORCE: | 320 | FORCE: |
321 | 321 | ||
@@ -330,3 +330,9 @@ cmd_files := $(wildcard $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd)) | |||
330 | ifneq ($(cmd_files),) | 330 | ifneq ($(cmd_files),) |
331 | include $(cmd_files) | 331 | include $(cmd_files) |
332 | endif | 332 | endif |
333 | |||
334 | |||
335 | # Declare the contents of the .PHONY variable as phony. We keep that | ||
336 | # information in a variable se we can use it in if_changed and friends. | ||
337 | |||
338 | .PHONY: $(PHONY) | ||
diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean index 8974ea5fc878..cff33498fa16 100644 --- a/scripts/Makefile.clean +++ b/scripts/Makefile.clean | |||
@@ -4,7 +4,7 @@ | |||
4 | 4 | ||
5 | src := $(obj) | 5 | src := $(obj) |
6 | 6 | ||
7 | .PHONY: __clean | 7 | PHONY := __clean |
8 | __clean: | 8 | __clean: |
9 | 9 | ||
10 | # Shorthand for $(Q)$(MAKE) scripts/Makefile.clean obj=dir | 10 | # Shorthand for $(Q)$(MAKE) scripts/Makefile.clean obj=dir |
@@ -87,10 +87,16 @@ endif | |||
87 | # Descending | 87 | # Descending |
88 | # --------------------------------------------------------------------------- | 88 | # --------------------------------------------------------------------------- |
89 | 89 | ||
90 | .PHONY: $(subdir-ymn) | 90 | PHONY += $(subdir-ymn) |
91 | $(subdir-ymn): | 91 | $(subdir-ymn): |
92 | $(Q)$(MAKE) $(clean)=$@ | 92 | $(Q)$(MAKE) $(clean)=$@ |
93 | 93 | ||
94 | # If quiet is set, only print short version of command | 94 | # If quiet is set, only print short version of command |
95 | 95 | ||
96 | cmd = @$(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))' &&) $(cmd_$(1)) | 96 | cmd = @$(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))' &&) $(cmd_$(1)) |
97 | |||
98 | |||
99 | # Declare the contents of the .PHONY variable as phony. We keep that | ||
100 | # information in a variable se we can use it in if_changed and friends. | ||
101 | |||
102 | .PHONY: $(PHONY) | ||
diff --git a/scripts/Makefile.modinst b/scripts/Makefile.modinst index 23fd1bdc25ce..2686dd5dce8c 100644 --- a/scripts/Makefile.modinst +++ b/scripts/Makefile.modinst | |||
@@ -2,7 +2,7 @@ | |||
2 | # Installing modules | 2 | # Installing modules |
3 | # ========================================================================== | 3 | # ========================================================================== |
4 | 4 | ||
5 | .PHONY: __modinst | 5 | PHONY := __modinst |
6 | __modinst: | 6 | __modinst: |
7 | 7 | ||
8 | include scripts/Kbuild.include | 8 | include scripts/Kbuild.include |
@@ -12,7 +12,7 @@ include scripts/Kbuild.include | |||
12 | __modules := $(sort $(shell grep -h '\.ko' /dev/null $(wildcard $(MODVERDIR)/*.mod))) | 12 | __modules := $(sort $(shell grep -h '\.ko' /dev/null $(wildcard $(MODVERDIR)/*.mod))) |
13 | modules := $(patsubst %.o,%.ko,$(wildcard $(__modules:.ko=.o))) | 13 | modules := $(patsubst %.o,%.ko,$(wildcard $(__modules:.ko=.o))) |
14 | 14 | ||
15 | .PHONY: $(modules) | 15 | PHONY += $(modules) |
16 | __modinst: $(modules) | 16 | __modinst: $(modules) |
17 | @: | 17 | @: |
18 | 18 | ||
@@ -27,3 +27,9 @@ modinst_dir = $(if $(KBUILD_EXTMOD),$(ext-mod-dir),kernel/$(@D)) | |||
27 | 27 | ||
28 | $(modules): | 28 | $(modules): |
29 | $(call cmd,modules_install,$(MODLIB)/$(modinst_dir)) | 29 | $(call cmd,modules_install,$(MODLIB)/$(modinst_dir)) |
30 | |||
31 | |||
32 | # Declare the contents of the .PHONY variable as phony. We keep that | ||
33 | # information in a variable se we can use it in if_changed and friends. | ||
34 | |||
35 | .PHONY: $(PHONY) | ||
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index 563e3c5bd8dd..0cfbe1cf2433 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost | |||
@@ -32,7 +32,7 @@ | |||
32 | # Step 4 is solely used to allow module versioning in external modules, | 32 | # Step 4 is solely used to allow module versioning in external modules, |
33 | # where the CRC of each module is retrieved from the Module.symers file. | 33 | # where the CRC of each module is retrieved from the Module.symers file. |
34 | 34 | ||
35 | .PHONY: _modpost | 35 | PHONY := _modpost |
36 | _modpost: __modpost | 36 | _modpost: __modpost |
37 | 37 | ||
38 | include .config | 38 | include .config |
@@ -60,7 +60,7 @@ quiet_cmd_modpost = MODPOST | |||
60 | $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ | 60 | $(if $(KBUILD_EXTMOD),-o $(modulesymfile)) \ |
61 | $(filter-out FORCE,$^) | 61 | $(filter-out FORCE,$^) |
62 | 62 | ||
63 | .PHONY: __modpost | 63 | PHONY += __modpost |
64 | __modpost: $(wildcard vmlinux) $(modules:.ko=.o) FORCE | 64 | __modpost: $(wildcard vmlinux) $(modules:.ko=.o) FORCE |
65 | $(call cmd,modpost) | 65 | $(call cmd,modpost) |
66 | 66 | ||
@@ -97,7 +97,7 @@ targets += $(modules) | |||
97 | # Add FORCE to the prequisites of a target to force it to be always rebuilt. | 97 | # Add FORCE to the prequisites of a target to force it to be always rebuilt. |
98 | # --------------------------------------------------------------------------- | 98 | # --------------------------------------------------------------------------- |
99 | 99 | ||
100 | .PHONY: FORCE | 100 | PHONY += FORCE |
101 | 101 | ||
102 | FORCE: | 102 | FORCE: |
103 | 103 | ||
@@ -112,3 +112,9 @@ cmd_files := $(wildcard $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd)) | |||
112 | ifneq ($(cmd_files),) | 112 | ifneq ($(cmd_files),) |
113 | include $(cmd_files) | 113 | include $(cmd_files) |
114 | endif | 114 | endif |
115 | |||
116 | |||
117 | # Declare the contents of the .PHONY variable as phony. We keep that | ||
118 | # information in a variable se we can use it in if_changed and friends. | ||
119 | |||
120 | .PHONY: $(PHONY) | ||
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 52809450bee4..e6499db4c8cc 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
@@ -2,7 +2,7 @@ | |||
2 | # Kernel configuration targets | 2 | # Kernel configuration targets |
3 | # These targets are used from top-level makefile | 3 | # These targets are used from top-level makefile |
4 | 4 | ||
5 | .PHONY: oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config | 5 | PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config |
6 | 6 | ||
7 | xconfig: $(obj)/qconf | 7 | xconfig: $(obj)/qconf |
8 | $< arch/$(ARCH)/Kconfig | 8 | $< arch/$(ARCH)/Kconfig |
@@ -42,7 +42,7 @@ update-po-config: $(obj)/kxgettext | |||
42 | $(Q)rm -f arch/um/Kconfig_arch | 42 | $(Q)rm -f arch/um/Kconfig_arch |
43 | $(Q)rm -f scripts/kconfig/linux_*.pot scripts/kconfig/config.pot | 43 | $(Q)rm -f scripts/kconfig/linux_*.pot scripts/kconfig/config.pot |
44 | 44 | ||
45 | .PHONY: randconfig allyesconfig allnoconfig allmodconfig defconfig | 45 | PHONY += randconfig allyesconfig allnoconfig allmodconfig defconfig |
46 | 46 | ||
47 | randconfig: $(obj)/conf | 47 | randconfig: $(obj)/conf |
48 | $< -r arch/$(ARCH)/Kconfig | 48 | $< -r arch/$(ARCH)/Kconfig |
diff --git a/scripts/kconfig/lxdialog/Makefile b/scripts/kconfig/lxdialog/Makefile index bbf4887cff74..a8b026326247 100644 --- a/scripts/kconfig/lxdialog/Makefile +++ b/scripts/kconfig/lxdialog/Makefile | |||
@@ -7,10 +7,10 @@ check-lxdialog := $(srctree)/$(src)/check-lxdialog.sh | |||
7 | # we really need to do so. (Do not call gcc as part of make mrproper) | 7 | # we really need to do so. (Do not call gcc as part of make mrproper) |
8 | HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) | 8 | HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) |
9 | HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) | 9 | HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) |
10 | |||
11 | HOST_EXTRACFLAGS += -DLOCALE | ||
12 | 10 | ||
13 | .PHONY: dochecklxdialog | 11 | HOST_EXTRACFLAGS += -DLOCALE |
12 | |||
13 | PHONY += dochecklxdialog | ||
14 | $(obj)/dochecklxdialog: | 14 | $(obj)/dochecklxdialog: |
15 | $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_LOADLIBES) | 15 | $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_LOADLIBES) |
16 | 16 | ||
diff --git a/scripts/package/Makefile b/scripts/package/Makefile index c201ef001f09..d3038b7643ae 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile | |||
@@ -32,7 +32,7 @@ MKSPEC := $(srctree)/scripts/package/mkspec | |||
32 | PREV := set -e; cd ..; | 32 | PREV := set -e; cd ..; |
33 | 33 | ||
34 | # rpm-pkg | 34 | # rpm-pkg |
35 | .PHONY: rpm-pkg rpm | 35 | PHONY += rpm-pkg rpm |
36 | 36 | ||
37 | $(objtree)/kernel.spec: $(MKSPEC) $(srctree)/Makefile | 37 | $(objtree)/kernel.spec: $(MKSPEC) $(srctree)/Makefile |
38 | $(CONFIG_SHELL) $(MKSPEC) > $@ | 38 | $(CONFIG_SHELL) $(MKSPEC) > $@ |
@@ -54,10 +54,10 @@ rpm-pkg rpm: $(objtree)/kernel.spec | |||
54 | clean-files := $(objtree)/kernel.spec | 54 | clean-files := $(objtree)/kernel.spec |
55 | 55 | ||
56 | # binrpm-pkg | 56 | # binrpm-pkg |
57 | .PHONY: binrpm-pkg | 57 | PHONY += binrpm-pkg |
58 | $(objtree)/binkernel.spec: $(MKSPEC) $(srctree)/Makefile | 58 | $(objtree)/binkernel.spec: $(MKSPEC) $(srctree)/Makefile |
59 | $(CONFIG_SHELL) $(MKSPEC) prebuilt > $@ | 59 | $(CONFIG_SHELL) $(MKSPEC) prebuilt > $@ |
60 | 60 | ||
61 | binrpm-pkg: $(objtree)/binkernel.spec | 61 | binrpm-pkg: $(objtree)/binkernel.spec |
62 | $(MAKE) KBUILD_SRC= | 62 | $(MAKE) KBUILD_SRC= |
63 | set -e; \ | 63 | set -e; \ |
@@ -72,7 +72,7 @@ clean-files += $(objtree)/binkernel.spec | |||
72 | # Deb target | 72 | # Deb target |
73 | # --------------------------------------------------------------------------- | 73 | # --------------------------------------------------------------------------- |
74 | # | 74 | # |
75 | .PHONY: deb-pkg | 75 | PHONY += deb-pkg |
76 | deb-pkg: | 76 | deb-pkg: |
77 | $(MAKE) KBUILD_SRC= | 77 | $(MAKE) KBUILD_SRC= |
78 | $(CONFIG_SHELL) $(srctree)/scripts/package/builddeb | 78 | $(CONFIG_SHELL) $(srctree)/scripts/package/builddeb |
@@ -82,7 +82,7 @@ clean-dirs += $(objtree)/debian/ | |||
82 | 82 | ||
83 | # tarball targets | 83 | # tarball targets |
84 | # --------------------------------------------------------------------------- | 84 | # --------------------------------------------------------------------------- |
85 | .PHONY: tar%pkg | 85 | PHONY += tar%pkg |
86 | tar%pkg: | 86 | tar%pkg: |
87 | $(MAKE) KBUILD_SRC= | 87 | $(MAKE) KBUILD_SRC= |
88 | $(CONFIG_SHELL) $(srctree)/scripts/package/buildtar $@ | 88 | $(CONFIG_SHELL) $(srctree)/scripts/package/buildtar $@ |