Ensure build works when KBUILD_OUTPUT is set, closes 11511
authorRon Yorston <rmy@pobox.com>
Sun, 18 Nov 2018 07:40:40 +0000 (07:40 +0000)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sun, 18 Nov 2018 18:34:39 +0000 (19:34 +0100)
The build process for embedded scripts didn't have consistent
support for saving output to a different directory.

Signed-off-by: Ron Yorston <rmy@pobox.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Makefile
scripts/embedded_scripts

index c192804762ce18c268c85e182a6f7bae27c3c612..4b5a01df92ca7103ba74a95f064289d35758e3f1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -361,7 +361,7 @@ scripts/basic/%: scripts_basic ;
 
 # This target generates Kbuild's and Config.in's from *.c files
 PHONY += gen_build_files
-gen_build_files: $(wildcard $(srctree)/*/*.c) $(wildcard $(srctree)/*/*/*.c) $(wildcard embed/*)
+gen_build_files: $(wildcard $(srctree)/*/*.c) $(wildcard $(srctree)/*/*/*.c) $(wildcard $(srctree)/embed/*)
        $(Q)$(srctree)/scripts/gen_build_files.sh $(srctree) $(objtree)
 
 # bbox: we have helpers in applets/
@@ -853,7 +853,7 @@ quiet_cmd_split_autoconf   = SPLIT   include/autoconf.h -> include/config/*
 quiet_cmd_gen_embedded_scripts = GEN     include/embedded_scripts.h
       cmd_gen_embedded_scripts = $(srctree)/scripts/embedded_scripts include/embedded_scripts.h $(srctree)/embed $(srctree)/applets_sh
 #bbox# piggybacked generation of few .h files
-include/config/MARKER: scripts/basic/split-include include/autoconf.h $(wildcard embed/*) scripts/embedded_scripts
+include/config/MARKER: scripts/basic/split-include include/autoconf.h $(wildcard $(srctree)/embed/*) $(srctree)/scripts/embedded_scripts
        $(call cmd,split_autoconf)
        $(call cmd,gen_bbconfigopts)
        $(call cmd,gen_common_bufsiz)
index b7a023ce04e537916c30c0ff094b526da1b62cfb..c2e7c6961968b363af608c09fbb27531fc02635c 100755 (executable)
@@ -20,7 +20,7 @@ if [ -d "$custom_loc" ]
 then
        custom_scripts=$(cd $custom_loc; ls * 2>/dev/null)
 fi
-all_scripts=$(applets/busybox.mkscripts)
+all_scripts=$($srctree/applets/busybox.mkscripts)
 
 # all_scripts includes applet scripts and custom scripts, sort them out
 applet_scripts=""