diff options
author | Sam Ravnborg <sam@mars.ravnborg.org> | 2003-03-10 01:16:02 +0100 |
---|---|---|
committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2003-03-10 01:16:02 +0100 |
commit | f94e5fd7e5d09a56a60670a9bb211a791654bba8 (patch) | |
tree | d7b7bb2b69b850191811d6d02c91ca6cbd0871be /scripts | |
parent | 0be6a9a0863c2c1a99f0747c6283450b699dcaf9 (diff) | |
download | history-f94e5fd7e5d09a56a60670a9bb211a791654bba8.tar.gz |
kbuild: Introduced extra-y, as replacement for EXTRA_TARGETS
EXTRA_TARGETS has been overloaded with functionality.
This is now split in two:
targets := list targets kbuild did not know of otherwise
extra-y := list targets to be build when not building modules only.
extra-y is mainly used to list .o files that is not to be included
in the fnal built-in.o file for a directory.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.build | 8 | ||||
-rw-r--r-- | scripts/Makefile.clean | 4 | ||||
-rw-r--r-- | scripts/Makefile.lib | 6 |
3 files changed, 12 insertions, 6 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 7f5fbbd1111cc..d54b2dc5d1e83 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -15,6 +15,10 @@ include $(obj)/Makefile include scripts/Makefile.lib +ifdef EXTRA_TARGETS +$(warning kbuild: $(obj)/Makefile - Usage of EXTRA_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 @@ -53,7 +57,7 @@ endif touch-module = @echo $(@:.o=.ko) > $(MODVERDIR)/$(@F:.o=.mod) -__build: $(if $(KBUILD_BUILTIN),$(O_TARGET) $(L_TARGET) $(EXTRA_TARGETS)) \ +__build: $(if $(KBUILD_BUILTIN),$(O_TARGET) $(L_TARGET) $(extra-y)) \ $(if $(KBUILD_MODULES),$(obj-m)) \ $(subdir-ym) $(build-targets) @: @@ -198,7 +202,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_TARGETS) $(MAKECMDGOALS) \ +targets += $(real-objs-y) $(real-objs-m) $(extra-y) $(MAKECMDGOALS) \ $(build-targets) # Build the compiled-in targets diff --git a/scripts/Makefile.clean b/scripts/Makefile.clean index 38079baa96a03..a4eaa129063c1 100644 --- a/scripts/Makefile.clean +++ b/scripts/Makefile.clean @@ -28,7 +28,7 @@ subdir-ymn := $(sort $(subdir-ym) $(subdir-n) $(subdir-)) # Add subdir path -EXTRA_TARGETS := $(addprefix $(obj)/,$(EXTRA_TARGETS)) +extra-y := $(addprefix $(obj)/,$(extra-y) $(EXTRA_TARGETS)) targets := $(addprefix $(obj)/,$(targets)) clean-files := $(addprefix $(obj)/,$(clean-files)) host-progs := $(addprefix $(obj)/,$(host-progs)) @@ -36,7 +36,7 @@ subdir-ymn := $(addprefix $(obj)/,$(subdir-ymn)) # ========================================================================== -__clean-files := $(wildcard $(EXTRA_TARGETS) $(host-progs) $(clean-files) $(targets)) +__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 4570f739628e8..81952e85d25f5 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -8,6 +8,8 @@ comma := , empty := space := $(empty) $(empty) +# Backward compatibility - to be removed... +extra-y += $(EXTRA_TARGETS) # Figure out what we need to build from the various variables # =========================================================================== @@ -51,7 +53,7 @@ multi-objs := $(multi-objs-y) $(multi-objs-m) subdir-obj-y := $(foreach o,$(obj-y),$(if $(filter-out $(o),$(notdir $(o))),$(o))) # Replace multi-part objects by their individual parts, look at local dir only -real-objs-y := $(foreach m, $(filter-out $(subdir-obj-y), $(obj-y)), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m))) $(EXTRA_TARGETS) +real-objs-y := $(foreach m, $(filter-out $(subdir-obj-y), $(obj-y)), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m))) $(extra-y) real-objs-m := $(foreach m, $(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m))) # C code @@ -84,7 +86,7 @@ host-cshobjs := $(sort $(foreach m,$(host-cshlib),$($(m:.so=-objs)))) # Add subdir path -EXTRA_TARGETS := $(addprefix $(obj)/,$(EXTRA_TARGETS)) +extra-y := $(addprefix $(obj)/,$(extra-y)) build-targets := $(addprefix $(obj)/,$(build-targets)) targets := $(addprefix $(obj)/,$(targets)) obj-y := $(addprefix $(obj)/,$(obj-y)) |