Commit 87b2da2b authored by Sam Ravnborg's avatar Sam Ravnborg

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
parent f94e5fd7
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
......
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
......
......@@ -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
......
......@@ -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
# ---------------------------------------------------------------------------
......
......@@ -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)
......
......@@ -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))
......
host-progs := genksyms
build-targets := $(host-progs)
always := $(host-progs)
genksyms-objs := genksyms.o parse.o lex.o
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment