Use old options as defaults when reconfiguring.
This commit is contained in:
parent
7075a9a2e1
commit
7407f16149
11
Makefile
11
Makefile
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue