diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 14:23:06 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 14:23:06 -0400 |
commit | 821f3eff7cdb9d6c7076effabd46c96c322daed1 (patch) | |
tree | 60f13155196fd6c84424c8aebc133ca4a5f56749 /scripts/Makefile.build | |
parent | ebc283118ee448dcb6e6cae74a8a43f17a1ccc3f (diff) | |
parent | f77bf01425b11947eeb3b5b54685212c302741b8 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (40 commits)
kbuild: introduce ccflags-y, asflags-y and ldflags-y
kbuild: enable 'make CPPFLAGS=...' to add additional options to CPP
kbuild: enable use of AFLAGS and CFLAGS on commandline
kbuild: enable 'make AFLAGS=...' to add additional options to AS
kbuild: fix AFLAGS use in h8300 and m68knommu
kbuild: check for wrong use of CFLAGS
kbuild: enable 'make CFLAGS=...' to add additional options to CC
kbuild: fix up CFLAGS usage
kbuild: make modpost detect unterminated device id lists
kbuild: call export_report from the Makefile
kbuild: move Kai Germaschewski to CREDITS
kconfig/menuconfig: distinguish between selected-by-another options and comments
kconfig: tristate choices with mixed tristate and boolean values
include/linux/Kbuild: remove duplicate entries
kbuild: kill backward compatibility checks
kbuild: kill EXTRA_ARFLAGS
kbuild: fix documentation in makefiles.txt
kbuild: call make once for all targets when O=.. is used
kbuild: pass -g to assembler under CONFIG_DEBUG_INFO
kbuild: update _shipped files for kconfig syntax cleanup
...
Fix up conflicts in arch/um/sys-{x86_64,i386}/Makefile manually.
Diffstat (limited to 'scripts/Makefile.build')
-rw-r--r-- | scripts/Makefile.build | 45 |
1 files changed, 17 insertions, 28 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 7fd6055bedfd..de9836eee8bb 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build | |||
@@ -22,16 +22,30 @@ EXTRA_AFLAGS := | |||
22 | EXTRA_CFLAGS := | 22 | EXTRA_CFLAGS := |
23 | EXTRA_CPPFLAGS := | 23 | EXTRA_CPPFLAGS := |
24 | EXTRA_LDFLAGS := | 24 | EXTRA_LDFLAGS := |
25 | asflags-y := | ||
26 | ccflags-y := | ||
27 | cppflags-y := | ||
28 | ldflags-y := | ||
25 | 29 | ||
26 | # Read .config if it exist, otherwise ignore | 30 | # Read .config if it exist, otherwise ignore |
27 | -include include/config/auto.conf | 31 | -include include/config/auto.conf |
28 | 32 | ||
29 | include scripts/Kbuild.include | 33 | include scripts/Kbuild.include |
30 | 34 | ||
35 | # For backward compatibility check that these variables does not change | ||
36 | save-cflags := $(CFLAGS) | ||
37 | |||
31 | # The filename Kbuild has precedence over Makefile | 38 | # The filename Kbuild has precedence over Makefile |
32 | kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src)) | 39 | kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src)) |
33 | include $(if $(wildcard $(kbuild-dir)/Kbuild), $(kbuild-dir)/Kbuild, $(kbuild-dir)/Makefile) | 40 | kbuild-file := $(if $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Kbuild,$(kbuild-dir)/Makefile) |
34 | 41 | include $(kbuild-file) | |
42 | |||
43 | # If the save-* variables changed error out | ||
44 | ifeq ($(KBUILD_NOPEDANTIC),) | ||
45 | ifneq ("$(save-cflags)","$(CFLAGS)") | ||
46 | $(error CFLAGS was changed in "$(kbuild-file)". Fix it to use EXTRA_CFLAGS) | ||
47 | endif | ||
48 | endif | ||
35 | include scripts/Makefile.lib | 49 | include scripts/Makefile.lib |
36 | 50 | ||
37 | ifdef host-progs | 51 | ifdef host-progs |
@@ -55,31 +69,6 @@ _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) | |||
55 | _dummy := $(foreach d,$(obj-dirs), $(shell [ -d $(d) ] || mkdir -p $(d))) | 69 | _dummy := $(foreach d,$(obj-dirs), $(shell [ -d $(d) ] || mkdir -p $(d))) |
56 | endif | 70 | endif |
57 | 71 | ||
58 | |||
59 | ifdef EXTRA_TARGETS | ||
60 | $(warning kbuild: $(obj)/Makefile - Usage of EXTRA_TARGETS is obsolete in 2.6. Please fix!) | ||
61 | endif | ||
62 | |||
63 | ifdef build-targets | ||
64 | $(warning kbuild: $(obj)/Makefile - Usage of build-targets is obsolete in 2.6. Please fix!) | ||
65 | endif | ||
66 | |||
67 | ifdef export-objs | ||
68 | $(warning kbuild: $(obj)/Makefile - Usage of export-objs is obsolete in 2.6. Please fix!) | ||
69 | endif | ||
70 | |||
71 | ifdef O_TARGET | ||
72 | $(warning kbuild: $(obj)/Makefile - Usage of O_TARGET := $(O_TARGET) is obsolete in 2.6. Please fix!) | ||
73 | endif | ||
74 | |||
75 | ifdef L_TARGET | ||
76 | $(error kbuild: $(obj)/Makefile - Use of L_TARGET is replaced by lib-y in 2.6. Please fix!) | ||
77 | endif | ||
78 | |||
79 | ifdef list-multi | ||
80 | $(warning kbuild: $(obj)/Makefile - list-multi := $(list-multi) is obsolete in 2.6. Please fix!) | ||
81 | endif | ||
82 | |||
83 | ifndef obj | 72 | ifndef obj |
84 | $(warning kbuild: Makefile.build is included improperly) | 73 | $(warning kbuild: Makefile.build is included improperly) |
85 | endif | 74 | endif |
@@ -291,7 +280,7 @@ endif # builtin-target | |||
291 | # | 280 | # |
292 | ifdef lib-target | 281 | ifdef lib-target |
293 | quiet_cmd_link_l_target = AR $@ | 282 | quiet_cmd_link_l_target = AR $@ |
294 | cmd_link_l_target = rm -f $@; $(AR) $(EXTRA_ARFLAGS) rcs $@ $(lib-y) | 283 | cmd_link_l_target = rm -f $@; $(AR) rcs $@ $(lib-y) |
295 | 284 | ||
296 | $(lib-target): $(lib-y) FORCE | 285 | $(lib-target): $(lib-y) FORCE |
297 | $(call if_changed,link_l_target) | 286 | $(call if_changed,link_l_target) |