diff options
author | Milton Miller <miltonm@bga.com> | 2007-03-21 11:02:37 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2007-03-26 01:11:20 -0400 |
commit | 235fd8354528a7dabb3b6050ca4d201549a6f858 (patch) | |
tree | df7db10709cef8429155899599f38d4ee01bdb1b /arch/powerpc/boot | |
parent | 160cc3ece727c5158facec9937c2a5b10013bae1 (diff) |
[POWERPC] boot: Use FORCE
Kbuild if_changed and if_changed_dep require the use of the dummy
FORCE to get the dependencies right. Also add to targets to get
correct behavior.
Signed-off-by: Milton Miller <miltonm@bga.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/boot')
-rw-r--r-- | arch/powerpc/boot/Makefile | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile index d777cf909b46..113af8877d60 100644 --- a/arch/powerpc/boot/Makefile +++ b/arch/powerpc/boot/Makefile | |||
@@ -85,24 +85,25 @@ quiet_cmd_bootas = BOOTAS $@ | |||
85 | cmd_bootas = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $< | 85 | cmd_bootas = $(CROSS32CC) -Wp,-MD,$(depfile) $(BOOTAFLAGS) -c -o $@ $< |
86 | 86 | ||
87 | quiet_cmd_bootar = BOOTAR $@ | 87 | quiet_cmd_bootar = BOOTAR $@ |
88 | cmd_bootar = $(CROSS32AR) -cr $@.$$$$ $^; mv $@.$$$$ $@ | 88 | cmd_bootar = $(CROSS32AR) -cr $@.$$$$ $(filter-out FORCE,$^); mv $@.$$$$ $@ |
89 | 89 | ||
90 | $(patsubst %.c,%.o, $(filter %.c, $(src-boot))): %.o: %.c | 90 | $(patsubst %.c,%.o, $(filter %.c, $(src-boot))): %.o: %.c FORCE |
91 | $(call if_changed_dep,bootcc) | 91 | $(call if_changed_dep,bootcc) |
92 | $(patsubst %.S,%.o, $(filter %.S, $(src-boot))): %.o: %.S | 92 | $(patsubst %.S,%.o, $(filter %.S, $(src-boot))): %.o: %.S FORCE |
93 | $(call if_changed_dep,bootas) | 93 | $(call if_changed_dep,bootas) |
94 | 94 | ||
95 | $(obj)/wrapper.a: $(obj-wlib) | 95 | $(obj)/wrapper.a: $(obj-wlib) FORCE |
96 | $(call cmd,bootar) | 96 | $(call if_changed,bootar) |
97 | 97 | ||
98 | hostprogs-y := addnote addRamDisk hack-coff mktree | 98 | hostprogs-y := addnote addRamDisk hack-coff mktree |
99 | 99 | ||
100 | targets += $(patsubst $(obj)/%,%,$(obj-boot) wrapper.a) | ||
100 | extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \ | 101 | extra-y := $(obj)/wrapper.a $(obj-plat) $(obj)/empty.o \ |
101 | $(obj)/zImage.lds $(obj)/zImage.coff.lds | 102 | $(obj)/zImage.lds $(obj)/zImage.coff.lds |
102 | 103 | ||
103 | wrapper :=$(srctree)/$(src)/wrapper | 104 | wrapper :=$(srctree)/$(src)/wrapper |
104 | wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \ | 105 | wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \ |
105 | $(wrapper) | 106 | $(wrapper) FORCE |
106 | 107 | ||
107 | ############# | 108 | ############# |
108 | # Bits for building various flavours of zImage | 109 | # Bits for building various flavours of zImage |
@@ -122,34 +123,34 @@ quiet_cmd_wrap_initrd = WRAP $@ | |||
122 | -i $(obj)/ramdisk.image.gz vmlinux | 123 | -i $(obj)/ramdisk.image.gz vmlinux |
123 | 124 | ||
124 | $(obj)/zImage.chrp: vmlinux $(wrapperbits) | 125 | $(obj)/zImage.chrp: vmlinux $(wrapperbits) |
125 | $(call cmd,wrap,chrp) | 126 | $(call if_changed,wrap,chrp) |
126 | 127 | ||
127 | $(obj)/zImage.initrd.chrp: vmlinux $(wrapperbits) | 128 | $(obj)/zImage.initrd.chrp: vmlinux $(wrapperbits) |
128 | $(call cmd,wrap_initrd,chrp) | 129 | $(call if_changed,wrap_initrd,chrp) |
129 | 130 | ||
130 | $(obj)/zImage.pseries: vmlinux $(wrapperbits) | 131 | $(obj)/zImage.pseries: vmlinux $(wrapperbits) |
131 | $(call cmd,wrap,pseries) | 132 | $(call if_changed,wrap,pseries) |
132 | 133 | ||
133 | $(obj)/zImage.initrd.pseries: vmlinux $(wrapperbits) | 134 | $(obj)/zImage.initrd.pseries: vmlinux $(wrapperbits) |
134 | $(call cmd,wrap_initrd,pseries) | 135 | $(call if_changed,wrap_initrd,pseries) |
135 | 136 | ||
136 | $(obj)/zImage.pmac: vmlinux $(wrapperbits) | 137 | $(obj)/zImage.pmac: vmlinux $(wrapperbits) |
137 | $(call cmd,wrap,pmac) | 138 | $(call if_changed,wrap,pmac) |
138 | 139 | ||
139 | $(obj)/zImage.initrd.pmac: vmlinux $(wrapperbits) | 140 | $(obj)/zImage.initrd.pmac: vmlinux $(wrapperbits) |
140 | $(call cmd,wrap_initrd,pmac) | 141 | $(call if_changed,wrap_initrd,pmac) |
141 | 142 | ||
142 | $(obj)/zImage.coff: vmlinux $(wrapperbits) | 143 | $(obj)/zImage.coff: vmlinux $(wrapperbits) |
143 | $(call cmd,wrap,pmaccoff) | 144 | $(call if_changed,wrap,pmaccoff) |
144 | 145 | ||
145 | $(obj)/zImage.initrd.coff: vmlinux $(wrapperbits) | 146 | $(obj)/zImage.initrd.coff: vmlinux $(wrapperbits) |
146 | $(call cmd,wrap_initrd,pmaccoff) | 147 | $(call if_changed,wrap_initrd,pmaccoff) |
147 | 148 | ||
148 | $(obj)/zImage.miboot: vmlinux $(wrapperbits) | 149 | $(obj)/zImage.miboot: vmlinux $(wrapperbits) |
149 | $(call cmd,wrap,miboot) | 150 | $(call if_changed,wrap,miboot) |
150 | 151 | ||
151 | $(obj)/zImage.initrd.miboot: vmlinux $(wrapperbits) | 152 | $(obj)/zImage.initrd.miboot: vmlinux $(wrapperbits) |
152 | $(call cmd,wrap_initrd,miboot) | 153 | $(call if_changed,wrap_initrd,miboot) |
153 | 154 | ||
154 | $(obj)/zImage.ps3: vmlinux | 155 | $(obj)/zImage.ps3: vmlinux |
155 | $(STRIP) -s -R .comment $< -o $@ | 156 | $(STRIP) -s -R .comment $< -o $@ |
@@ -158,7 +159,7 @@ $(obj)/zImage.initrd.ps3: vmlinux | |||
158 | @echo " WARNING zImage.initrd.ps3 not supported (yet)" | 159 | @echo " WARNING zImage.initrd.ps3 not supported (yet)" |
159 | 160 | ||
160 | $(obj)/uImage: vmlinux $(wrapperbits) | 161 | $(obj)/uImage: vmlinux $(wrapperbits) |
161 | $(call cmd,wrap,uboot) | 162 | $(call if_changed,wrap,uboot) |
162 | 163 | ||
163 | image-$(CONFIG_PPC_PSERIES) += zImage.pseries | 164 | image-$(CONFIG_PPC_PSERIES) += zImage.pseries |
164 | image-$(CONFIG_PPC_MAPLE) += zImage.pseries | 165 | image-$(CONFIG_PPC_MAPLE) += zImage.pseries |
@@ -177,6 +178,7 @@ image-$(CONFIG_PPC_PMAC) += zImage.coff zImage.miboot | |||
177 | endif | 178 | endif |
178 | 179 | ||
179 | initrd-y := $(patsubst zImage%, zImage.initrd%, $(image-y)) | 180 | initrd-y := $(patsubst zImage%, zImage.initrd%, $(image-y)) |
181 | targets += $(image-y) $(initrd-y) | ||
180 | 182 | ||
181 | $(obj)/zImage: $(addprefix $(obj)/, $(image-y)) | 183 | $(obj)/zImage: $(addprefix $(obj)/, $(image-y)) |
182 | @rm -f $@; ln $< $@ | 184 | @rm -f $@; ln $< $@ |