Commit 4da35e71 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] Subject: [PATCH] kbuild SUBDIRS="more/ than/ one/"

From: Andreas Gruenbacher <agruen@suse.de>

Here is a patch that re-adds support for more than one directory in SUBDIRS.
We have a number of packages that use this.

The FORCE dependency of crmodverdir seems unnecessary; removing.

(acked by Sam)
parent e6d0a0a2
...@@ -110,7 +110,7 @@ $(if $(wildcard $(KBUILD_OUTPUT)),, \ ...@@ -110,7 +110,7 @@ $(if $(wildcard $(KBUILD_OUTPUT)),, \
$(filter-out _all,$(MAKECMDGOALS)) _all: $(filter-out _all,$(MAKECMDGOALS)) _all:
$(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \ $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \
KBUILD_SRC=$(CURDIR) KBUILD_VERBOSE=$(KBUILD_VERBOSE) \ KBUILD_SRC=$(CURDIR) KBUILD_VERBOSE=$(KBUILD_VERBOSE) \
KBUILD_CHECK=$(KBUILD_CHECK) KBUILD_EXTMOD=$(KBUILD_EXTMOD) \ KBUILD_CHECK=$(KBUILD_CHECK) KBUILD_EXTMOD="$(KBUILD_EXTMOD)" \
-f $(CURDIR)/Makefile $@ -f $(CURDIR)/Makefile $@
# Leave processing to above invocation of make # Leave processing to above invocation of make
...@@ -325,7 +325,7 @@ export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE ...@@ -325,7 +325,7 @@ export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE
# When compiling out-of-tree modules, put MODVERDIR in the module # When compiling out-of-tree modules, put MODVERDIR in the module
# tree rather than in the kernel tree. The kernel tree might # tree rather than in the kernel tree. The kernel tree might
# even be read-only. # even be read-only.
export MODVERDIR := $(if $(KBUILD_EXTMOD),$(KBUILD_EXTMOD)/).tmp_versions export MODVERDIR := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_versions
# The temporary file to save gcc -MD generated dependencies must not # The temporary file to save gcc -MD generated dependencies must not
# contain a comma # contain a comma
...@@ -952,15 +952,15 @@ else # KBUILD_EXTMOD ...@@ -952,15 +952,15 @@ else # KBUILD_EXTMOD
# We are always building modules # We are always building modules
KBUILD_MODULES := 1 KBUILD_MODULES := 1
.PHONY: crmodverdir .PHONY: crmodverdir
crmodverdir: FORCE crmodverdir:
$(Q)mkdir -p $(MODVERDIR) $(Q)mkdir -p $(MODVERDIR)
.PHONY: $(KBUILD_EXTMOD) module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD))
$(KBUILD_EXTMOD): crmodverdir FORCE .PHONY: $(module-dirs) modules
$(Q)$(MAKE) $(build)=$@ $(module-dirs): crmodverdir
$(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@)
.PHONY: modules modules: $(module-dirs)
modules: $(KBUILD_EXTMOD)
@echo ' Building modules, stage 2.'; @echo ' Building modules, stage 2.';
$(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost
...@@ -968,7 +968,7 @@ modules: $(KBUILD_EXTMOD) ...@@ -968,7 +968,7 @@ modules: $(KBUILD_EXTMOD)
modules_install: modules_install:
$(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modinst $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modinst
clean-dirs := _clean_$(KBUILD_EXTMOD) clean-dirs := $(addprefix _clean_,$(KBUILD_EXTMOD))
.PHONY: $(clean-dirs) clean .PHONY: $(clean-dirs) clean
$(clean-dirs): $(clean-dirs):
......
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