/[pkg-src]/trunk/kernel26-magellan/patches-2.6.16-r12/0300-2.6.16-kbuild-dont-rely-on-incorrect-gnu-make-behavior.patch |
Contents of /trunk/kernel26-magellan/patches-2.6.16-r12/0300-2.6.16-kbuild-dont-rely-on-incorrect-gnu-make-behavior.patch
Parent Directory | Revision Log
Revision 72 -
(show annotations)
(download)
Mon Jun 5 09:25:38 2006 UTC (18 years, 3 months ago) by niro
File size: 30206 byte(s)
Mon Jun 5 09:25:38 2006 UTC (18 years, 3 months ago) by niro
File size: 30206 byte(s)
ver bump to 2.6.16-r12: - updated to linux-2.6.16.19 - updated to ck11
1 | diff-tree 130d1609c10aa8cdab6008c4a7862af06b855eea (from 7705a8792b0fc82fd7d4dd923724606bbfd9fb20) |
2 | Author: Paul Smith <psmith@gnu.org> |
3 | Date: Sun Mar 5 17:14:10 2006 -0500 |
4 | |
5 | [PATCH] kbuild: change kbuild to not rely on incorrect GNU make behavior |
6 | |
7 | The kbuild system takes advantage of an incorrect behavior in GNU make. |
8 | Once this behavior is fixed, all files in the kernel rebuild every time, |
9 | even if nothing has changed. This patch ensures kbuild works with both |
10 | the incorrect and correct behaviors of GNU make. |
11 | |
12 | For more details on the incorrect behavior, see: |
13 | |
14 | http://lists.gnu.org/archive/html/bug-make/2006-03/msg00003.html |
15 | |
16 | Changes in this patch: |
17 | - Keep all targets that are to be marked .PHONY in a variable, PHONY. |
18 | - Add .PHONY: $(PHONY) to mark them properly. |
19 | - Remove any $(PHONY) files from the $? list when determining whether |
20 | targets are up-to-date or not. |
21 | |
22 | Signed-off-by: Paul Smith <psmith@gnu.org> |
23 | Signed-off-by: Sam Ravnborg <sam@ravnborg.org> |
24 | (cherry picked from 4f1933620f57145212cdbb1ac6ce099eeeb21c5a commit) |
25 | |
26 | --- |
27 | Documentation/DocBook/Makefile | 8 ++++- |
28 | Makefile | 56 +++++++++++++++++++----------------- |
29 | arch/arm/Makefile | 5 ++- |
30 | arch/arm/boot/Makefile | 5 ++- |
31 | arch/arm/boot/bootp/Makefile | 5 ++- |
32 | arch/arm26/Makefile | 7 +++- |
33 | arch/arm26/boot/Makefile | 5 ++- |
34 | arch/i386/Makefile | 4 +- |
35 | arch/ia64/Makefile | 5 ++- |
36 | arch/m32r/Makefile | 5 ++- |
37 | arch/powerpc/Makefile | 2 - |
38 | arch/ppc/Makefile | 2 - |
39 | arch/ppc/boot/Makefile | 5 ++- |
40 | arch/ppc/boot/openfirmware/Makefile | 7 +++- |
41 | arch/sh/Makefile | 2 - |
42 | arch/um/Makefile | 7 +++- |
43 | arch/x86_64/Makefile | 4 +- |
44 | scripts/Kbuild.include | 13 +++++--- |
45 | scripts/Makefile.build | 12 +++++-- |
46 | scripts/Makefile.clean | 10 +++++- |
47 | scripts/Makefile.modinst | 10 +++++- |
48 | scripts/Makefile.modpost | 12 +++++-- |
49 | scripts/kconfig/Makefile | 4 +- |
50 | scripts/kconfig/lxdialog/Makefile | 6 +-- |
51 | scripts/package/Makefile | 10 +++--- |
52 | 25 files changed, 140 insertions(+), 71 deletions(-) |
53 | |
54 | Index: linux-2.6.16-ck2/Documentation/DocBook/Makefile |
55 | =================================================================== |
56 | --- linux-2.6.16-ck2.orig/Documentation/DocBook/Makefile 2006-01-03 17:36:06.000000000 +1100 |
57 | +++ linux-2.6.16-ck2/Documentation/DocBook/Makefile 2006-03-29 21:30:36.000000000 +1000 |
58 | @@ -28,7 +28,7 @@ PS_METHOD = $(prefer-db2x) |
59 | |
60 | ### |
61 | # The targets that may be used. |
62 | -.PHONY: xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs |
63 | +PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs |
64 | |
65 | BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) |
66 | xmldocs: $(BOOKS) |
67 | @@ -211,3 +211,9 @@ clean-dirs := $(patsubst %.xml,%,$(DOCBO |
68 | |
69 | #man put files in man subdir - traverse down |
70 | subdir- := man/ |
71 | + |
72 | + |
73 | +# Declare the contents of the .PHONY variable as phony. We keep that |
74 | +# information in a variable se we can use it in if_changed and friends. |
75 | + |
76 | +.PHONY: $(PHONY) |
77 | Index: linux-2.6.16-ck2/Makefile |
78 | =================================================================== |
79 | --- linux-2.6.16-ck2.orig/Makefile 2006-03-20 20:11:01.000000000 +1100 |
80 | +++ linux-2.6.16-ck2/Makefile 2006-03-29 21:30:36.000000000 +1000 |
81 | @@ -95,7 +95,7 @@ ifdef O |
82 | endif |
83 | |
84 | # That's our default target when none is given on the command line |
85 | -.PHONY: _all |
86 | +PHONY := _all |
87 | _all: |
88 | |
89 | ifneq ($(KBUILD_OUTPUT),) |
90 | @@ -106,7 +106,7 @@ KBUILD_OUTPUT := $(shell cd $(KBUILD_OUT |
91 | $(if $(KBUILD_OUTPUT),, \ |
92 | $(error output directory "$(saved-output)" does not exist)) |
93 | |
94 | -.PHONY: $(MAKECMDGOALS) |
95 | +PHONY += $(MAKECMDGOALS) |
96 | |
97 | $(filter-out _all,$(MAKECMDGOALS)) _all: |
98 | $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \ |
99 | @@ -123,7 +123,7 @@ ifeq ($(skip-makefile),) |
100 | |
101 | # If building an external module we do not care about the all: rule |
102 | # but instead _all depend on modules |
103 | -.PHONY: all |
104 | +PHONY += all |
105 | ifeq ($(KBUILD_EXTMOD),) |
106 | _all: all |
107 | else |
108 | @@ -369,14 +369,14 @@ export RCS_TAR_IGNORE := --exclude SCCS |
109 | # Rules shared between *config targets and build targets |
110 | |
111 | # Basic helpers built in scripts/ |
112 | -.PHONY: scripts_basic |
113 | +PHONY += scripts_basic |
114 | scripts_basic: |
115 | $(Q)$(MAKE) $(build)=scripts/basic |
116 | |
117 | # To avoid any implicit rule to kick in, define an empty command. |
118 | scripts/basic/%: scripts_basic ; |
119 | |
120 | -.PHONY: outputmakefile |
121 | +PHONY += outputmakefile |
122 | # outputmakefile generate a Makefile to be placed in output directory, if |
123 | # using a seperate output directory. This allows convinient use |
124 | # of make in output directory |
125 | @@ -452,7 +452,7 @@ ifeq ($(KBUILD_EXTMOD),) |
126 | # Additional helpers built in scripts/ |
127 | # Carefully list dependencies so we do not try to build scripts twice |
128 | # in parrallel |
129 | -.PHONY: scripts |
130 | +PHONY += scripts |
131 | scripts: scripts_basic include/config/MARKER |
132 | $(Q)$(MAKE) $(build)=$(@) |
133 | |
134 | @@ -752,7 +752,7 @@ $(sort $(vmlinux-init) $(vmlinux-main)) |
135 | # make menuconfig etc. |
136 | # Error messages still appears in the original language |
137 | |
138 | -.PHONY: $(vmlinux-dirs) |
139 | +PHONY += $(vmlinux-dirs) |
140 | $(vmlinux-dirs): prepare scripts |
141 | $(Q)$(MAKE) $(build)=$@ |
142 | |
143 | @@ -805,10 +805,10 @@ kernelrelease = $(KERNELVERSION)$(localv |
144 | # version.h and scripts_basic is processed / created. |
145 | |
146 | # Listed in dependency order |
147 | -.PHONY: prepare archprepare prepare0 prepare1 prepare2 prepare3 |
148 | +PHONY += prepare archprepare prepare0 prepare1 prepare2 prepare3 |
149 | |
150 | # prepare-all is deprecated, use prepare as valid replacement |
151 | -.PHONY: prepare-all |
152 | +PHONY += prepare-all |
153 | |
154 | # prepare3 is used to check if we are building in a separate output directory, |
155 | # and if so do: |
156 | @@ -910,7 +910,7 @@ include/linux/version.h: $(srctree)/Make |
157 | |
158 | # --------------------------------------------------------------------------- |
159 | |
160 | -.PHONY: depend dep |
161 | +PHONY += depend dep |
162 | depend dep: |
163 | @echo '*** Warning: make $@ is unnecessary now.' |
164 | |
165 | @@ -925,21 +925,21 @@ all: modules |
166 | |
167 | # Build modules |
168 | |
169 | -.PHONY: modules |
170 | +PHONY += modules |
171 | modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) |
172 | @echo ' Building modules, stage 2.'; |
173 | $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost |
174 | |
175 | |
176 | # Target to prepare building external modules |
177 | -.PHONY: modules_prepare |
178 | +PHONY += modules_prepare |
179 | modules_prepare: prepare scripts |
180 | |
181 | # Target to install modules |
182 | -.PHONY: modules_install |
183 | +PHONY += modules_install |
184 | modules_install: _modinst_ _modinst_post |
185 | |
186 | -.PHONY: _modinst_ |
187 | +PHONY += _modinst_ |
188 | _modinst_: |
189 | @if [ -z "`$(DEPMOD) -V 2>/dev/null | grep module-init-tools`" ]; then \ |
190 | echo "Warning: you may need to install module-init-tools"; \ |
191 | @@ -966,7 +966,7 @@ depmod_opts := |
192 | else |
193 | depmod_opts := -b $(INSTALL_MOD_PATH) -r |
194 | endif |
195 | -.PHONY: _modinst_post |
196 | +PHONY += _modinst_post |
197 | _modinst_post: _modinst_ |
198 | if [ -r System.map -a -x $(DEPMOD) ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi |
199 | |
200 | @@ -1009,7 +1009,7 @@ clean: rm-dirs := $(CLEAN_DIRS) |
201 | clean: rm-files := $(CLEAN_FILES) |
202 | clean-dirs := $(addprefix _clean_,$(srctree) $(vmlinux-alldirs)) |
203 | |
204 | -.PHONY: $(clean-dirs) clean archclean |
205 | +PHONY += $(clean-dirs) clean archclean |
206 | $(clean-dirs): |
207 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) |
208 | |
209 | @@ -1027,7 +1027,7 @@ mrproper: rm-dirs := $(wildcard $(MRPRO |
210 | mrproper: rm-files := $(wildcard $(MRPROPER_FILES)) |
211 | mrproper-dirs := $(addprefix _mrproper_,Documentation/DocBook scripts) |
212 | |
213 | -.PHONY: $(mrproper-dirs) mrproper archmrproper |
214 | +PHONY += $(mrproper-dirs) mrproper archmrproper |
215 | $(mrproper-dirs): |
216 | $(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@) |
217 | |
218 | @@ -1037,7 +1037,7 @@ mrproper: clean archmrproper $(mrproper- |
219 | |
220 | # distclean |
221 | # |
222 | -.PHONY: distclean |
223 | +PHONY += distclean |
224 | |
225 | distclean: mrproper |
226 | @find $(srctree) $(RCS_FIND_IGNORE) \ |
227 | @@ -1053,7 +1053,7 @@ distclean: mrproper |
228 | # rpm target kept for backward compatibility |
229 | package-dir := $(srctree)/scripts/package |
230 | |
231 | -.PHONY: %-pkg rpm |
232 | +PHONY += %-pkg rpm |
233 | |
234 | %pkg: FORCE |
235 | $(Q)$(MAKE) -f $(package-dir)/Makefile $@ |
236 | @@ -1145,11 +1145,11 @@ else # KBUILD_EXTMOD |
237 | |
238 | # We are always building modules |
239 | KBUILD_MODULES := 1 |
240 | -.PHONY: crmodverdir |
241 | +PHONY += crmodverdir |
242 | crmodverdir: |
243 | $(Q)mkdir -p $(MODVERDIR) |
244 | |
245 | -.PHONY: $(objtree)/Module.symvers |
246 | +PHONY += $(objtree)/Module.symvers |
247 | $(objtree)/Module.symvers: |
248 | @test -e $(objtree)/Module.symvers || ( \ |
249 | echo; \ |
250 | @@ -1158,7 +1158,7 @@ $(objtree)/Module.symvers: |
251 | echo ) |
252 | |
253 | module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD)) |
254 | -.PHONY: $(module-dirs) modules |
255 | +PHONY += $(module-dirs) modules |
256 | $(module-dirs): crmodverdir $(objtree)/Module.symvers |
257 | $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@) |
258 | |
259 | @@ -1166,13 +1166,13 @@ modules: $(module-dirs) |
260 | @echo ' Building modules, stage 2.'; |
261 | $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost |
262 | |
263 | -.PHONY: modules_install |
264 | +PHONY += modules_install |
265 | modules_install: |
266 | $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modinst |
267 | |
268 | clean-dirs := $(addprefix _clean_,$(KBUILD_EXTMOD)) |
269 | |
270 | -.PHONY: $(clean-dirs) clean |
271 | +PHONY += $(clean-dirs) clean |
272 | $(clean-dirs): |
273 | $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) |
274 | |
275 | @@ -1302,7 +1302,7 @@ namespacecheck: |
276 | endif #ifeq ($(config-targets),1) |
277 | endif #ifeq ($(mixed-targets),1) |
278 | |
279 | -.PHONY: checkstack |
280 | +PHONY += checkstack |
281 | checkstack: |
282 | $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \ |
283 | $(PERL) $(src)/scripts/checkstack.pl $(ARCH) |
284 | @@ -1347,4 +1347,10 @@ clean := -f $(if $(KBUILD_SRC),$(srctree |
285 | |
286 | endif # skip-makefile |
287 | |
288 | +PHONY += FORCE |
289 | FORCE: |
290 | + |
291 | + |
292 | +# Declare the contents of the .PHONY variable as phony. We keep that |
293 | +# information in a variable se we can use it in if_changed and friends. |
294 | +.PHONY: $(PHONY) |
295 | Index: linux-2.6.16-ck2/arch/arm/Makefile |
296 | =================================================================== |
297 | --- linux-2.6.16-ck2.orig/arch/arm/Makefile 2006-03-20 20:11:01.000000000 +1100 |
298 | +++ linux-2.6.16-ck2/arch/arm/Makefile 2006-03-29 21:30:36.000000000 +1000 |
299 | @@ -1,6 +1,9 @@ |
300 | # |
301 | # arch/arm/Makefile |
302 | # |
303 | +# This file is included by the global makefile so that you can add your own |
304 | +# architecture-specific flags and dependencies. |
305 | +# |
306 | # This file is subject to the terms and conditions of the GNU General Public |
307 | # License. See the file "COPYING" in the main directory of this archive |
308 | # for more details. |
309 | @@ -176,7 +179,7 @@ endif |
310 | |
311 | archprepare: maketools |
312 | |
313 | -.PHONY: maketools FORCE |
314 | +PHONY += maketools FORCE |
315 | maketools: include/linux/version.h include/asm-arm/.arch FORCE |
316 | $(Q)$(MAKE) $(build)=arch/arm/tools include/asm-arm/mach-types.h |
317 | |
318 | Index: linux-2.6.16-ck2/arch/arm/boot/Makefile |
319 | =================================================================== |
320 | --- linux-2.6.16-ck2.orig/arch/arm/boot/Makefile 2006-03-20 20:11:01.000000000 +1100 |
321 | +++ linux-2.6.16-ck2/arch/arm/boot/Makefile 2006-03-29 21:30:36.000000000 +1000 |
322 | @@ -1,6 +1,9 @@ |
323 | # |
324 | # arch/arm/boot/Makefile |
325 | # |
326 | +# This file is included by the global makefile so that you can add your own |
327 | +# architecture-specific flags and dependencies. |
328 | +# |
329 | # This file is subject to the terms and conditions of the GNU General Public |
330 | # License. See the file "COPYING" in the main directory of this archive |
331 | # for more details. |
332 | @@ -73,7 +76,7 @@ $(obj)/bootpImage: $(obj)/bootp/bootp FO |
333 | $(call if_changed,objcopy) |
334 | @echo ' Kernel: $@ is ready' |
335 | |
336 | -.PHONY: initrd FORCE |
337 | +PHONY += initrd FORCE |
338 | initrd: |
339 | @test "$(INITRD_PHYS)" != "" || \ |
340 | (echo This machine does not support INITRD; exit -1) |
341 | Index: linux-2.6.16-ck2/arch/arm/boot/bootp/Makefile |
342 | =================================================================== |
343 | --- linux-2.6.16-ck2.orig/arch/arm/boot/bootp/Makefile 2004-08-15 14:08:03.000000000 +1000 |
344 | +++ linux-2.6.16-ck2/arch/arm/boot/bootp/Makefile 2006-03-29 21:30:36.000000000 +1000 |
345 | @@ -1,6 +1,9 @@ |
346 | # |
347 | # linux/arch/arm/boot/bootp/Makefile |
348 | # |
349 | +# This file is included by the global makefile so that you can add your own |
350 | +# architecture-specific flags and dependencies. |
351 | +# |
352 | |
353 | LDFLAGS_bootp :=-p --no-undefined -X \ |
354 | --defsym initrd_phys=$(INITRD_PHYS) \ |
355 | @@ -21,4 +24,4 @@ $(obj)/kernel.o: arch/arm/boot/zImage FO |
356 | |
357 | $(obj)/initrd.o: $(INITRD) FORCE |
358 | |
359 | -.PHONY: $(INITRD) FORCE |
360 | +PHONY += $(INITRD) FORCE |
361 | Index: linux-2.6.16-ck2/arch/arm26/Makefile |
362 | =================================================================== |
363 | --- linux-2.6.16-ck2.orig/arch/arm26/Makefile 2005-10-28 20:21:34.000000000 +1000 |
364 | +++ linux-2.6.16-ck2/arch/arm26/Makefile 2006-03-29 21:30:36.000000000 +1000 |
365 | @@ -1,6 +1,9 @@ |
366 | # |
367 | # arch/arm26/Makefile |
368 | # |
369 | +# This file is included by the global makefile so that you can add your own |
370 | +# architecture-specific flags and dependencies. |
371 | +# |
372 | # This file is subject to the terms and conditions of the GNU General Public |
373 | # License. See the file "COPYING" in the main directory of this archive |
374 | # for more details. |
375 | @@ -49,9 +52,9 @@ all: zImage |
376 | |
377 | boot := arch/arm26/boot |
378 | |
379 | -.PHONY: maketools FORCE |
380 | +PHONY += maketools FORCE |
381 | maketools: FORCE |
382 | - |
383 | + |
384 | |
385 | # Convert bzImage to zImage |
386 | bzImage: vmlinux |
387 | Index: linux-2.6.16-ck2/arch/arm26/boot/Makefile |
388 | =================================================================== |
389 | --- linux-2.6.16-ck2.orig/arch/arm26/boot/Makefile 2005-03-02 19:30:24.000000000 +1100 |
390 | +++ linux-2.6.16-ck2/arch/arm26/boot/Makefile 2006-03-29 21:30:36.000000000 +1000 |
391 | @@ -1,6 +1,9 @@ |
392 | # |
393 | # arch/arm26/boot/Makefile |
394 | # |
395 | +# This file is included by the global makefile so that you can add your own |
396 | +# architecture-specific flags and dependencies. |
397 | +# |
398 | # This file is subject to the terms and conditions of the GNU General Public |
399 | # License. See the file "COPYING" in the main directory of this archive |
400 | # for more details. |
401 | @@ -60,7 +63,7 @@ $(obj)/xipImage: vmlinux FORCE |
402 | @echo ' Kernel: $@ is ready' |
403 | endif |
404 | |
405 | -.PHONY: initrd |
406 | +PHONY += initrd |
407 | initrd: |
408 | @test "$(INITRD_PHYS)" != "" || \ |
409 | (echo This machine does not support INITRD; exit -1) |
410 | Index: linux-2.6.16-ck2/arch/i386/Makefile |
411 | =================================================================== |
412 | --- linux-2.6.16-ck2.orig/arch/i386/Makefile 2006-03-20 20:11:01.000000000 +1100 |
413 | +++ linux-2.6.16-ck2/arch/i386/Makefile 2006-03-29 21:30:36.000000000 +1000 |
414 | @@ -99,8 +99,8 @@ AFLAGS += $(mflags-y) |
415 | |
416 | boot := arch/i386/boot |
417 | |
418 | -.PHONY: zImage bzImage compressed zlilo bzlilo \ |
419 | - zdisk bzdisk fdimage fdimage144 fdimage288 install |
420 | +PHONY += zImage bzImage compressed zlilo bzlilo \ |
421 | + zdisk bzdisk fdimage fdimage144 fdimage288 install |
422 | |
423 | all: bzImage |
424 | |
425 | Index: linux-2.6.16-ck2/arch/ia64/Makefile |
426 | =================================================================== |
427 | --- linux-2.6.16-ck2.orig/arch/ia64/Makefile 2006-03-20 20:11:01.000000000 +1100 |
428 | +++ linux-2.6.16-ck2/arch/ia64/Makefile 2006-03-29 21:30:36.000000000 +1000 |
429 | @@ -1,6 +1,9 @@ |
430 | # |
431 | # ia64/Makefile |
432 | # |
433 | +# This file is included by the global makefile so that you can add your own |
434 | +# architecture-specific flags and dependencies. |
435 | +# |
436 | # This file is subject to the terms and conditions of the GNU General Public |
437 | # License. See the file "COPYING" in the main directory of this archive |
438 | # for more details. |
439 | @@ -62,7 +65,7 @@ drivers-$(CONFIG_OPROFILE) += arch/ia64/ |
440 | |
441 | boot := arch/ia64/hp/sim/boot |
442 | |
443 | -.PHONY: boot compressed check |
444 | +PHONY += boot compressed check |
445 | |
446 | all: compressed unwcheck |
447 | |
448 | Index: linux-2.6.16-ck2/arch/m32r/Makefile |
449 | =================================================================== |
450 | --- linux-2.6.16-ck2.orig/arch/m32r/Makefile 2006-03-20 20:11:01.000000000 +1100 |
451 | +++ linux-2.6.16-ck2/arch/m32r/Makefile 2006-03-29 21:30:36.000000000 +1000 |
452 | @@ -1,6 +1,9 @@ |
453 | # |
454 | # m32r/Makefile |
455 | # |
456 | +# This file is included by the global makefile so that you can add your own |
457 | +# architecture-specific flags and dependencies. |
458 | +# |
459 | |
460 | LDFLAGS := |
461 | OBJCOPYFLAGS := -O binary -R .note -R .comment -S |
462 | @@ -39,7 +42,7 @@ drivers-$(CONFIG_OPROFILE) += arch/m32r/ |
463 | |
464 | boot := arch/m32r/boot |
465 | |
466 | -.PHONY: zImage |
467 | +PHONY += zImage |
468 | |
469 | all: zImage |
470 | |
471 | Index: linux-2.6.16-ck2/arch/powerpc/Makefile |
472 | =================================================================== |
473 | --- linux-2.6.16-ck2.orig/arch/powerpc/Makefile 2006-03-20 20:11:02.000000000 +1100 |
474 | +++ linux-2.6.16-ck2/arch/powerpc/Makefile 2006-03-29 21:30:36.000000000 +1000 |
475 | @@ -150,7 +150,7 @@ CPPFLAGS_vmlinux.lds := -Upowerpc |
476 | |
477 | BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm uImage |
478 | |
479 | -.PHONY: $(BOOT_TARGETS) |
480 | +PHONY += $(BOOT_TARGETS) |
481 | |
482 | boot := arch/$(ARCH)/boot |
483 | |
484 | Index: linux-2.6.16-ck2/arch/ppc/Makefile |
485 | =================================================================== |
486 | --- linux-2.6.16-ck2.orig/arch/ppc/Makefile 2006-03-20 20:11:02.000000000 +1100 |
487 | +++ linux-2.6.16-ck2/arch/ppc/Makefile 2006-03-29 21:30:36.000000000 +1000 |
488 | @@ -82,7 +82,7 @@ drivers-$(CONFIG_OPROFILE) += arch/power |
489 | |
490 | BOOT_TARGETS = zImage zImage.initrd znetboot znetboot.initrd vmlinux.sm |
491 | |
492 | -.PHONY: $(BOOT_TARGETS) |
493 | +PHONY += $(BOOT_TARGETS) |
494 | |
495 | all: uImage zImage |
496 | |
497 | Index: linux-2.6.16-ck2/arch/ppc/boot/Makefile |
498 | =================================================================== |
499 | --- linux-2.6.16-ck2.orig/arch/ppc/boot/Makefile 2006-03-20 20:11:02.000000000 +1100 |
500 | +++ linux-2.6.16-ck2/arch/ppc/boot/Makefile 2006-03-29 21:30:36.000000000 +1000 |
501 | @@ -1,6 +1,9 @@ |
502 | # |
503 | # arch/ppc/boot/Makefile |
504 | # |
505 | +# This file is included by the global makefile so that you can add your own |
506 | +# architecture-specific flags and dependencies. |
507 | +# |
508 | # This file is subject to the terms and conditions of the GNU General Public |
509 | # License. See the file "COPYING" in the main directory of this archive |
510 | # for more details. |
511 | @@ -25,7 +28,7 @@ subdir- += simple openfirmware |
512 | |
513 | hostprogs-y := $(addprefix utils/, addnote mknote hack-coff mkprep mkbugboot mktree) |
514 | |
515 | -.PHONY: $(BOOT_TARGETS) $(bootdir-y) |
516 | +PHONY += $(BOOT_TARGETS) $(bootdir-y) |
517 | |
518 | $(BOOT_TARGETS): $(bootdir-y) |
519 | |
520 | Index: linux-2.6.16-ck2/arch/ppc/boot/openfirmware/Makefile |
521 | =================================================================== |
522 | --- linux-2.6.16-ck2.orig/arch/ppc/boot/openfirmware/Makefile 2006-03-20 20:11:02.000000000 +1100 |
523 | +++ linux-2.6.16-ck2/arch/ppc/boot/openfirmware/Makefile 2006-03-29 21:30:36.000000000 +1000 |
524 | @@ -1,5 +1,8 @@ |
525 | # Makefile for making bootable images on various OpenFirmware machines. |
526 | # |
527 | +# This file is included by the global makefile so that you can add your own |
528 | +# architecture-specific flags and dependencies. |
529 | +# |
530 | # Paul Mackerras January 1997 |
531 | # XCOFF bootable images for PowerMacs |
532 | # Geert Uytterhoeven September 1997 |
533 | @@ -86,7 +89,7 @@ $(images)/zImage.chrp-rs6k $(images)/zIm |
534 | |
535 | # The targets used on the make command-line |
536 | |
537 | -.PHONY: zImage zImage.initrd |
538 | +PHONY += zImage zImage.initrd |
539 | zImage: $(images)/zImage.chrp \ |
540 | $(images)/zImage.chrp-rs6k |
541 | @echo ' kernel: $@ is ready ($<)' |
542 | @@ -96,7 +99,7 @@ zImage.initrd: $(images)/zImage.initrd. |
543 | |
544 | TFTPIMAGE := /tftpboot/zImage |
545 | |
546 | -.PHONY: znetboot znetboot.initrd |
547 | +PHONY += znetboot znetboot.initrd |
548 | znetboot: $(images)/zImage.chrp |
549 | cp $(images)/zImage.chrp $(TFTPIMAGE).chrp$(END) |
550 | @echo ' kernel: $@ is ready ($<)' |
551 | Index: linux-2.6.16-ck2/arch/sh/Makefile |
552 | =================================================================== |
553 | --- linux-2.6.16-ck2.orig/arch/sh/Makefile 2006-03-20 20:11:02.000000000 +1100 |
554 | +++ linux-2.6.16-ck2/arch/sh/Makefile 2006-03-29 21:30:36.000000000 +1000 |
555 | @@ -172,7 +172,7 @@ include/asm-sh/.mach: $(wildcard include |
556 | |
557 | archprepare: maketools include/asm-sh/.cpu include/asm-sh/.mach |
558 | |
559 | -.PHONY: maketools FORCE |
560 | +PHONY += maketools FORCE |
561 | maketools: include/linux/version.h FORCE |
562 | $(Q)$(MAKE) $(build)=arch/sh/tools include/asm-sh/machtypes.h |
563 | |
564 | Index: linux-2.6.16-ck2/arch/um/Makefile |
565 | =================================================================== |
566 | --- linux-2.6.16-ck2.orig/arch/um/Makefile 2006-03-20 20:11:02.000000000 +1100 |
567 | +++ linux-2.6.16-ck2/arch/um/Makefile 2006-03-29 21:30:36.000000000 +1000 |
568 | @@ -1,4 +1,7 @@ |
569 | -# |
570 | +# |
571 | +# This file is included by the global makefile so that you can add your own |
572 | +# architecture-specific flags and dependencies. |
573 | +# |
574 | # Copyright (C) 2002 Jeff Dike (jdike@karaya.com) |
575 | # Licensed under the GPL |
576 | # |
577 | @@ -88,7 +91,7 @@ CONFIG_KERNEL_HALF_GIGS ?= 0 |
578 | |
579 | SIZE = (($(CONFIG_NEST_LEVEL) + $(CONFIG_KERNEL_HALF_GIGS)) * 0x20000000) |
580 | |
581 | -.PHONY: linux |
582 | +PHONY += linux |
583 | |
584 | all: linux |
585 | |
586 | Index: linux-2.6.16-ck2/arch/x86_64/Makefile |
587 | =================================================================== |
588 | --- linux-2.6.16-ck2.orig/arch/x86_64/Makefile 2006-03-20 20:11:02.000000000 +1100 |
589 | +++ linux-2.6.16-ck2/arch/x86_64/Makefile 2006-03-29 21:30:36.000000000 +1000 |
590 | @@ -67,8 +67,8 @@ drivers-$(CONFIG_OPROFILE) += arch/x86_ |
591 | |
592 | boot := arch/x86_64/boot |
593 | |
594 | -.PHONY: bzImage bzlilo install archmrproper \ |
595 | - fdimage fdimage144 fdimage288 archclean |
596 | +PHONY += bzImage bzlilo install archmrproper \ |
597 | + fdimage fdimage144 fdimage288 archclean |
598 | |
599 | #Default target when executing "make" |
600 | all: bzImage |
601 | Index: linux-2.6.16-ck2/scripts/Kbuild.include |
602 | =================================================================== |
603 | --- linux-2.6.16-ck2.orig/scripts/Kbuild.include 2006-03-20 20:11:47.000000000 +1100 |
604 | +++ linux-2.6.16-ck2/scripts/Kbuild.include 2006-03-29 21:30:36.000000000 +1000 |
605 | @@ -78,8 +78,9 @@ echo-cmd = $(if $($(quiet)cmd_$(1)), \ |
606 | # function to only execute the passed command if necessary |
607 | # >'< substitution is for echo to work, >$< substitution to preserve $ when reloading .cmd file |
608 | # note: when using inline perl scripts [perl -e '...$$t=1;...'] in $(cmd_xxx) double $$ your perl vars |
609 | -# |
610 | -if_changed = $(if $(strip $? $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ), \ |
611 | +# |
612 | +if_changed = $(if $(strip $(filter-out $(PHONY),$?) \ |
613 | + $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ), \ |
614 | @set -e; \ |
615 | $(echo-cmd) \ |
616 | $(cmd_$(1)); \ |
617 | @@ -87,8 +88,9 @@ if_changed = $(if $(strip $? $(call arg- |
618 | |
619 | # execute the command and also postprocess generated .d dependencies |
620 | # file |
621 | -if_changed_dep = $(if $(strip $? $(filter-out FORCE $(wildcard $^),$^)\ |
622 | - $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ), \ |
623 | +if_changed_dep = $(if $(strip $(filter-out $(PHONY),$?) \ |
624 | + $(filter-out FORCE $(wildcard $^),$^) \ |
625 | + $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ), \ |
626 | @set -e; \ |
627 | $(echo-cmd) \ |
628 | $(cmd_$(1)); \ |
629 | @@ -99,6 +101,7 @@ if_changed_dep = $(if $(strip $? $(filte |
630 | # Usage: $(call if_changed_rule,foo) |
631 | # will check if $(cmd_foo) changed, or any of the prequisites changed, |
632 | # and if so will execute $(rule_foo) |
633 | -if_changed_rule = $(if $(strip $? $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ),\ |
634 | +if_changed_rule = $(if $(strip $(filter-out $(PHONY),$?) \ |
635 | + $(call arg-check, $(cmd_$(1)), $(cmd_$@)) ),\ |
636 | @set -e; \ |
637 | $(rule_$(1))) |
638 | Index: linux-2.6.16-ck2/scripts/Makefile.build |
639 | =================================================================== |
640 | --- linux-2.6.16-ck2.orig/scripts/Makefile.build 2006-03-20 20:11:47.000000000 +1100 |
641 | +++ linux-2.6.16-ck2/scripts/Makefile.build 2006-03-29 21:30:36.000000000 +1000 |
642 | @@ -4,7 +4,7 @@ |
643 | |
644 | src := $(obj) |
645 | |
646 | -.PHONY: __build |
647 | +PHONY := __build |
648 | __build: |
649 | |
650 | # Read .config if it exist, otherwise ignore |
651 | @@ -309,14 +309,14 @@ targets += $(multi-used-y) $(multi-used- |
652 | # Descending |
653 | # --------------------------------------------------------------------------- |
654 | |
655 | -.PHONY: $(subdir-ym) |
656 | +PHONY += $(subdir-ym) |
657 | $(subdir-ym): |
658 | $(Q)$(MAKE) $(build)=$@ |
659 | |
660 | # Add FORCE to the prequisites of a target to force it to be always rebuilt. |
661 | # --------------------------------------------------------------------------- |
662 | |
663 | -.PHONY: FORCE |
664 | +PHONY += FORCE |
665 | |
666 | FORCE: |
667 | |
668 | @@ -331,3 +331,9 @@ cmd_files := $(wildcard $(foreach f,$(ta |
669 | ifneq ($(cmd_files),) |
670 | include $(cmd_files) |
671 | endif |
672 | + |
673 | + |
674 | +# Declare the contents of the .PHONY variable as phony. We keep that |
675 | +# information in a variable se we can use it in if_changed and friends. |
676 | + |
677 | +.PHONY: $(PHONY) |
678 | Index: linux-2.6.16-ck2/scripts/Makefile.clean |
679 | =================================================================== |
680 | --- linux-2.6.16-ck2.orig/scripts/Makefile.clean 2005-10-28 20:22:03.000000000 +1000 |
681 | +++ linux-2.6.16-ck2/scripts/Makefile.clean 2006-03-29 21:30:36.000000000 +1000 |
682 | @@ -4,7 +4,7 @@ |
683 | |
684 | src := $(obj) |
685 | |
686 | -.PHONY: __clean |
687 | +PHONY := __clean |
688 | __clean: |
689 | |
690 | # Shorthand for $(Q)$(MAKE) scripts/Makefile.clean obj=dir |
691 | @@ -87,10 +87,16 @@ endif |
692 | # Descending |
693 | # --------------------------------------------------------------------------- |
694 | |
695 | -.PHONY: $(subdir-ymn) |
696 | +PHONY += $(subdir-ymn) |
697 | $(subdir-ymn): |
698 | $(Q)$(MAKE) $(clean)=$@ |
699 | |
700 | # If quiet is set, only print short version of command |
701 | |
702 | cmd = @$(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))' &&) $(cmd_$(1)) |
703 | + |
704 | + |
705 | +# Declare the contents of the .PHONY variable as phony. We keep that |
706 | +# information in a variable se we can use it in if_changed and friends. |
707 | + |
708 | +.PHONY: $(PHONY) |
709 | Index: linux-2.6.16-ck2/scripts/Makefile.modinst |
710 | =================================================================== |
711 | --- linux-2.6.16-ck2.orig/scripts/Makefile.modinst 2005-10-28 20:22:03.000000000 +1000 |
712 | +++ linux-2.6.16-ck2/scripts/Makefile.modinst 2006-03-29 21:30:36.000000000 +1000 |
713 | @@ -2,7 +2,7 @@ |
714 | # Installing modules |
715 | # ========================================================================== |
716 | |
717 | -.PHONY: __modinst |
718 | +PHONY := __modinst |
719 | __modinst: |
720 | |
721 | include scripts/Kbuild.include |
722 | @@ -12,7 +12,7 @@ include scripts/Kbuild.include |
723 | __modules := $(sort $(shell grep -h '\.ko' /dev/null $(wildcard $(MODVERDIR)/*.mod))) |
724 | modules := $(patsubst %.o,%.ko,$(wildcard $(__modules:.ko=.o))) |
725 | |
726 | -.PHONY: $(modules) |
727 | +PHONY += $(modules) |
728 | __modinst: $(modules) |
729 | @: |
730 | |
731 | @@ -27,3 +27,9 @@ modinst_dir = $(if $(KBUILD_EXTMOD),$(ex |
732 | |
733 | $(modules): |
734 | $(call cmd,modules_install,$(MODLIB)/$(modinst_dir)) |
735 | + |
736 | + |
737 | +# Declare the contents of the .PHONY variable as phony. We keep that |
738 | +# information in a variable se we can use it in if_changed and friends. |
739 | + |
740 | +.PHONY: $(PHONY) |
741 | Index: linux-2.6.16-ck2/scripts/Makefile.modpost |
742 | =================================================================== |
743 | --- linux-2.6.16-ck2.orig/scripts/Makefile.modpost 2006-03-20 20:11:47.000000000 +1100 |
744 | +++ linux-2.6.16-ck2/scripts/Makefile.modpost 2006-03-29 21:30:36.000000000 +1000 |
745 | @@ -32,7 +32,7 @@ |
746 | # Step 4 is solely used to allow module versioning in external modules, |
747 | # where the CRC of each module is retrieved from the Module.symers file. |
748 | |
749 | -.PHONY: _modpost |
750 | +PHONY := _modpost |
751 | _modpost: __modpost |
752 | |
753 | include .config |
754 | @@ -57,7 +57,7 @@ quiet_cmd_modpost = MODPOST |
755 | $(if $(KBUILD_EXTMOD),-i,-o) $(symverfile) \ |
756 | $(filter-out FORCE,$^) |
757 | |
758 | -.PHONY: __modpost |
759 | +PHONY += __modpost |
760 | __modpost: $(wildcard vmlinux) $(modules:.ko=.o) FORCE |
761 | $(call cmd,modpost) |
762 | |
763 | @@ -94,7 +94,7 @@ targets += $(modules) |
764 | # Add FORCE to the prequisites of a target to force it to be always rebuilt. |
765 | # --------------------------------------------------------------------------- |
766 | |
767 | -.PHONY: FORCE |
768 | +PHONY += FORCE |
769 | |
770 | FORCE: |
771 | |
772 | @@ -109,3 +109,9 @@ cmd_files := $(wildcard $(foreach f,$(ta |
773 | ifneq ($(cmd_files),) |
774 | include $(cmd_files) |
775 | endif |
776 | + |
777 | + |
778 | +# Declare the contents of the .PHONY variable as phony. We keep that |
779 | +# information in a variable se we can use it in if_changed and friends. |
780 | + |
781 | +.PHONY: $(PHONY) |
782 | Index: linux-2.6.16-ck2/scripts/kconfig/Makefile |
783 | =================================================================== |
784 | --- linux-2.6.16-ck2.orig/scripts/kconfig/Makefile 2006-03-20 20:11:47.000000000 +1100 |
785 | +++ linux-2.6.16-ck2/scripts/kconfig/Makefile 2006-03-29 21:30:36.000000000 +1000 |
786 | @@ -2,7 +2,7 @@ |
787 | # Kernel configuration targets |
788 | # These targets are used from top-level makefile |
789 | |
790 | -.PHONY: oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config |
791 | +PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-config |
792 | |
793 | xconfig: $(obj)/qconf |
794 | $< arch/$(ARCH)/Kconfig |
795 | @@ -42,7 +42,7 @@ update-po-config: $(obj)/kxgettext |
796 | $(Q)rm -f arch/um/Kconfig_arch |
797 | $(Q)rm -f scripts/kconfig/linux_*.pot scripts/kconfig/config.pot |
798 | |
799 | -.PHONY: randconfig allyesconfig allnoconfig allmodconfig defconfig |
800 | +PHONY += randconfig allyesconfig allnoconfig allmodconfig defconfig |
801 | |
802 | randconfig: $(obj)/conf |
803 | $< -r arch/$(ARCH)/Kconfig |
804 | Index: linux-2.6.16-ck2/scripts/kconfig/lxdialog/Makefile |
805 | =================================================================== |
806 | --- linux-2.6.16-ck2.orig/scripts/kconfig/lxdialog/Makefile 2006-03-20 20:11:47.000000000 +1100 |
807 | +++ linux-2.6.16-ck2/scripts/kconfig/lxdialog/Makefile 2006-03-29 21:30:36.000000000 +1000 |
808 | @@ -7,10 +7,10 @@ check-lxdialog := $(srctree)/$(src)/che |
809 | # we really need to do so. (Do not call gcc as part of make mrproper) |
810 | HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) |
811 | HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) |
812 | - |
813 | -HOST_EXTRACFLAGS += -DLOCALE |
814 | |
815 | -.PHONY: dochecklxdialog |
816 | +HOST_EXTRACFLAGS += -DLOCALE |
817 | + |
818 | +PHONY += dochecklxdialog |
819 | $(obj)/dochecklxdialog: |
820 | $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_LOADLIBES) |
821 | |
822 | Index: linux-2.6.16-ck2/scripts/package/Makefile |
823 | =================================================================== |
824 | --- linux-2.6.16-ck2.orig/scripts/package/Makefile 2006-03-20 20:11:47.000000000 +1100 |
825 | +++ linux-2.6.16-ck2/scripts/package/Makefile 2006-03-29 21:30:36.000000000 +1000 |
826 | @@ -32,7 +32,7 @@ MKSPEC := $(srctree)/scripts/package |
827 | PREV := set -e; cd ..; |
828 | |
829 | # rpm-pkg |
830 | -.PHONY: rpm-pkg rpm |
831 | +PHONY += rpm-pkg rpm |
832 | |
833 | $(objtree)/kernel.spec: $(MKSPEC) $(srctree)/Makefile |
834 | $(CONFIG_SHELL) $(MKSPEC) > $@ |
835 | @@ -54,10 +54,10 @@ rpm-pkg rpm: $(objtree)/kernel.spec |
836 | clean-files := $(objtree)/kernel.spec |
837 | |
838 | # binrpm-pkg |
839 | -.PHONY: binrpm-pkg |
840 | +PHONY += binrpm-pkg |
841 | $(objtree)/binkernel.spec: $(MKSPEC) $(srctree)/Makefile |
842 | $(CONFIG_SHELL) $(MKSPEC) prebuilt > $@ |
843 | - |
844 | + |
845 | binrpm-pkg: $(objtree)/binkernel.spec |
846 | $(MAKE) KBUILD_SRC= |
847 | set -e; \ |
848 | @@ -72,7 +72,7 @@ clean-files += $(objtree)/binkernel.spec |
849 | # Deb target |
850 | # --------------------------------------------------------------------------- |
851 | # |
852 | -.PHONY: deb-pkg |
853 | +PHONY += deb-pkg |
854 | deb-pkg: |
855 | $(MAKE) KBUILD_SRC= |
856 | $(CONFIG_SHELL) $(srctree)/scripts/package/builddeb |
857 | @@ -82,7 +82,7 @@ clean-dirs += $(objtree)/debian/ |
858 | |
859 | # tarball targets |
860 | # --------------------------------------------------------------------------- |
861 | -.PHONY: tar%pkg |
862 | +PHONY += tar%pkg |
863 | tar%pkg: |
864 | $(MAKE) KBUILD_SRC= |
865 | $(CONFIG_SHELL) $(srctree)/scripts/package/buildtar $@ |