diff options
author | Sam Ravnborg <sam@mars.ravnborg.org> | 2004-10-17 05:17:08 +0200 |
---|---|---|
committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2004-10-17 05:17:08 +0200 |
commit | 3420779a0b3ce45a291707159b7e3781f11b9ca3 (patch) | |
tree | 49c9cdc3fb6caf712c37284e2c97cc2a731051fe /Makefile | |
parent | 111cf588d3fdb9b9bb596bfd38705ccc690499d7 (diff) | |
download | history-3420779a0b3ce45a291707159b7e3781f11b9ca3.tar.gz |
kbuild: Create Makefile in output dir for *config targets
Upon request from Andi Kleen the Makefile is now created for *config
targets also. So the MAkefile in the output directory is present when
it is expected (after kernel configuration).
Also tell user the Makefile is generated.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/Makefile b/Makefile index ca99b34e826bc0..7c43405502d940 100644 --- a/Makefile +++ b/Makefile @@ -379,6 +379,18 @@ RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CV scripts_basic: $(Q)$(MAKE) $(build)=scripts/basic +.PHONY: outputmakefile +# outputmakefile generate a Makefile to be placed in output directory, if +# using a seperate output directory. This allows convinient use +# of make in output directory +outputmakefile: + $(Q)if /usr/bin/env test ! $(srctree) -ef $(objtree); then \ + $(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \ + $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) \ + > $(objtree)/Makefile; \ + echo ' GEN $(objtree)/Makefile'; \ + fi + # To make sure we do not include .config for any of the *config targets # catch them early, and hand them over to scripts/kconfig/Makefile # It is allowed to specify more targets when calling make, including @@ -423,9 +435,9 @@ ifeq ($(config-targets),1) # *config targets only - make sure prerequisites are updated, and descend # in scripts/kconfig to make the *config target -config: scripts_basic FORCE +config: scripts_basic outputmakefile FORCE $(Q)$(MAKE) $(build)=scripts/kconfig $@ -%config: scripts_basic FORCE +%config: scripts_basic outputmakefile FORCE $(Q)$(MAKE) $(build)=scripts/kconfig $@ else @@ -711,22 +723,12 @@ $(vmlinux-dirs): prepare-all scripts .PHONY: prepare-all prepare prepare0 prepare1 prepare2 -# prepare 2 generate Makefile to be placed in output directory, if -# using a seperate output directory. This allows convinient use -# of make in output directory -prepare2: - $(Q)if /usr/bin/env test ! $(srctree) -ef $(objtree); then \ - $(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \ - $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) \ - > $(objtree)/Makefile; \ - fi - -# prepare1 is used to check if we are building in a separate output directory, +# prepare2 is used to check if we are building in a separate output directory, # and if so do: # 1) Check that make has not been executed in the kernel src $(srctree) # 2) Create the include2 directory, used for the second asm symlink -prepare1: prepare2 +prepare2: ifneq ($(KBUILD_SRC),) @echo ' Using $(srctree) as source for kernel' $(Q)if [ -h $(srctree)/include/asm -o -f $(srctree)/.config ]; then \ @@ -738,6 +740,9 @@ ifneq ($(KBUILD_SRC),) $(Q)ln -fsn $(srctree)/include/asm-$(ARCH) include2/asm endif +# prepare1 creates a makefile if using a separate output directory +prepare1: prepare2 outputmakefile + prepare0: prepare1 include/linux/version.h include/asm include/config/MARKER ifneq ($(KBUILD_MODULES),) $(Q)rm -rf $(MODVERDIR) |