From 0be6a9a0863c2c1a99f0747c6283450b699dcaf9 Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Mon, 10 Mar 2003 00:47:49 +0100 Subject: kbuild: Use targets := to tell kbuild about additional targets EXTRA_TARGETS served several purposes before: 1) List targets to be build (built-in only) 2) Inform kbuild of targets within the makefile Mixing the above are causing confusion, so for now on targets := is used to inform kbuild about targets in a Makefile - that it otherwise did not know about. kbuild uses the "targets :=" information to: a) read the dependency file .target.cmd b) delete the target file during make clean --- scripts/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/Makefile') diff --git a/scripts/Makefile b/scripts/Makefile index 3b00318d0bc6..cf1ba16eb69c 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -32,4 +32,4 @@ quiet_cmd_elfconfig = MKELF $@ $(obj)/elfconfig.h: $(obj)/empty.o $(obj)/mk_elfconfig FORCE $(call if_changed,elfconfig) -targets += $(obj)/elfconfig.h +targets += elfconfig.h -- cgit v1.2.3 From 87b2da2b95644551d44dce487b818155bd4b0f9c Mon Sep 17 00:00:00 2001 From: Sam Ravnborg Date: Tue, 11 Mar 2003 00:03:40 +0100 Subject: kbuild: build-targets replaced with always The former name "kbuild-targets" did not give the user the intuitive feeling that this target will be build regards less of any dependencies no matter if we compile modules or not. The new name "always" imply that this will be build always, and tus is more informative. Fixed the few users of build-targets, and added a warning in Makefile.build --- arch/um/sys-i386/util/Makefile | 2 +- arch/um/util/Makefile | 2 +- scripts/Makefile | 10 +++++----- scripts/Makefile.build | 9 ++++++--- scripts/Makefile.clean | 9 +++------ scripts/Makefile.lib | 2 +- scripts/genksyms/Makefile | 2 +- scripts/lxdialog/Makefile | 4 ++-- 8 files changed, 20 insertions(+), 20 deletions(-) (limited to 'scripts/Makefile') diff --git a/arch/um/sys-i386/util/Makefile b/arch/um/sys-i386/util/Makefile index 48a2109c958b..a3eca5f22f08 100644 --- a/arch/um/sys-i386/util/Makefile +++ b/arch/um/sys-i386/util/Makefile @@ -1,6 +1,6 @@ host-progs := mk_sc -build-targets := $(host-progs) mk_thread +always := $(host-progs) mk_thread targets := mk_thread_kern.o mk_thread_user.o mk_sc-objs := mk_sc.o diff --git a/arch/um/util/Makefile b/arch/um/util/Makefile index 4c91c1e7273e..defd03861eaa 100644 --- a/arch/um/util/Makefile +++ b/arch/um/util/Makefile @@ -1,4 +1,4 @@ -build-targets := mk_task mk_constants +always := mk_task mk_constants targets := mk_task_user.o mk_task_kern.o \ mk_constants_user.o mk_constants_kern.o diff --git a/scripts/Makefile b/scripts/Makefile index cf1ba16eb69c..658b93f061ac 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -8,11 +8,11 @@ # docproc: Preprocess .tmpl file in order to generate .sgml docs # conmakehash: Create arrays for initializing the kernel console tables -host-progs := fixdep split-include conmakehash docproc kallsyms modpost \ - mk_elfconfig -build-targets := $(host-progs) empty.o +host-progs := fixdep split-include conmakehash docproc kallsyms modpost \ + mk_elfconfig +always := $(host-progs) empty.o -modpost-objs := modpost.o file2alias.o +modpost-objs := modpost.o file2alias.o subdir-$(CONFIG_MODVERSIONS) += genksyms @@ -20,7 +20,7 @@ subdir-$(CONFIG_MODVERSIONS) += genksyms subdir- += lxdialog kconfig # fixdep is needed to compile other host programs -$(addprefix $(obj)/,$(filter-out fixdep,$(build-targets)) $(subdir-y)): $(obj)/fixdep +$(addprefix $(obj)/,$(filter-out fixdep,$(always)) $(subdir-y)): $(obj)/fixdep # dependencies on generated files need to be listed explicitly diff --git a/scripts/Makefile.build b/scripts/Makefile.build index d54b2dc5d1e8..4f3f9e3346a9 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -19,6 +19,10 @@ ifdef EXTRA_TARGETS $(warning kbuild: $(obj)/Makefile - Usage of EXTRA_TARGETS is obsolete in 2.5. Please fix!) endif +ifdef build-targets +$(warning kbuild: $(obj)/Makefile - Usage of build-targets is obsolete in 2.5. Please fix!) +endif + ifdef export-objs $(warning kbuild: $(obj)/Makefile - Usage of export-objs is obsolete in 2.5. Please fix!) endif @@ -59,7 +63,7 @@ touch-module = @echo $(@:.o=.ko) > $(MODVERDIR)/$(@F:.o=.mod) __build: $(if $(KBUILD_BUILTIN),$(O_TARGET) $(L_TARGET) $(extra-y)) \ $(if $(KBUILD_MODULES),$(obj-m)) \ - $(subdir-ym) $(build-targets) + $(subdir-ym) $(always) @: # Module versioning @@ -202,8 +206,7 @@ cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $< %.o: %.S FORCE $(call if_changed_dep,as_o_S) -targets += $(real-objs-y) $(real-objs-m) $(extra-y) $(MAKECMDGOALS) \ - $(build-targets) +targets += $(real-objs-y) $(real-objs-m) $(extra-y) $(MAKECMDGOALS) $(always) # Build the compiled-in targets # --------------------------------------------------------------------------- diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean index a4eaa129063c..dc734426699f 100644 --- a/scripts/Makefile.clean +++ b/scripts/Makefile.clean @@ -28,16 +28,13 @@ subdir-ymn := $(sort $(subdir-ym) $(subdir-n) $(subdir-)) # Add subdir path -extra-y := $(addprefix $(obj)/,$(extra-y) $(EXTRA_TARGETS)) -targets := $(addprefix $(obj)/,$(targets)) -clean-files := $(addprefix $(obj)/,$(clean-files)) -host-progs := $(addprefix $(obj)/,$(host-progs)) subdir-ymn := $(addprefix $(obj)/,$(subdir-ymn)) +__clean-files := $(wildcard $(addprefix $(obj)/, \ + $(extra-y) $(EXTRA_TARGETS) $(always) $(host-progs) \ + $(targets) $(clean-files))) # ========================================================================== -__clean-files := $(wildcard $(extra-y) $(host-progs) $(clean-files) $(targets)) - quiet_cmd_clean = CLEAN $(obj) cmd_clean = rm -f $(__clean-files); $(clean-rule) diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 81952e85d25f..5d4b44b7150a 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -87,7 +87,7 @@ host-cshobjs := $(sort $(foreach m,$(host-cshlib),$($(m:.so=-objs)))) # Add subdir path extra-y := $(addprefix $(obj)/,$(extra-y)) -build-targets := $(addprefix $(obj)/,$(build-targets)) +always := $(addprefix $(obj)/,$(always)) targets := $(addprefix $(obj)/,$(targets)) obj-y := $(addprefix $(obj)/,$(obj-y)) obj-m := $(addprefix $(obj)/,$(obj-m)) diff --git a/scripts/genksyms/Makefile b/scripts/genksyms/Makefile index 771d2dc303cf..6d9e57472fc1 100644 --- a/scripts/genksyms/Makefile +++ b/scripts/genksyms/Makefile @@ -1,6 +1,6 @@ host-progs := genksyms -build-targets := $(host-progs) +always := $(host-progs) genksyms-objs := genksyms.o parse.o lex.o diff --git a/scripts/lxdialog/Makefile b/scripts/lxdialog/Makefile index f4b40f078ee8..fe959bd22a6a 100644 --- a/scripts/lxdialog/Makefile +++ b/scripts/lxdialog/Makefile @@ -15,8 +15,8 @@ endif endif endif -host-progs := lxdialog -build-targets := $(host-progs) +host-progs := lxdialog +always := $(host-progs) lxdialog-objs := checklist.o menubox.o textbox.o yesno.o inputbox.o \ util.o lxdialog.o msgbox.o -- cgit v1.2.3