aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/Makefile.build
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 11:48:48 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 11:48:48 -0500
commit2e1ca21d46aaef95101723fa402f39d3a95aba59 (patch)
treecd95efefb9ccb6ab4ac0589d01c06cdfc22cc989 /scripts/Makefile.build
parent315ab19a6d12d6af7b6957090822f3057ab7e80f (diff)
parenteae0f536f640bb95f2ad437a57c40c7d5683d1ac (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild
* master.kernel.org:/pub/scm/linux/kernel/git/sam/kbuild: (46 commits) kbuild: remove obsoleted scripts/reference_* files kbuild: fix make help & make *pkg kconfig: fix time ordering of writes to .kconfig.d and include/linux/autoconf.h Kconfig: remove the CONFIG_CC_ALIGN_* options kbuild: add -fverbose-asm to i386 Makefile kbuild: clean-up genksyms kbuild: Lindent genksyms.c kbuild: fix genksyms build error kbuild: in makefile.txt note that Makefile is preferred name for kbuild files kbuild: replace PHONY with FORCE kbuild: Fix bug in crc symbol generating of kernel and modules kbuild: change kbuild to not rely on incorrect GNU make behavior kbuild: when warning symbols exported twice now tell user this is the problem kbuild: fix make dir/file.xx when asm symlink is missing kbuild: in the section mismatch check try harder to find symbols kbuild: fix section mismatch check for unwind on IA64 kbuild: kill false positives from section mismatch warnings for powerpc kbuild: kill trailing whitespace in modpost & friends kbuild: small update of allnoconfig description kbuild: make namespace.pl CROSS_COMPILE happy ... Trivial conflict in arch/ppc/boot/Makefile manually fixed up
Diffstat (limited to 'scripts/Makefile.build')
-rw-r--r--scripts/Makefile.build27
1 files changed, 16 insertions, 11 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index c33e62bde6b0..e48e60da3040 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -4,17 +4,18 @@
4 4
5src := $(obj) 5src := $(obj)
6 6
7.PHONY: __build 7PHONY := __build
8__build: 8__build:
9 9
10# Read .config if it exist, otherwise ignore 10# Read .config if it exist, otherwise ignore
11-include .config 11-include .config
12 12
13include scripts/Kbuild.include
14
13# The filename Kbuild has precedence over Makefile 15# The filename Kbuild has precedence over Makefile
14kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src)) 16kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
15include $(if $(wildcard $(kbuild-dir)/Kbuild), $(kbuild-dir)/Kbuild, $(kbuild-dir)/Makefile) 17include $(if $(wildcard $(kbuild-dir)/Kbuild), $(kbuild-dir)/Kbuild, $(kbuild-dir)/Makefile)
16 18
17include scripts/Kbuild.include
18include scripts/Makefile.lib 19include scripts/Makefile.lib
19 20
20ifdef host-progs 21ifdef host-progs
@@ -128,7 +129,7 @@ $(multi-objs-y:.o=.s) : modname = $(modname-multi)
128$(multi-objs-y:.o=.lst) : modname = $(modname-multi) 129$(multi-objs-y:.o=.lst) : modname = $(modname-multi)
129 130
130quiet_cmd_cc_s_c = CC $(quiet_modtag) $@ 131quiet_cmd_cc_s_c = CC $(quiet_modtag) $@
131cmd_cc_s_c = $(CC) $(c_flags) -S -o $@ $< 132cmd_cc_s_c = $(CC) $(c_flags) -fverbose-asm -S -o $@ $<
132 133
133%.s: %.c FORCE 134%.s: %.c FORCE
134 $(call if_changed_dep,cc_s_c) 135 $(call if_changed_dep,cc_s_c)
@@ -165,7 +166,7 @@ cmd_cc_o_c = $(CC) $(c_flags) -c -o $(@D)/.tmp_$(@F) $<
165cmd_modversions = \ 166cmd_modversions = \
166 if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \ 167 if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \
167 $(CPP) -D__GENKSYMS__ $(c_flags) $< \ 168 $(CPP) -D__GENKSYMS__ $(c_flags) $< \
168 | $(GENKSYMS) \ 169 | $(GENKSYMS) -a $(ARCH) \
169 > $(@D)/.tmp_$(@F:.o=.ver); \ 170 > $(@D)/.tmp_$(@F:.o=.ver); \
170 \ 171 \
171 $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ 172 $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \
@@ -177,12 +178,10 @@ cmd_modversions = \
177endif 178endif
178 179
179define rule_cc_o_c 180define rule_cc_o_c
180 $(if $($(quiet)cmd_checksrc),echo ' $($(quiet)cmd_checksrc)';) \ 181 $(call echo-cmd,checksrc) $(cmd_checksrc) \
181 $(cmd_checksrc) \ 182 $(call echo-cmd,cc_o_c) $(cmd_cc_o_c); \
182 $(if $($(quiet)cmd_cc_o_c),echo ' $(call escsq,$($(quiet)cmd_cc_o_c))';) \
183 $(cmd_cc_o_c); \
184 $(cmd_modversions) \ 183 $(cmd_modversions) \
185 scripts/basic/fixdep $(depfile) $@ '$(call escsq,$(cmd_cc_o_c))' > $(@D)/.$(@F).tmp; \ 184 scripts/basic/fixdep $(depfile) $@ '$(call make-cmd,cc_o_c)' > $(@D)/.$(@F).tmp; \
186 rm -f $(depfile); \ 185 rm -f $(depfile); \
187 mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd 186 mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd
188endef 187endef
@@ -309,14 +308,14 @@ targets += $(multi-used-y) $(multi-used-m)
309# Descending 308# Descending
310# --------------------------------------------------------------------------- 309# ---------------------------------------------------------------------------
311 310
312.PHONY: $(subdir-ym) 311PHONY += $(subdir-ym)
313$(subdir-ym): 312$(subdir-ym):
314 $(Q)$(MAKE) $(build)=$@ 313 $(Q)$(MAKE) $(build)=$@
315 314
316# 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.
317# --------------------------------------------------------------------------- 316# ---------------------------------------------------------------------------
318 317
319.PHONY: FORCE 318PHONY += FORCE
320 319
321FORCE: 320FORCE:
322 321
@@ -331,3 +330,9 @@ cmd_files := $(wildcard $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd))
331ifneq ($(cmd_files),) 330ifneq ($(cmd_files),)
332 include $(cmd_files) 331 include $(cmd_files)
333endif 332endif
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)