diff options
author | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2003-03-01 00:55:48 -0600 |
---|---|---|
committer | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2003-03-01 00:55:48 -0600 |
commit | 951e77ccaa2d6bcf932acd657e874a7bd168cea9 (patch) | |
tree | 9d270845ee76be0d22067f04eb49a258de771a38 /Makefile | |
parent | 2020d74b26b2efa75749f349d0d7661915ae0124 (diff) | |
download | history-951e77ccaa2d6bcf932acd657e874a7bd168cea9.tar.gz |
kbuild: Silence some warnings when building vmlinux
For some people (though not me), the '+' indicating that a command will
invoke a sub-make didn't propagated properly, and caused a warning.
Putting the command all into one line should fix that.
Plus some cosmetics and clean up the per_cpu check.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 37 |
1 files changed, 16 insertions, 21 deletions
diff --git a/Makefile b/Makefile index 6f464497c68ea..228bd815b5b63 100644 --- a/Makefile +++ b/Makefile @@ -319,36 +319,31 @@ define cmd_vmlinux__ endef # set -e makes the rule exit immediately on error -# Final awk script makes sure per-cpu vars are in per-cpu section, as -# old gcc (eg egcs 2.92.11) ignores section attribute if uninitialized. define rule_vmlinux__ - set -e - $(if $(filter .tmp_kallsyms%,$^),, - echo ' Generating build number' - . $(src)/scripts/mkversion > .tmp_version - mv -f .tmp_version .version - $(Q)$(MAKE) $(build)=init + set -e; \ + $(if $(filter .tmp_kallsyms%,$^),, \ + echo ' GEN .version'; \ + . $(src)/scripts/mkversion > .tmp_version; \ + mv -f .tmp_version .version; \ + $(MAKE) $(build)=init; \ ) - $(call cmd,vmlinux__) + $(call cmd,vmlinux__); \ echo 'cmd_$@ := $(cmd_vmlinux__)' > $(@D)/.$(@F).cmd endef -define rule_vmlinux_no_percpu - $(rule_vmlinux__) - $(NM) $@ | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map -endef - ifdef CONFIG_SMP +# Final awk script makes sure per-cpu vars are in per-cpu section, as +# old gcc (eg egcs 2.92.11) ignores section attribute if uninitialized. + +check_per_cpu = $(AWK) -f $(srctree)/scripts/per-cpu-check.awk < System.map +endif + define rule_vmlinux - $(rule_vmlinux_no_percpu) - $(AWK) -f $(srctree)/scripts/per-cpu-check.awk < System.map -endef -else -define rule_vmlinux - $(rule_vmlinux_no_percpu) + $(rule_vmlinux__) + $(NM) $@ | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map + $(check_per_cpu) endef -endif LDFLAGS_vmlinux += -T arch/$(ARCH)/vmlinux.lds.s |