diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-05-09 04:22:48 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-05-09 04:22:48 +0200 |
commit | 7fb68f199f037cb69363c8df5c934a27adc699f7 (patch) | |
tree | 2eb01a3bc4b3caf6bd7dd4fed6984716fd7ca89a /Makefile | |
parent | 6774386d95cec54258f23f69bc287c99e205ebdf (diff) | |
download | busybox-w32-7fb68f199f037cb69363c8df5c934a27adc699f7.tar.gz busybox-w32-7fb68f199f037cb69363c8df5c934a27adc699f7.tar.bz2 busybox-w32-7fb68f199f037cb69363c8df5c934a27adc699f7.zip |
make it possible to keep Config/Kbuild snippets in *.c files
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -377,6 +377,11 @@ ifneq ($(KBUILD_SRC),) | |||
377 | $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) | 377 | $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) |
378 | endif | 378 | endif |
379 | 379 | ||
380 | # This target generates Kbuild's and Config.in's from *.c files | ||
381 | PHONY += gen_build_files | ||
382 | gen_build_files: | ||
383 | $(Q)$(srctree)/scripts/gen_build_files.sh $(srctree) $(objtree) | ||
384 | |||
380 | # To make sure we do not include .config for any of the *config targets | 385 | # To make sure we do not include .config for any of the *config targets |
381 | # catch them early, and hand them over to scripts/kconfig/Makefile | 386 | # catch them early, and hand them over to scripts/kconfig/Makefile |
382 | # It is allowed to specify more targets when calling make, including | 387 | # It is allowed to specify more targets when calling make, including |
@@ -428,7 +433,7 @@ ifeq ($(config-targets),1) | |||
428 | -include $(srctree)/arch/$(ARCH)/Makefile | 433 | -include $(srctree)/arch/$(ARCH)/Makefile |
429 | export KBUILD_DEFCONFIG | 434 | export KBUILD_DEFCONFIG |
430 | 435 | ||
431 | config %config: scripts_basic outputmakefile FORCE | 436 | config %config: scripts_basic outputmakefile gen_build_files FORCE |
432 | $(Q)mkdir -p include | 437 | $(Q)mkdir -p include |
433 | $(Q)$(MAKE) $(build)=scripts/kconfig $@ | 438 | $(Q)$(MAKE) $(build)=scripts/kconfig $@ |
434 | $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease | 439 | $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease |
@@ -443,7 +448,7 @@ ifeq ($(KBUILD_EXTMOD),) | |||
443 | # Carefully list dependencies so we do not try to build scripts twice | 448 | # Carefully list dependencies so we do not try to build scripts twice |
444 | # in parrallel | 449 | # in parrallel |
445 | PHONY += scripts | 450 | PHONY += scripts |
446 | scripts: scripts_basic include/config/MARKER | 451 | scripts: gen_build_files scripts_basic include/config/MARKER |
447 | $(Q)$(MAKE) $(build)=$(@) | 452 | $(Q)$(MAKE) $(build)=$(@) |
448 | 453 | ||
449 | scripts_basic: include/autoconf.h | 454 | scripts_basic: include/autoconf.h |