X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=Makefile;h=14f5cd14920714bd52e52adb2e44626748c2d4a9;hb=765b0eed3ef29a80115708c3249d3a541509cd24;hp=1481f010026f21247023c726eeefef7e2e04a801;hpb=e83877942982ee642287b098fe93b70c0802d087;p=oweals%2Fbusybox.git diff --git a/Makefile b/Makefile index 1481f0100..14f5cd149 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 @@ -996,6 +1001,8 @@ $(mrproper-dirs): mrproper: clean archmrproper $(mrproper-dirs) $(call cmd,rmdirs) $(call cmd,rmfiles) + @find -name Config.src | sed 's/.src$/.in/' | xargs -r rm -f + @find -name Kbuild.src | sed 's/.src$//' | xargs -r rm -f # distclean #