More build cleanups.
This commit is contained in:
parent
5cb015d6bb
commit
0d9fe2b9b8
2
Makefile
2
Makefile
|
@ -16,7 +16,7 @@ make.conf: configure
|
|||
|
||||
-include make.conf
|
||||
|
||||
ifeq ($(MAINTAINER_MODE),yes)
|
||||
ifeq ($(USE_DEBUG),yes)
|
||||
CXXFLAGS := -pipe -ggdb -Wextra -Wno-missing-field-initializers -O0 -fno-rtti -fno-exceptions
|
||||
else
|
||||
CXXFLAGS := -pipe -O3 -fno-rtti -fno-exceptions -DNDEBUG
|
||||
|
|
|
@ -12,8 +12,8 @@ begin
|
|||
begin_options
|
||||
|
||||
ask "Install prefix?" prefix /usr/local
|
||||
ask "Use LASH?" USE_LASH yes
|
||||
ask "Build for debugging?" MAINTAINER_MODE no
|
||||
ask "Require LASH?" USE_LASH yes
|
||||
ask "Build for debugging?" USE_DEBUG no
|
||||
|
||||
begin_tests
|
||||
|
||||
|
@ -22,6 +22,6 @@ require_command FLUID fluid
|
|||
require_package JACK 0.103.0 jack
|
||||
require_package libsndfile 1.0.17 sndfile
|
||||
|
||||
[ $USE_LASH = yes ] && require_package LASH 0.5.4 lash-1.0
|
||||
using LASH && require_package LASH 0.5.4 lash-1.0
|
||||
|
||||
end
|
||||
|
|
|
@ -15,14 +15,25 @@ fatal ()
|
|||
|
||||
ask ()
|
||||
{
|
||||
local answer default
|
||||
local A D
|
||||
|
||||
default="`eval echo \\$$2`"
|
||||
default=${default:-$3}
|
||||
D="`eval echo \\$$2`"
|
||||
D=${D:-$3}
|
||||
|
||||
echo -n "$BLACK$BOLD::$SGR0 $1 [$BOLD${default}$SGR0] "
|
||||
read answer
|
||||
echo "${2}=${answer:-$default}" >> make.conf
|
||||
echo -n "$BLACK$BOLD::$SGR0 $1 [$BOLD${D}$SGR0] "
|
||||
read A
|
||||
A=${A:-$D}
|
||||
|
||||
if [ "$3" = yes ] || [ "$3" = no ]
|
||||
then
|
||||
case "$A" in
|
||||
no | n | N) A=no ;;
|
||||
yes | y | Y) A=yes ;;
|
||||
* ) fatal "Invalid response. Must be 'yes' or 'no'" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
echo "${2}=${A:-$D}" >> make.conf
|
||||
}
|
||||
|
||||
ok ()
|
||||
|
@ -36,6 +47,13 @@ failed ()
|
|||
rm -f make.conf
|
||||
}
|
||||
|
||||
using ()
|
||||
{
|
||||
[ "`eval echo \\$USE_$1`" = yes ]
|
||||
|
||||
return $?
|
||||
}
|
||||
|
||||
extract_options ()
|
||||
{
|
||||
local OIFS
|
||||
|
@ -62,7 +80,7 @@ begin_options ()
|
|||
# get the old values
|
||||
extract_options
|
||||
|
||||
echo "# This is a generated file. Any changes may be lost!" > make.conf
|
||||
echo "# This file was automatically generated on `date`. Any changes may be lost!" > make.conf
|
||||
echo "## options" >> make.conf
|
||||
|
||||
echo "--- Configuration required ---"
|
||||
|
@ -70,7 +88,7 @@ begin_options ()
|
|||
|
||||
begin_tests ()
|
||||
{
|
||||
echo "## libs/flags" >> make.conf
|
||||
echo "## libs" >> make.conf
|
||||
extract_options
|
||||
}
|
||||
|
||||
|
@ -117,7 +135,6 @@ require_package ()
|
|||
return 0
|
||||
}
|
||||
|
||||
|
||||
require_FLTK ()
|
||||
{
|
||||
echo -n "Checking for ${BOLD}FLTK${SGR0}..."
|
||||
|
@ -126,9 +143,9 @@ require_FLTK ()
|
|||
|
||||
FLTK_VERSION_MAJOR=`echo $FLTK_VERSION | cut -d'.' -f1`
|
||||
FLTK_VERSION_MINOR=`echo $FLTK_VERSION | cut -d'.' -f2`
|
||||
FLTK_VERSION_PATCH=`echo $FLTK_VERSION | cut -d'.' -f3`
|
||||
FLTK_VERSION_MICRO=`echo $FLTK_VERSION | cut -d'.' -f3`
|
||||
|
||||
if ! ( [ $FLTK_VERSION_MAJOR -ge $1 ] && [ $FLTK_VERSION_MINOR -ge $2 ] && [ $FLTK_VERSION_PATCH -ge $3 ] )
|
||||
if ! ( [ $FLTK_VERSION_MAJOR -ge $1 ] && [ $FLTK_VERSION_MINOR -ge $2 ] && [ $FLTK_VERSION_MICRO -ge $3 ] )
|
||||
then
|
||||
failed
|
||||
fatal "The installed FLTK version ($FLTK_VERSION) is too old."
|
||||
|
|
Loading…
Reference in New Issue