From ba6d744304177a7883aeee44c2df16a188d86d80 Mon Sep 17 00:00:00 2001 From: Joerg Bornschein Date: Sun, 22 Sep 2013 14:40:31 +0200 Subject: [PATCH] Add 'make test' which compiles a borg-16 and a borg-ls firmware --- Makefile | 15 +++++++++++++ scripts/Menuconfig | 53 ++++++++++++++++++++++++++-------------------- 2 files changed, 45 insertions(+), 23 deletions(-) diff --git a/Makefile b/Makefile index 0f49cff..c023a7e 100644 --- a/Makefile +++ b/Makefile @@ -145,6 +145,21 @@ menuconfig: @echo "Next, you can: " @echo " * 'make' to compile your borgware" +test: + @echo $(CONFIG_SHELL) + @echo + @echo "========== Testing borg-16 ========== " + $(MAKE) -C scripts/lxdialog all + $(CONFIG_SHELL) scripts/Menuconfig config.in profiles/borg-16 + $(MAKE) + $(MAKE) clean + @echo + @echo "========== Testing borg-ls ========== " + $(MAKE) -C scripts/lxdialog all + $(CONFIG_SHELL) scripts/Menuconfig config.in profiles/borg-ls + $(MAKE) + $(MAKE) clean + #%/menuconfig: # $(SH) "$(@D)/configure" # @$(MAKE) what-now-msg diff --git a/scripts/Menuconfig b/scripts/Menuconfig index 2144b48..111ef89 100644 --- a/scripts/Menuconfig +++ b/scripts/Menuconfig @@ -1722,32 +1722,39 @@ echo -n ", parsing" parse_config_files $CONFIG_IN echo "done." -# -# Start the ball rolling from the top. -# -activate_menu MCmenu0 -# -# All done! -# -cleanup1 +if [ -z $2 ]; then # Interactive mode + # + # Start the ball rolling from the top. + # + activate_menu MCmenu0 -# -# Confirm and Save -# -if $DIALOG --backtitle "$backtitle" \ - --yesno "Do you wish to save your new Borg configuration?" 5 60 -then + # + # All done! + # + cleanup1 + + # + # Confirm and Save + # + if $DIALOG --backtitle "$backtitle" \ + --yesno "Do you wish to save your new Borg configuration?" 5 60 + then + save_configuration + echo + echo + echo "*** End of Borg configuration." + echo + else + echo + echo + echo Your Borg configuration changes were NOT saved. + echo + fi +else # Second argument give; noninteractive! + echo "Loading configuration file $2" + load_config_file $2 save_configuration - echo - echo - echo "*** End of Borg configuration." - echo -else - echo - echo - echo Your Borg configuration changes were NOT saved. - echo fi # Remove log if empty.