aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile6
-rw-r--r--kconfig/Makefile2
-rwxr-xr-xscripts/make.sh13
3 files changed, 13 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 26038e91..1c1c4a4c 100644
--- a/Makefile
+++ b/Makefile
@@ -26,7 +26,11 @@ include kconfig/Makefile
-include .singlemake
$(KCONFIG_CONFIG): $(KCONFIG_TOP)
-$(KCONFIG_TOP): generated/Config.in
+ @if [ -e "$(KCONFG_CONFIG)" ]; then make silentoldconfig; \
+ else echo "Not configured (run 'make defconfig' or 'make menuconfig')";\
+ exit 1; fi
+
+$(KCONFIG_TOP): generated/Config.in generated/Config.probed
generated/Config.in: toys/*/*.c scripts/genconfig.sh
scripts/genconfig.sh
diff --git a/kconfig/Makefile b/kconfig/Makefile
index 7466d035..d62fe78b 100644
--- a/kconfig/Makefile
+++ b/kconfig/Makefile
@@ -18,7 +18,7 @@ oldconfig: $(obj)/conf $(KCONFIG_TOP)
$< -o $(KCONFIG_TOP)
silentoldconfig: $(obj)/conf $(KCONFIG_TOP)
- $< -s $(KCONFIG_TOP)
+ yes | $< -o $(KCONFIG_TOP) > /dev/null
randconfig: $(obj)/conf $(KCONFIG_TOP)
$< -r $(KCONFIG_TOP) > /dev/null
diff --git a/scripts/make.sh b/scripts/make.sh
index a1fdb343..32e0825c 100755
--- a/scripts/make.sh
+++ b/scripts/make.sh
@@ -14,8 +14,7 @@ source ./configure
[ -z "$OUTNAME" ] && OUTNAME=toybox
UNSTRIPPED="generated/unstripped/$(basename "$OUTNAME")"
-# Since each cc invocation is short, launch half again as many processes
-# as we have processors so they don't exit faster than we can start them.
+# Try to keep one more cc invocation going than we have processors
[ -z "$CPUS" ] && CPUS=$(($(nproc)+1))
if [ -z "$SED" ]
@@ -90,18 +89,20 @@ genbuildsh()
echo "#!/bin/sh"
echo
- echo "BUILD='$BUILD'"
+ echo "PATH='$PATH'"
echo
- echo "FILES='$LIBFILES $TOYFILES'"
+ echo "BUILD='$BUILD'"
echo
echo "LINK='$LINK'"
echo
+ echo "FILES='$LIBFILES $TOYFILES'"
+ echo
echo
echo '$BUILD $FILES $LINK'
}
-if ! cmp -s <(genbuildsh | head -n 3) \
- <(head -n 3 generated/build.sh 2>/dev/null)
+if ! cmp -s <(genbuildsh | head -n 7) \
+ <(head -n 7 generated/build.sh 2>/dev/null)
then
echo -n "Library probe"