Commit 7b38bd21 authored by Kai Germaschewski's avatar Kai Germaschewski

Small Rules.make cleanup

Get rid of long obsolete (and unused) MOD_IN_SUBDIRS and unnecessary
MOD_DIRS variable.
parent afae6f7c
...@@ -191,21 +191,19 @@ ifneq "$(strip $(obj-m))" "" ...@@ -191,21 +191,19 @@ ifneq "$(strip $(obj-m))" ""
MOD_DESTDIR := $(shell $(CONFIG_SHELL) $(TOPDIR)/scripts/pathdown.sh) MOD_DESTDIR := $(shell $(CONFIG_SHELL) $(TOPDIR)/scripts/pathdown.sh)
endif endif
unexport MOD_DIRS ifneq "$(strip $(MOD_SUB_DIRS))" ""
MOD_DIRS := $(MOD_SUB_DIRS) $(MOD_IN_SUB_DIRS) .PHONY: $(patsubst %,_modsubdir_%,$(MOD_SUB_DIRS))
ifneq "$(strip $(MOD_DIRS))" "" $(patsubst %,_modsubdir_%,$(MOD_SUB_DIRS)) : dummy
.PHONY: $(patsubst %,_modsubdir_%,$(MOD_DIRS))
$(patsubst %,_modsubdir_%,$(MOD_DIRS)) : dummy
$(MAKE) -C $(patsubst _modsubdir_%,%,$@) modules $(MAKE) -C $(patsubst _modsubdir_%,%,$@) modules
.PHONY: $(patsubst %,_modinst_%,$(MOD_DIRS)) .PHONY: $(patsubst %,_modinst_%,$(MOD_SUB_DIRS))
$(patsubst %,_modinst_%,$(MOD_DIRS)) : dummy $(patsubst %,_modinst_%,$(MOD_SUB_DIRS)) : dummy
$(MAKE) -C $(patsubst _modinst_%,%,$@) modules_install $(MAKE) -C $(patsubst _modinst_%,%,$@) modules_install
endif endif
.PHONY: modules .PHONY: modules
modules: $(obj-m) dummy \ modules: $(obj-m) dummy \
$(patsubst %,_modsubdir_%,$(MOD_DIRS)) $(patsubst %,_modsubdir_%,$(MOD_SUB_DIRS))
.PHONY: _modinst__ .PHONY: _modinst__
_modinst__: dummy _modinst__: dummy
...@@ -216,7 +214,7 @@ endif ...@@ -216,7 +214,7 @@ endif
.PHONY: modules_install .PHONY: modules_install
modules_install: _modinst__ \ modules_install: _modinst__ \
$(patsubst %,_modinst_%,$(MOD_DIRS)) $(patsubst %,_modinst_%,$(MOD_SUB_DIRS))
# #
# A rule to do nothing # A rule to do nothing
......
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