diff options
author | Paul Smith <psmith@gnu.org> | 2006-03-05 17:14:10 -0500 |
---|---|---|
committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2006-03-05 18:09:51 -0500 |
commit | 4f1933620f57145212cdbb1ac6ce099eeeb21c5a (patch) | |
tree | c083cce1f0acedd92be2ac6eb5e6c49ebd84ac46 /arch/ppc | |
parent | 7b75b13cda8bd21e8636ea985f76e1ce5bd1a470 (diff) |
kbuild: change kbuild to not rely on incorrect GNU make behavior
The kbuild system takes advantage of an incorrect behavior in GNU make.
Once this behavior is fixed, all files in the kernel rebuild every time,
even if nothing has changed. This patch ensures kbuild works with both
the incorrect and correct behaviors of GNU make.
For more details on the incorrect behavior, see:
http://lists.gnu.org/archive/html/bug-make/2006-03/msg00003.html
Changes in this patch:
- Keep all targets that are to be marked .PHONY in a variable, PHONY.
- Add .PHONY: $(PHONY) to mark them properly.
- Remove any $(PHONY) files from the $? list when determining whether
targets are up-to-date or not.
Signed-off-by: Paul Smith <psmith@gnu.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'arch/ppc')
-rw-r--r-- | arch/ppc/Makefile | 2 | ||||
-rw-r--r-- | arch/ppc/boot/Makefile | 5 | ||||
-rw-r--r-- | arch/ppc/boot/openfirmware/Makefile | 7 |
3 files changed, 10 insertions, 4 deletions
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 ($<)' |