Changeset - r3205:d6457bf4d56d
[Not reviewed]
master
0 1 0
truelight - 19 years ago 2006-03-14 21:35:15
truelight@openttd.org
(svn r3873) -Fix: don't remove Makefile.config if it isn't there in the first place
-Add: allow --debug=3 to enable DEBUG lvl 3 (--debug results in a lvl 1)
1 file changed with 20 insertions and 2 deletions:
configure
20
2
0 comments (0 inline, 0 general)
configure
Show inline comments
 
@@ -48,25 +48,29 @@ function handle() {
 
#                         Value is in form: tag=REAL_VALUE
 
#  ITEM="NAME"       - Will set the value as above, only with the next param
 
#  SITEM="NAME"      - Will set the var $NAME to the next param
 
for n in $*
 
do
 
	case "$n" in
 
		--help | -h)
 
			showhelp
 
			exit 0
 
			;;
 

	
 
		--debug)
 
			PARAM="$PARAM DEBUG=1"
 
			DEBUG_SET=1
 
			ITEM="DEBUG"
 
			;;
 
		--debug=*)
 
			handle "DEBUG" $n
 
			;;
 
		--profile)
 
			PARAM="$PARAM PROFILE=1"
 
			;;
 
		--revision=*)
 
			RELEASE=`awk 'BEGIN { FS="="; $0="'$n'"; print $2;}'`
 
			;;
 
		--revision)
 
			SITEM="RELEASE"
 
			;;
 
		--target-cc=*)
 
			handle "CC_TARGET" $n
 
@@ -217,25 +221,39 @@ then
 
			;;
 
		MINGW)
 
			PARAM="$PARAM MINGW=1 WIN32=1"
 
			;;
 
		*)
 
			echo "Unknown OS: $TARGET_OS"
 
			exit 1
 
			;;
 
	esac
 
	PARAM="$PARAM BYPASS_OS_DETECT=1"
 
fi
 

	
 
rm Makefile.config
 
if ! test -z "$DEBUG_SET"
 
then
 
	if test -z "`echo $PARAM | grep "DEBUG="`"
 
	then
 
		# Someone did --debug, without assigning a value, assume 1
 
		PARAM="$PARAM DEBUG=1"
 
	fi
 
fi
 

	
 
# First remove the Makefile.config, else you can have double entries
 
if test -e "Makefile.config"
 
then
 
	rm -f Makefile.config
 
fi
 

	
 
make upgradeconf $PARAM
 

	
 
# Makefile.config currently doesn't support custom CXX, so, we add the line
 
#  ourself!
 

	
 
if ! test -z "$TARGET_CXX"
 
then
 
	echo "CXX=$TARGET_CXX" >> Makefile.config
 
fi
 

	
 
# Same for RELEASE (read: REVISION)
 

	
0 comments (0 inline, 0 general)