summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDenys Vlasenko2010-05-09 04:22:48 +0200
committerDenys Vlasenko2010-05-09 04:22:48 +0200
commit7fb68f199f037cb69363c8df5c934a27adc699f7 (patch)
tree2eb01a3bc4b3caf6bd7dd4fed6984716fd7ca89a /Makefile
parent6774386d95cec54258f23f69bc287c99e205ebdf (diff)
downloadbusybox-7fb68f199f037cb69363c8df5c934a27adc699f7.zip
busybox-7fb68f199f037cb69363c8df5c934a27adc699f7.tar.gz
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--Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 1481f01..da8f7d7 100644
--- a/Makefile
+++ b/Makefile
@@ -377,6 +377,11 @@ ifneq ($(KBUILD_SRC),)
$(srctree) $(objtree) $(VERSION) $(PATCHLEVEL)
endif
+# This target generates Kbuild's and Config.in's from *.c files
+PHONY += gen_build_files
+gen_build_files:
+ $(Q)$(srctree)/scripts/gen_build_files.sh $(srctree) $(objtree)
+
# 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
@@ -428,7 +433,7 @@ ifeq ($(config-targets),1)
-include $(srctree)/arch/$(ARCH)/Makefile
export KBUILD_DEFCONFIG
-config %config: scripts_basic outputmakefile FORCE
+config %config: scripts_basic outputmakefile gen_build_files FORCE
$(Q)mkdir -p include
$(Q)$(MAKE) $(build)=scripts/kconfig $@
$(Q)$(MAKE) -C $(srctree) KBUILD_SRC= .kernelrelease
@@ -443,7 +448,7 @@ ifeq ($(KBUILD_EXTMOD),)
# Carefully list dependencies so we do not try to build scripts twice
# in parrallel
PHONY += scripts
-scripts: scripts_basic include/config/MARKER
+scripts: gen_build_files scripts_basic include/config/MARKER
$(Q)$(MAKE) $(build)=$(@)
scripts_basic: include/autoconf.h