Use old options as defaults when reconfiguring.

This commit is contained in:
Jonathan Moore Liles 2008-05-16 16:38:07 -05:00
parent 7075a9a2e1
commit 7407f16149
2 changed files with 22 additions and 8 deletions

View File

@ -7,8 +7,6 @@
# Do not edit this file; run `make config` instead.
#
include scripts/colors
VERSION := 0.5.0
all: makedepend FL Timeline Mixer
@ -19,13 +17,15 @@ make.conf: configure
-include make.conf
ifeq (($MAINTAINER_MODE),yes)
CXXFLAGS := -ggdb -Wextra -Wno-missing-field-initializers -O0 -fno-rtti -fno-exceptions
CXXFLAGS := -pipe -ggdb -Wextra -Wno-missing-field-initializers -O0 -fno-rtti -fno-exceptions
else
CXXFLAGS := -O3 -fno-rtti -fno-exceptions -DNDEBUG
CXXFLAGS := -pipe -O3 -fno-rtti -fno-exceptions -DNDEBUG
endif
CXXFLAGS += $(LASH_CFLAGS) -DINSTALL_PREFIX=\"$(prefix)\" -DVERSION=\"$(VERSION)\"
include scripts/colors
.C.o:
@ echo -n "Compiling: "; echo $(BOLD)$(YELLOW)$<$(SGR0); true
@ $(CXX) $(CXXFLAGS) $(INCLUDES) -c $< -o $@
@ -58,7 +58,8 @@ makedepend: $(SRCS)
clean: FL_clean Timeline_clean Mixer_clean
config:
@ rm -f make.conf
# @ rm -f make.conf
@ ./configure
@ $(MAKE) -s
-include makedepend

19
configure vendored
View File

@ -36,11 +36,24 @@ failed ()
echo "-- Configuration:"
# get the old values
if [ -f make.conf ]
then
OIFS="$IFS"
IFS=''
eval "`sed -n '/^## options/{ : i; /^## libs/{ q }; p; n; b i }' make.conf`"
IFS="$OIFS"
fi
echo "# This is a generated file. Any changes may be lost!" > make.conf
ask "Install prefix?" prefix /usr/local
ask "Use LASH?" USE_LASH yes
ask "Build for debugging?" MAINTAINER_MODE no
echo "## options" >> make.conf
ask "Install prefix?" prefix ${prefix:-/usr/local}
ask "Use LASH?" USE_LASH ${USE_LASH:-yes}
ask "Build for debugging?" MAINTAINER_MODE ${MAINTAINER_MODE:-no}
echo "## libs/flags" >> make.conf
# tests