Changeset - r9758:639c35eca387
[Not reviewed]
master
0 2 0
smatz - 16 years ago 2008-07-31 14:32:35
smatz@openttd.org
(svn r13894) -Fix: bashisms in configure and Makefile.in
2 files changed with 6 insertions and 4 deletions:
0 comments (0 inline, 0 general)
Makefile.in
Show inline comments
 
@@ -28,25 +28,25 @@ INSTALL_MENU_DIR = "$(INSTALL_DIR)/$(MEN
 
INSTALL_ICON_DIR = "$(INSTALL_DIR)/"!!ICON_DIR!!
 
INSTALL_ICON_THEME_DIR = "$(INSTALL_DIR)/$(ICON_THEME_DIR)"
 
INSTALL_DATA_DIR = "$(INSTALL_DIR)/"!!DATA_DIR!!
 
INSTALL_DOC_DIR = "$(INSTALL_DIR)/"!!DOC_DIR!!
 
TTD = !!TTD!!
 
TTDS = $(SRC_DIRS:%=%/$(TTD))
 
OS = !!OS!!
 
OSXAPP = !!OSXAPP!!
 
REVISION = !!REVISION!!
 
AWK = !!AWK!!
 
DISTCC = !!DISTCC!!
 

	
 
RES := $(shell if ! [ -f $(CONFIG_CACHE_SOURCE_LIST) ] || [ -n "`cmp $(CONFIG_CACHE_SOURCE_LIST) $(SOURCE_LIST)`" ]; then cp $(SOURCE_LIST) $(CONFIG_CACHE_SOURCE_LIST); fi )
 
RES := $(shell if [ ! -f $(CONFIG_CACHE_SOURCE_LIST) ] || [ -n "`cmp $(CONFIG_CACHE_SOURCE_LIST) $(SOURCE_LIST)`" ]; then cp $(SOURCE_LIST) $(CONFIG_CACHE_SOURCE_LIST); fi )
 

	
 
all: config.cache
 
ifdef DISTCC
 
	@if [ -z "`echo '$(MFLAGS)' | grep '\-j'`" ]; then echo; echo "WARNING: you enabled distcc support, but you don't seem to be using the -jN paramter"; echo; fi
 
endif
 
	@for dir in $(DIRS); do \
 
		$(MAKE) -C $$dir all; \
 
	done
 
ifdef LIPO
 
# Lipo is an OSX thing. If it is defined, it means we are building for universal,
 
# and so we have have to combine the binaries into one big binary
 

	
configure
Show inline comments
 
@@ -23,36 +23,38 @@ PREFIX="`pwd`/bin"
 

	
 
# Set default dirs
 
OBJS_DIR="$PWD/objs"
 
BASE_SRC_OBJS_DIR="$OBJS_DIR"
 
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" ] || [ "$1" = "--reconfigure" ]; then
 
	if ! [ -f "config.cache" ]; 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
 
	cat config.cache | sed 's/\\ /\\\\ /g' > cache.tmp
 
	sh cache.tmp
 
	rm -f cache.tmp
 
	exit $?
 
fi
 

	
 
export SHOW_HELP="0"
 
# 'export SHOW_HELP="0"' doesn't work on some systems
 
SHOW_HELP="0"
 
export SHOW_HELP
 

	
 
set_default
 
detect_params "$@"
 
check_params
 
if [ "$SHOW_HELP" != "0" ]; then
 
	showhelp
 
	exit 0
 
fi
 
save_params
 
make_cflags_and_ldflags
 

	
 
EXE=""
 
@@ -61,25 +63,25 @@ if [ "$os" = "MINGW" ] || [ "$os" = "CYG
 
fi
 

	
 
TTD="openttd$EXE"
 
STRGEN="strgen$EXE"
 
ENDIAN_CHECK="endian_check$EXE"
 

	
 
if [ -z "$sort" ]; then
 
	PIPE_SORT="sed s/a/a/"
 
else
 
	PIPE_SORT="$sort"
 
fi
 

	
 
if ! [ -f "$LANG_DIR/english.txt" ]; then
 
if [ ! -f "$LANG_DIR/english.txt" ]; then
 
	echo "Languages not found in $LANG_DIR. Can't continue without it."
 
	echo "Please make sure the dir exists and contains at least english.txt"
 
fi
 

	
 
# Read the source.list and process it
 
SRCS="`< $ROOT_DIR/source.list tr '\r' '\n' | $awk '
 
	{  }
 
	/^(	*)#end/  { if (deep == skip) { skip -= 1; } deep -= 1; next; }
 
	/^(	*)#else/ { if (deep == skip) { skip -= 1; } else if (deep - 1 == skip) { skip += 1; } next; }
 
	/^(	*)#if/   {
 
		gsub("	", "", $0);
 
		gsub("^#if ", "", $0);
0 comments (0 inline, 0 general)