From fea11c002a0a576fbcb9b5c367300bd483bd7149 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 8 Mar 2016 16:50:58 -0600 Subject: [PATCH] Build system: Add 'make oldconfig' target. Use this option in tools/testbuild.sh. Add --silent option to tools/refresh.sh so that it can be run in batch without human interaction --- Makefile.unix | 3 +++ Makefile.win | 3 +++ arch | 2 +- configs | 2 +- tools/refresh.sh | 29 +++++++++++++++++++++++------ tools/testbuild.sh | 3 +-- 6 files changed, 32 insertions(+), 10 deletions(-) diff --git a/Makefile.unix b/Makefile.unix index b1147390ae..96179c419b 100644 --- a/Makefile.unix +++ b/Makefile.unix @@ -486,6 +486,9 @@ config: apps_preconfig oldconfig: apps_preconfig $(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-conf --oldconfig Kconfig +olddefconfig: apps_preconfig + $(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-conf --olddefconfig Kconfig + menuconfig: apps_preconfig $(Q) APPSDIR=${CONFIG_APPS_DIR} kconfig-mconf Kconfig diff --git a/Makefile.win b/Makefile.win index 4988b43ab0..5a71a42122 100644 --- a/Makefile.win +++ b/Makefile.win @@ -486,6 +486,9 @@ config: apps_preconfig oldconfig: apps_preconfig $(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& kconfig-conf --oldconfig Kconfig +olddefconfig: apps_preconfig + $(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& kconfig-conf --olddefconfig Kconfig + menuconfig: configenv apps_preconfig $(Q) set APPSDIR=$(patsubst "%",%,${CONFIG_APPS_DIR})& kconfig-mconf Kconfig diff --git a/arch b/arch index c84c4f2edc..84aade6ed5 160000 --- a/arch +++ b/arch @@ -1 +1 @@ -Subproject commit c84c4f2edc06fc9bc5e0b4325063feda89b3d2a5 +Subproject commit 84aade6ed5dcc6fe8df0afb7cb0fc157e128c6bc diff --git a/configs b/configs index 88faa8e05c..b2be018b28 160000 --- a/configs +++ b/configs @@ -1 +1 @@ -Subproject commit 88faa8e05cc65a32d47e0b97c1954ef1e6e073df +Subproject commit b2be018b284cdaaf192afd6b61dfcd4dce065b73 diff --git a/tools/refresh.sh b/tools/refresh.sh index a35b25b419..01df311b60 100755 --- a/tools/refresh.sh +++ b/tools/refresh.sh @@ -36,12 +36,16 @@ USAGE="USAGE: $0 [--debug|--help] /" ADVICE="Try '$0 --help' for more information" unset CONFIG +silent=n while [ ! -z "$1" ]; do case $1 in --debug ) set -x ;; + --silent ) + silent=y + ;; --help ) echo "$0 is a tool for refreshing board configurations" echo "" @@ -50,6 +54,8 @@ while [ ! -z "$1" ]; do echo "Where:" echo " --debug" echo " Enable script debug" + echo " --silent" + echo " Update board configuration without interaction" echo " --help" echo " Show this help message and exit" echo " " @@ -157,9 +163,13 @@ fi cp -a $DEFCONFIG .config || \ { echo "ERROR: Failed to copy $DEFCONFIG to .config"; exit 1; } -# Then run oldconfig +# Then run oldconfig or oldefconfig -make oldconfig +if [ "X${silent}" == "Xy" ]; then + make olddefconfig +else + make oldconfig +fi # Show differences @@ -168,14 +178,21 @@ $CMPCONFIG $DEFCONFIG .config # Save the refreshed configuration -read -p "Save the new configuration (y/n)?" -n 1 -r -echo -if [[ $REPLY =~ ^[Yy]$ ]] -then +if [ "X${silent}" == "Xy" ]; then echo "Saving the new configuration file" mv .config $DEFCONFIG || \ { echo "ERROR: Failed to move .config to $DEFCONFIG"; exit 1; } chmod 644 $DEFCONFIG +else + read -p "Save the new configuration (y/n)?" -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]] + then + echo "Saving the new configuration file" + mv .config $DEFCONFIG || \ + { echo "ERROR: Failed to move .config to $DEFCONFIG"; exit 1; } + chmod 644 $DEFCONFIG + fi fi # Restore any previous .config file diff --git a/tools/testbuild.sh b/tools/testbuild.sh index da4bb5911e..8f5bb56d4b 100755 --- a/tools/testbuild.sh +++ b/tools/testbuild.sh @@ -193,8 +193,7 @@ function configure { echo " Refreshing..." cd $nuttx || { echo "ERROR: failed to CD to $nuttx"; exit 1; } - make context 1>/dev/null 2>&1 - kconfig-conf --olddefconfig Kconfig 1>/dev/null + make olddefconfig 1>/dev/null 2>&1 } # Perform the next build