Changeset - r5560:3a25b20628de
[Not reviewed]
master
0 2 0
truelight - 18 years ago 2007-01-07 13:13:01
truelight@openttd.org
(svn r7961) [Configure] -Fix: "" in config params didn't survive --reconfig. They should now.
2 files changed with 5 insertions and 4 deletions:
0 comments (0 inline, 0 general)
config.lib
Show inline comments
 
@@ -248,28 +248,28 @@ detect_params() {
 
	echo "" > $config_log
 
}
 

	
 
save_params() {
 
	# Here we save all params, so we can later on do an exact redo of this
 
	#  configuration, without having the user to re-input stuff
 

	
 
	echo "Running configure with following options:" >> $config_log
 
	echo "" >> $config_log
 

	
 
	configure="$0 --ignore-extra-parameters"
 
	for p in $save_params_array; do
 
		eval "v=\$$p"
 
		eval "v=\"\$$p\""
 
		p=`echo "$p" | sed 's/_/-/g;s/\n//g;'`
 
		# Only save those params that aren't empty
 
		configure="$configure --$p=$v"
 
		configure="$configure --$p=\"$v\""
 
	done
 

	
 
	echo "$configure" >> $config_log
 
	echo "$configure" > config.cache
 
	echo "" >> $config_log
 
}
 

	
 
check_params() {
 
	# Some params want to be in full uppercase, else they might not work as
 
	# expected.. fix that here
 

	
 
	endian=`echo $endian | tr [:lower:] [:upper:]`
configure
Show inline comments
 
@@ -16,26 +16,27 @@ LANG_OBJS_DIR="$OBJS_DIR/lang"
 
BIN_DIR="$PREFIX"
 
SRC_DIR="$ROOT_DIR/src"
 
LANG_DIR="$SRC_DIR/lang"
 
MEDIA_DIR="$ROOT_DIR/media"
 
SOURCE_LIST="$ROOT_DIR/source.list"
 

	
 
if [ "$1" = "--reconfig" ]; then
 
	if ! [ -f "config.cache" ]; then
 
		echo "can't reconfigure, because never configured before"
 
		exit 1
 
	fi
 
	# Make sure we don't lock config.cache
 
	configure=`cat config.cache`
 
	$configure
 
	cat config.cache > cache.tmp
 
	sh cache.tmp
 
	rm -f cache.tmp
 
	exit $?
 
fi
 

	
 
set_default
 
detect_params "$@"
 
save_params
 
check_params
 
make_cflags_and_ldflags
 

	
 
EXE=""
 
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "OS2" ]; then
 
	EXE=".exe"
0 comments (0 inline, 0 general)