From c9571603db299259bca8271917688455696c14ce Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 27 Oct 2018 10:54:18 -0500 Subject: Fix "make distclean defconfig toybox" all on one line (good of $CROSS_COMPILER changed), better error message when .config missing. --- Makefile | 6 +++++- kconfig/Makefile | 2 +- scripts/make.sh | 13 +++++++------ 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" -- cgit v1.2.3