summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2006-03-14 21:35:15 +0000
committertruelight <truelight@openttd.org>2006-03-14 21:35:15 +0000
commit54f5cf4ec9867cae67ef1cbadf4674678cca6a44 (patch)
treecea88a917d2d45a271aadf0ba404577c0620fe3f /configure
parent873768c2d2bdd6bc736d30abf2c2edc9f0fe26fb (diff)
downloadopenttd-54f5cf4ec9867cae67ef1cbadf4674678cca6a44.tar.xz
(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)
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure22
1 files changed, 20 insertions, 2 deletions
diff --git a/configure b/configure
index 38d0ab649..bfb5b6341 100755
--- a/configure
+++ b/configure
@@ -57,7 +57,11 @@ do
;;
--debug)
- PARAM="$PARAM DEBUG=1"
+ DEBUG_SET=1
+ ITEM="DEBUG"
+ ;;
+ --debug=*)
+ handle "DEBUG" $n
;;
--profile)
PARAM="$PARAM PROFILE=1"
@@ -226,7 +230,21 @@ then
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