diff options
| author | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2002-04-25 05:31:20 -0500 |
|---|---|---|
| committer | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2002-04-25 05:31:20 -0500 |
| commit | 2dc251402852fdd4f97c02034b5049b3fbb3c060 (patch) | |
| tree | d5813b9a65b0c93394fee14e5a63549f57486048 /Rules.make | |
| parent | d00964963b45596e15aa0316f058860e9dac3285 (diff) | |
Rules.make cleanup
Get rid of traces of the old-style ALL_MOBJS variable.
This also fixes the following issue, which could cause a warning with
certain configs:
Makefiles (legally) do:
obj-$(CONFIG_SND_AD1848) += snd-pcm.o snd-timer.o snd.o
obj-$(CONFIG_SND_CS4231) += snd-pcm.o snd-timer.o snd.o snd-rawmidi.o
so when the first option is set to y, the second to m, we have e.g.
snd-pcm.o on both $(obj-y) and $(obj-m). We correctly don't build
the modular version in this case.
However, if snd-pcm.o was a multi-part object, we did automatically
generate a link rule for both the modular and the built-in version,
which caused a warning - that's now fixed.
Diffstat (limited to 'Rules.make')
| -rw-r--r-- | Rules.make | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Rules.make b/Rules.make index 9211f6d727a5..a20db464eafc 100644 --- a/Rules.make +++ b/Rules.make @@ -19,7 +19,6 @@ unexport SUB_DIRS unexport ALL_SUB_DIRS unexport MOD_SUB_DIRS unexport O_TARGET -unexport ALL_MOBJS unexport obj-y unexport obj-m @@ -34,6 +33,12 @@ unexport subdir- comma := , # +# When an object is listed to be built compiled-in and modular, +# only build the compiled-in version +# +obj-m := $(filter-out $(obj-y),$(obj-m)) + +# # Get things started. # first_rule: sub_dirs @@ -182,8 +187,7 @@ endif # # A rule to make modules # -ALL_MOBJS = $(filter-out $(obj-y), $(obj-m)) -ifneq "$(strip $(ALL_MOBJS))" "" +ifneq "$(strip $(obj-m))" "" MOD_DESTDIR := $(shell $(CONFIG_SHELL) $(TOPDIR)/scripts/pathdown.sh) endif @@ -200,14 +204,14 @@ $(patsubst %,_modinst_%,$(MOD_DIRS)) : dummy endif .PHONY: modules -modules: $(ALL_MOBJS) dummy \ +modules: $(obj-m) dummy \ $(patsubst %,_modsubdir_%,$(MOD_DIRS)) .PHONY: _modinst__ _modinst__: dummy -ifneq "$(strip $(ALL_MOBJS))" "" +ifneq "$(strip $(obj-m))" "" mkdir -p $(MODLIB)/kernel/$(MOD_DESTDIR) - cp $(ALL_MOBJS) $(MODLIB)/kernel/$(MOD_DESTDIR) + cp $(obj-m) $(MODLIB)/kernel/$(MOD_DESTDIR) endif .PHONY: modules_install |
