From: Pavel Charvat Date: Thu, 31 Jan 2008 20:48:40 +0000 (+0100) Subject: Support for 'make CONFIRM=y install' X-Git-Tag: holmes-import~449^2~12 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=e66085236c893a98ce9db7e020a6d049a3e8b0a9;p=libucw.git Support for 'make CONFIRM=y install' --- diff --git a/build/Makebottom b/build/Makebottom index a474614b..b6f716ea 100644 --- a/build/Makebottom +++ b/build/Makebottom @@ -185,7 +185,7 @@ $(DATAFILES): $(o)/%: $(s)/% # Default installation target default-install: - SH_EXTRA_RUNDIRS="$(sort $(EXTRA_RUNDIRS))" SH_INSTALL_RUNDIRS="$(sort $(INSTALL_RUNDIRS))" SH_CONFIGS="$(sort $(CONFIGS))" $(s)/build/installer $(INSTALL_DIR) + SH_EXTRA_RUNDIRS="$(sort $(EXTRA_RUNDIRS))" SH_INSTALL_RUNDIRS="$(sort $(INSTALL_RUNDIRS))" SH_CONFIGS="$(sort $(CONFIGS))" SH_AUTO_CONFIRM="$(CONFIRM)" $(s)/build/installer $(INSTALL_DIR) # Don't delete intermediate targets. There shouldn't be any, but due to bugs # in GNU Make rules with targets in not-yet-existing directories are ignored diff --git a/build/Maketop b/build/Maketop index 1ac82d98..4496f9f2 100644 --- a/build/Maketop +++ b/build/Maketop @@ -4,6 +4,9 @@ # Set to 1 if you want verbose output V=0 +# Set to 'y' (or 'n') if you want to auto-confirm (auto-reject) all questions +CONFIRM= + # Disable all built-in rules and variables. Speeds up make and simplifies debugging. MAKEFLAGS+=-rR diff --git a/build/installer b/build/installer index b5bf16f2..39e62e61 100755 --- a/build/installer +++ b/build/installer @@ -26,7 +26,12 @@ for a in $SH_CONFIGS ; do echo "cf/$a: no differences" else echo -n "cf/$a differs, replace it [Yn]? " - read x + if [ -z "$SH_AUTO_CONFIRM" ] ; then + read x + else + x="$SH_AUTO_CONFIRM" + echo "$x" + fi if [ -z "$x" -o "$x" = "y" -o "$x" = "Y" ] ; then echo "cf/$a: replacing and keeping the old version as cf/$a.old" mv $DEST/cf/$a $DEST/cf/$a.old