Changeset - r11911:68c886dabb52
[Not reviewed]
master
0 9 0
rubidium - 15 years ago 2009-05-16 12:36:33
rubidium@openttd.org
(svn r16318) -Change: use !! instead of @@ in src/*.in too.
-Change: use @ instead of ~ in configure/Makefiles so Debian's build system(s) can also build RC binaries.
9 files changed with 112 insertions and 112 deletions:
0 comments (0 inline, 0 general)
Makefile.in
Show inline comments
 
@@ -84,25 +84,25 @@ config.pwd: $(CONFIG_CACHE_PWD)
 
	$(MAKE) reconfigure
 

	
 
config.cache: $(CONFIG_CACHE_SOURCE_LIST) $(CONFIGURE_FILES)
 
	$(MAKE) reconfigure
 

	
 
reconfigure:
 
ifeq ($(shell if test -f config.cache; then echo 1; fi), 1)
 
	@echo "----------------"
 
	@echo "The system detected that source.list or any configure file is altered."
 
	@echo " Going to reconfigure with last known settings..."
 
	@echo "----------------"
 
# Make sure we don't lock config.cache
 
	@$(shell cat config.cache | sed 's~\\ ~\\\\ ~g') || exit 1
 
	@$(shell cat config.cache | sed 's@\\ @\\\\ @g') || exit 1
 
	@echo "----------------"
 
	@echo "Reconfig done. Please re-execute make."
 
	@echo "----------------"
 
else
 
	@echo "----------------"
 
	@echo "Have not found a configuration, please run configure first."
 
	@echo "----------------"
 
	@exit 1
 
endif
 

	
 
clean:
 
	@for dir in $(DIRS); do \
Makefile.msvc
Show inline comments
 
@@ -11,18 +11,18 @@ ifdef VERBOSE
 
	Q =
 
else
 
	Q = @
 
endif
 

	
 
AWK = "awk"
 
ROOT_DIR := $(shell pwd)
 
BIN_DIR = "$(ROOT_DIR)/bin"
 
SRC_DIR = "$(ROOT_DIR)/src"
 
BUNDLE_DIR = "$(ROOT_DIR)/bundle"
 
BUNDLES_DIR = "$(ROOT_DIR)/bundles"
 
TTD = "openttd.exe"
 
TARGET := $(shell echo $(PLATFORM) | sed "s~win64~x64~;s~win32~Win32~")
 
TARGET := $(shell echo $(PLATFORM) | sed "s@win64@x64@;s@win32@Win32@")
 

	
 
all:
 
	$(Q)cp objs/$(TARGET)/Release/$(TTD) $(BIN_DIR)/$(TTD)
 

	
 
include Makefile.bundle.in
Makefile.src.in
Show inline comments
 
@@ -49,33 +49,33 @@ FILE_DEP := $(CONFIG_CACHE_COMPILER) end
 
RES      := $(shell mkdir -p $(BIN_DIR) $(sort $(dir $(OBJS))))
 

	
 
# Make sure endian_target.h is reasable as if it was in the src/ dir
 
CFLAGS += -I $(SRC_OBJS_DIR) -I $(LANG_OBJS_DIR)
 
CFLAGS_MAKEDEP += -I $(SRC_OBJS_DIR) -I $(LANG_OBJS_DIR) -I $(SCRIPT_SRC_DIR)
 

	
 
ENDIAN_TARGETS := endian_target.h $(ENDIAN_CHECK)
 

	
 
# This 'sed' basicly just removes 'const' from the line if it is a 2+D array
 
# For more information, please check:
 
#  http://maillist.openttd.org/pipermail/devs/2007-April/000284.html
 
#  http://maillist.openttd.org/pipermail/devs/2007-February/000248.html
 
GCC295_FIX=sed -r 's~^(\t*)(.*)( const )([A-Za-z0-9_ ]+(\[.*\]){2,})(( = \{)|(;))(.*)$$~\1\2 \4\6\8\9~g'
 
GCC295_FIX=sed -r 's@^(\t*)(.*)( const )([A-Za-z0-9_ ]+(\[.*\]){2,})(( = \{)|(;))(.*)$$@\1\2 \4\6\8\9@g'
 
# This 'sed' removes the 3rd '4' in the # lines of the -E output of
 
#  gcc 2.95.3 and lower, as it should indicate that it is a C-linkage, but the
 
#  compiler can't handle that information (just don't ask). So we remove it
 
#  and then it compiles happily and without bitching :)
 
# Furthermore gcc 2.95 has some trouble with protected and private when
 
#  accessing the protected/private stuff of the enclosing class (or the
 
#  super class of the enclosing class).
 
GCC295_FIX_2=sed -e 's~\(^\# [0-9][0-9]* "[^"]*"[ 0-9]*\) 4$$~\1~g;s~private:~public:~g;s~protected:~public:~g'
 
GCC295_FIX_2=sed -e 's@\(^\# [0-9][0-9]* "[^"]*"[ 0-9]*\) 4$$@\1@g;s@private:@public:@g;s@protected:@public:@g'
 

	
 
# Check if we want to show what we are doing
 
ifdef VERBOSE
 
	Q =
 
	E = @true
 
else
 
	Q = @
 
	E = @echo
 
endif
 

	
 
# Our default target
 
all: $(BIN_DIR)/$(TTD)
 
@@ -90,25 +90,25 @@ all: $(BIN_DIR)/$(TTD)
 

	
 
$(LANG_OBJS_DIR)/table/strings.h: $(LANG_DIR)/english.txt $(LANG_OBJS_DIR)/$(STRGEN)
 
	$(MAKE) -C $(LANG_OBJS_DIR) table/strings.h
 

	
 
# Always run version detection, so we always have an accurate modified
 
# flag
 
VERSIONS := $(shell AWK="$(AWK)" "$(ROOT_DIR)/findversion.sh")
 
MODIFIED := $(shell echo "$(VERSIONS)" | cut -f 3 -d'	')
 

	
 
ifdef REVISION
 
# Use specified revision (which should be of the form "r000").
 
REV := $(REVISION)
 
REV_NR := $(shell echo $(REVISION) | sed "s~[^0-9]~~g")
 
REV_NR := $(shell echo $(REVISION) | sed "s@[^0-9]@@g")
 
else
 
# Use autodetected revisions
 
REV      := $(shell echo "$(VERSIONS)" | cut -f 1 -d'	')
 
REV_NR   := $(shell echo "$(VERSIONS)" | cut -f 2 -d'	')
 
endif
 

	
 
# Make sure we have something in REV and REV_NR
 
ifeq ($(REV),)
 
REV := norev000
 
endif
 
ifeq ($(REV_NR),)
 
REV_NR := 0
 
@@ -135,33 +135,33 @@ ifeq ($(filter $(ENDIAN_TARGETS) %.o cle
 
else
 
# In case we want to compile a single target, include the .d file for it
 
ifneq ($(filter %.o, $(MAKECMDGOALS)),)
 
SINGLE_DEP := $(filter %.o, $(MAKECMDGOALS))
 
-include $(SINGLE_DEP:%.o=%.d)
 
endif
 
endif
 

	
 
# Find the deps via GCC. Rarely wrong, but a bit slow
 

	
 
$(OBJS_C:%.o=%.d): %.d: $(SRC_DIR)/%.c $(FILE_DEP)
 
	$(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.c=%.c)'
 
	$(Q)$(CC_HOST) $(CC_CFLAGS) $(CFLAGS) -MM $< | sed 's~^$(@F:%.d=%.o):~$@ $(@:%.d=%.o):~' > $@
 
	$(Q)$(CC_HOST) $(CC_CFLAGS) $(CFLAGS) -MM $< | sed 's@^$(@F:%.d=%.o):@$@ $(@:%.d=%.o):@' > $@
 

	
 
$(OBJS_CPP:%.o=%.d): %.d: $(SRC_DIR)/%.cpp $(FILE_DEP)
 
	$(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.cpp=%.cpp)'
 
	$(Q)$(CXX_HOST) $(CFLAGS) -MM $< | sed 's~^$(@F:%.d=%.o):~$@ $(@:%.d=%.o):~' > $@
 
	$(Q)$(CXX_HOST) $(CFLAGS) -MM $< | sed 's@^$(@F:%.d=%.o):@$@ $(@:%.d=%.o):@' > $@
 

	
 
$(OBJS_MM:%.o=%.d): %.d: $(SRC_DIR)/%.mm $(FILE_DEP)
 
	$(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.mm=%.mm)'
 
	$(Q)$(CC_HOST) $(CFLAGS) -MM $< | sed 's~^$(@F:%.d=%.o):~$@ $(@:%.d=%.o):~' > $@
 
	$(Q)$(CC_HOST) $(CFLAGS) -MM $< | sed 's@^$(@F:%.d=%.o):@$@ $(@:%.d=%.o):@' > $@
 

	
 
$(OBJS_RC:%.o=%.d): %.d: $(SRC_DIR)/%.rc $(FILE_DEP)
 
	$(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.mm=%.mm)'
 
	$(Q)touch $@
 

	
 
else
 
# The much faster, but can be wrong, dep-check
 
DEP_MASK :=
 
DEPS     := Makefile.dep
 

	
 
# Only include the deps if we are not cleaning
 
ifeq ($(filter $(ENDIAN_TARGETS) depend clean mrproper, $(MAKECMDGOALS)),)
 
@@ -181,25 +181,25 @@ Makefile.dep: $(FILE_DEP) $(SRCS:%=$(SRC
 
else
 
Makefile.dep: $(DEP) FORCE
 
endif
 
	$(E) '$(STAGE) DEP CHECK (all files)'
 
	$(Q)rm -f Makefile.dep.tmp
 
	$(Q)touch Makefile.dep.tmp
 

	
 
# Calculate the deps via makedepend
 
	$(Q)$(MAKEDEPEND) -f$(SRC_OBJS_DIR)/Makefile.dep.tmp -o.o -Y -v -- $(CFLAGS_MAKEDEP) -- $(SRCS:%=$(SRC_DIR)/%) 2>/dev/null
 

	
 
# Convert x:/... paths to /x/... for mingw
 
ifeq ($(OS), MINGW)
 
	@cat Makefile.dep.tmp | sed 's~\([a-zA-Z]\):\/~\/\1\/~g' > Makefile.dep.tmp.mingw
 
	@cat Makefile.dep.tmp | sed 's@\([a-zA-Z]\):\/@\/\1\/@g' > Makefile.dep.tmp.mingw
 
	@cp Makefile.dep.tmp.mingw Makefile.dep.tmp
 
	@rm -f Makefile.dep.tmp.mingw
 
endif
 

	
 
# Remove all comments and includes that don't start with $(SRC_DIR)
 
# Remove $(SRC_DIR) from object-file-name
 
	@$(AWK) '                           \
 
	/^# DO NOT/ { print $$0 ; next}     \
 
	/^#/ {next}                         \
 
	/:/ {                               \
 
		left = NF - 1;                    \
 
		for (n = 2; n <= NF; n++) {       \
 
@@ -210,25 +210,25 @@ endif
 
		}                                 \
 
		gsub("$(SRC_DIR)/", "", $$1);     \
 
		if (left > 0) {                   \
 
			print $$0;                      \
 
			$$1 = "Makefile.dep:";          \
 
			print $$0;                      \
 
		}                                 \
 
		next                              \
 
	}                                   \
 
	{                                   \
 
		print $$0                         \
 
	}                                   \
 
	' < Makefile.dep.tmp | sed 's~  *~ ~g;s~ $$~~' | $(SORT) > Makefile.dep
 
	' < Makefile.dep.tmp | sed 's@  *@ @g;s@ $$@@' | $(SORT) > Makefile.dep
 

	
 
	$(Q)rm -f Makefile.dep.tmp Makefile.dep.tmp.bak
 

	
 
endif
 

	
 
# Avoid problems with deps if a .h/.hpp/.hpp.sq file is deleted without the deps
 
#  being updated. Now the Makefile continues, the deps are recreated
 
#  and all will be fine.
 
%.h %.hpp %.hpp.sq:
 
	@true
 

	
 

	
 
@@ -279,28 +279,28 @@ endif
 

	
 
endian_target.h: $(ENDIAN_CHECK) $(CONFIG_CACHE_ENDIAN)
 
	$(E) '$(STAGE) Testing endianness for target'
 
	$(Q)./$(ENDIAN_CHECK) $(ENDIAN_FORCE) > $@
 

	
 
$(ENDIAN_CHECK): $(SRC_DIR)/endian_check.cpp
 
	$(E) '$(STAGE) Compiling and Linking $@'
 
	$(Q)$(CXX_BUILD) $(CFLAGS_BUILD) $< -o $@
 

	
 
# Revision files
 

	
 
$(SRC_DIR)/rev.cpp: $(CONFIG_CACHE_VERSION) $(SRC_DIR)/rev.cpp.in
 
	$(Q)cat $(SRC_DIR)/rev.cpp.in      | sed "s~@@REVISION@@~$(REV_NR)~g;s~@@VERSION@@~$(REV)~g;s~@@MODIFIED@@~$(MODIFIED)~g;s~@@DATE@@~`date +%d.%m.%y`~g" > $(SRC_DIR)/rev.cpp
 
	$(Q)cat $(SRC_DIR)/rev.cpp.in      | sed "s@\!\!REVISION\!\!@$(REV_NR)@g;s@!!VERSION!!@$(REV)@g;s@!!MODIFIED!!@$(MODIFIED)@g;s@!!DATE!!@`date +%d.%m.%y`@g" > $(SRC_DIR)/rev.cpp
 

	
 
$(SRC_DIR)/ottdres.rc: $(CONFIG_CACHE_VERSION) $(SRC_DIR)/ottdres.rc.in
 
	$(Q)cat $(SRC_DIR)/ottdres.rc.in | sed "s~@@REVISION@@~$(REV_NR)~g;s~@@VERSION@@~$(REV)~g;s~@@DATE@@~`date +%d.%m.%y`~g" > $(SRC_DIR)/ottdres.rc
 
	$(Q)cat $(SRC_DIR)/ottdres.rc.in | sed "s@\!\!REVISION\!\!@$(REV_NR)@g;s@!!VERSION!!@$(REV)@g;s@!!DATE!!@`date +%d.%m.%y`@g" > $(SRC_DIR)/ottdres.rc
 

	
 
FORCE:
 

	
 
depend: $(DEPS)
 

	
 
clean:
 
	$(E) '$(STAGE) Cleaning up object files'
 
	$(Q)rm -f $(DEPS) $(OBJS) $(TTD) $(DEPEND) $(TTD:%=$(BIN_DIR)/%) $(CONFIG_CACHE_COMPILER) $(CONFIG_CACHE_LINKER) $(CONFIG_CACHE_ENDIAN) $(CONFIG_CACHE_SOURCE) $(ENDIAN_TARGETS)
 

	
 
mrproper: clean
 
	$(Q)rm -f $(SRC_DIR)/rev.cpp $(SRC_DIR)/ottdres.rc
 

	
config.lib
Show inline comments
 
@@ -412,25 +412,25 @@ detect_params() {
 
}
 

	
 
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="$CONFIGURE_EXECUTABLE --ignore-extra-parameters"
 
	for p in $save_params_array; do
 
		eval "v=\"\$$p\""
 
		p=`echo "$p" | sed 's~_~-~g;s~\n~~g;s~ ~\\ ~g'`
 
		p=`echo "$p" | sed 's@_@-@g;s@\n@@g;s@ @\\ @g'`
 
		# Only save those params that aren't empty
 
		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
 
@@ -913,80 +913,80 @@ check_params() {
 

	
 
			sleep 5
 
		fi
 
	fi
 

	
 
	if [ "$doc_dir" = "1" ]; then
 
		if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then
 
			doc_dir="share/doc/openttd"
 
		else
 
			doc_dir="$data_dir/docs"
 
		fi
 
	else
 
		doc_dir="`echo $doc_dir | sed 's~\([^\]\)\\\\ ~\1\\\\\\\\ ~g;s~\([^\]\) ~\1\\\\\\\\ ~g'`"
 
		doc_dir="`echo $doc_dir | sed 's@\([^\]\)\\\\ @\1\\\\\\\\ @g;s@\([^\]\) @\1\\\\\\\\ @g'`"
 
	fi
 

	
 
	if [ "$icon_theme_dir" = "1" ]; then
 
		if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then
 
			icon_theme_dir="share/icons/hicolor"
 
		else
 
			icon_theme_dir=""
 
		fi
 
	else
 
		icon_theme_dir="`echo $icon_theme_dir | sed 's~\([^\]\)\\\\ ~\1\\\\\\\\ ~g;s~\([^\]\) ~\1\\\\\\\\ ~g'`"
 
		icon_theme_dir="`echo $icon_theme_dir | sed 's@\([^\]\)\\\\ @\1\\\\\\\\ @g;s@\([^\]\) @\1\\\\\\\\ @g'`"
 
	fi
 

	
 
	if [ "$personal_dir" = "1" ]; then
 
		if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "WINCE" ] || [ "$os" = "DOS" ]; then
 
			personal_dir="OpenTTD"
 
		elif [ "$os" = "OSX" ]; then
 
			personal_dir="Documents/OpenTTD"
 
		else
 
			personal_dir=".openttd"
 
		fi
 
	else
 
		personal_dir="`echo $personal_dir | sed 's~\([^\]\)\\\\ ~\1\\\\\\\\ ~g;s~\([^\]\) ~\1\\\\\\\\ ~g'`"
 
		personal_dir="`echo $personal_dir | sed 's@\([^\]\)\\\\ @\1\\\\\\\\ @g;s@\([^\]\) @\1\\\\\\\\ @g'`"
 
	fi
 

	
 
	if [ "$shared_dir" = "1" ]; then
 
		# we are using default values
 
		if [ "$os" = "OSX" ]; then
 
			shared_dir="/Library/Application\\\\ Support/OpenTTD"
 
		else
 
			shared_dir=""
 
		fi
 
	else
 
		shared_dir="`echo $shared_dir | sed 's~\([^\]\)\\\\ ~\1\\\\\\\\ ~g;s~\([^\]\) ~\1\\\\\\\\ ~g'`"
 
		shared_dir="`echo $shared_dir | sed 's@\([^\]\)\\\\ @\1\\\\\\\\ @g;s@\([^\]\) @\1\\\\\\\\ @g'`"
 
	fi
 

	
 
	if [ "$man_dir" = "1" ]; then
 
		# add manpage on UNIX systems
 
		if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ] || [ "$os" = "OSX" ]; then
 
			man_dir="share/man/man6"
 
		else
 
			man_dir=""
 
		fi
 
	else
 
		man_dir="`echo $man_dir | sed 's~\([^\]\)\\\\ ~\1\\\\\\\\ ~g;s~\([^\]\) ~\1\\\\\\\\ ~g'`"
 
		man_dir="`echo $man_dir | sed 's@\([^\]\)\\\\ @\1\\\\\\\\ @g;s@\([^\]\) @\1\\\\\\\\ @g'`"
 
	fi
 

	
 
	if [ "$menu_dir" = "1" ]; then
 
		# add a freedesktop menu item only for some UNIX systems
 
		if [ "$os" = "UNIX" ] || [ "$os" = "FREEBSD" ] || [ "$os" = "OPENBSD" ] || [ "$os" = "NETBSD" ] || [ "$os" = "HPUX" ] || [ "$os" = "SUNOS" ]; then
 
			menu_dir="share/applications"
 
		else
 
			menu_dir=""
 
		fi
 
	else
 
		menu_dir="`echo $menu_dir | sed 's~\([^\]\)\\\\ ~\1\\\\\\\\ ~g;s~\([^\]\) ~\1\\\\\\\\ ~g'`"
 
		menu_dir="`echo $menu_dir | sed 's@\([^\]\)\\\\ @\1\\\\\\\\ @g;s@\([^\]\) @\1\\\\\\\\ @g'`"
 
	fi
 

	
 
	# "set_universal_binary_flags" needs to be before "detect_iconv"
 
	set_universal_binary_flags
 
	detect_iconv
 

	
 
	if [ -n "$personal_dir" ]
 
	then
 
		log 1 "personal home directory... $personal_dir"
 
	else
 
		log 1 "personal home directory... none"
 
	fi
 
@@ -1228,25 +1228,25 @@ make_cflags_and_ldflags() {
 
		if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] && [ "$os" != "WINCE" ]; then
 
			if [ "$enable_static" != "0" ]; then
 
				LIBS="$LIBS `$allegro_config --static --libs`"
 
			else
 
				LIBS="$LIBS `$allegro_config --libs`"
 
			fi
 
		fi
 
	fi
 

	
 
	if [ -n "$sdl_config" ]; then
 
		CFLAGS="$CFLAGS -DWITH_SDL"
 
		# SDL must not add _GNU_SOURCE as it breaks many platforms
 
		CFLAGS="$CFLAGS `$sdl_config --cflags | sed 's~-D_GNU_SOURCE[^ ]*~~'`"
 
		CFLAGS="$CFLAGS `$sdl_config --cflags | sed 's@-D_GNU_SOURCE[^ ]*@@'`"
 
		if [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] && [ "$os" != "WINCE" ]; then
 
			if [ "$enable_static" != "0" ]; then
 
				LIBS="$LIBS `$sdl_config --static-libs`"
 
			else
 
				LIBS="$LIBS `$sdl_config --libs`"
 
			fi
 
		fi
 
	fi
 

	
 
	if [ "$with_cocoa" != "0" ]; then
 
		CFLAGS="$CFLAGS -DWITH_COCOA"
 
		LIBS="$LIBS -F/System/Library/Frameworks -framework Cocoa -framework Carbon -framework AudioUnit"
 
@@ -1290,25 +1290,25 @@ make_cflags_and_ldflags() {
 
			LIBS="$LIBS `$png_config --ldflags | tr '\n\r' '  '`"
 
		fi
 
	fi
 

	
 
	if [ -n "$fontconfig_config" ]; then
 
		CFLAGS="$CFLAGS -DWITH_FONTCONFIG"
 
		CFLAGS="$CFLAGS `$fontconfig_config --cflags | tr '\n\r' '  '`"
 

	
 
		if [ "$enable_static" != "0" ]; then
 
			if [ "$os" = "OSX" ]; then
 
				# fontconfig_config goes via pkg-config on all systems, which doesn't know --prefix
 
				# Also, despite the reason we link to the .a file ourself (because we can't use -static), we do need to ask pkg-config about possible other deps
 
				LIBS="$LIBS `$fontconfig_config --variable=prefix`/lib/libfontconfig.a `$fontconfig_config --libs --static | sed s~-lfontconfig~~`"
 
				LIBS="$LIBS `$fontconfig_config --variable=prefix`/lib/libfontconfig.a `$fontconfig_config --libs --static | sed s@-lfontconfig@@`"
 
			else
 
				LIBS="$LIBS `$fontconfig_config --libs --static | tr '\n\r' '  '`"
 
			fi
 
		else
 
			LIBS="$LIBS `$fontconfig_config --libs | tr '\n\r' '  '`"
 
		fi
 
	fi
 

	
 
	if [ -n "$freetype_config" ]; then
 
		CFLAGS="$CFLAGS -DWITH_FREETYPE"
 
		CFLAGS="$CFLAGS `$freetype_config --cflags | tr '\n\r' '  '`"
 

	
 
@@ -1424,26 +1424,26 @@ make_cflags_and_ldflags() {
 

	
 
	log 1 "using CFLAGS... $CFLAGS $CC_CFLAGS"
 
	log 1 "using LDFLAGS... $LIBS $LDFLAGS"
 

	
 
	# Makedepend doesn't like something like: -isysroot /OSX/blabla
 
	#  so convert it to: -isysroot -OSX/blabla. makedepend just ignores
 
	#  any - command it doesn't know, so we are pretty save.
 
	# Lovely hackish, not?
 
	# Btw, this almost always comes from outside the configure, so it is
 
	#  not something we can control.
 
	# Also make makedepend aware of compiler's built-in defines.
 
	if [ "$with_makedepend" != "0" ] || [ "$enable_builtin_depend" != "0" ]; then
 
		cflags_makedep="`echo | $cxx_host -E -x c++ -dM - | sed 's~.define ~-D~g;s~ .*~ ~g;s~(.*)~~g' | tr -d '\r\n'`"
 
		cflags_makedep="$cflags_makedep `echo "$CFLAGS" | sed 's~ /~ -~g;s~-I[ ]*[^ ]*~~g'`"
 
		cflags_makedep="`echo | $cxx_host -E -x c++ -dM - | sed 's@.define @-D@g;s@ .*@ @g;s@(.*)@@g' | tr -d '\r\n'`"
 
		cflags_makedep="$cflags_makedep `echo "$CFLAGS" | sed 's@ /@ -@g;s@-I[ ]*[^ ]*@@g'`"
 
	else
 
		makedepend=""
 
	fi
 

	
 
	if [ "$with_distcc" != "0" ]; then
 
		cc_host="$distcc $cc_host"
 
		cxx_host="$distcc $cxx_host"
 
		log 1 ""
 
		log 1 " NOTICE: remind yourself to use 'make -jN' to make use of distcc"
 
		log 1 ""
 
	fi
 

	
 
@@ -2595,123 +2595,123 @@ make_sed() {
 
	ppc=`$cc_host -dumpmachine | egrep "powerpc|ppc"`
 
	if [ -n "$ppc" ]; then
 
		T_CFLAGS="$T_CFLAGS -DFOUR_BYTE_BOOL"
 
	fi
 

	
 
	SRC_OBJS_DIR="$BASE_SRC_OBJS_DIR/$OBJS_SUBDIR"
 

	
 
	# All the data needed to compile a single target
 
	#  Make sure if you compile multiple targets to
 
	#  use multiple OBJS_DIR, because all in-between
 
	#  binaries are stored in there, and nowhere else.
 
	SRC_REPLACE="
 
		s~!!CC_HOST!!~$cc_host~g;
 
		s~!!CXX_HOST!!~$cxx_host~g;
 
		s~!!CC_BUILD!!~$cc_build~g;
 
		s~!!CXX_BUILD!!~$cxx_build~g;
 
		s~!!WINDRES!!~$windres~g;
 
		s~!!STRIP!!~$strip $strip_arg~g;
 
		s~!!LIPO!!~$lipo~g;
 
		s~!!CC_CFLAGS!!~$CC_CFLAGS~g;
 
		s~!!CFLAGS!!~$T_CFLAGS~g;
 
		s~!!CFLAGS_BUILD!!~$CFLAGS_BUILD~g;
 
		s~!!STRGEN_FLAGS!!~$strgen_flags~g;
 
		s~!!LIBS!!~$LIBS~g;
 
		s~!!LDFLAGS!!~$T_LDFLAGS~g;
 
		s~!!BIN_DIR!!~$BIN_DIR~g;
 
		s~!!ROOT_DIR!!~$ROOT_DIR~g;
 
		s~!!MEDIA_DIR!!~$MEDIA_DIR~g;
 
		s~!!SOURCE_LIST!!~$SOURCE_LIST~g;
 
		s~!!SRC_OBJS_DIR!!~$SRC_OBJS_DIR~g;
 
		s~!!LANG_OBJS_DIR!!~$LANG_OBJS_DIR~g;
 
		s~!!SRC_DIR!!~$SRC_DIR~g;
 
		s~!!SCRIPT_SRC_DIR!!~$SCRIPT_SRC_DIR~g;
 
		s~!!OSXAPP!!~$OSXAPP~g;
 
		s~!!LANG_DIR!!~$LANG_DIR~g;
 
		s~!!TTD!!~$TTD~g;
 
		s~!!BINARY_DIR!!~$prefix_dir/$binary_dir~g;
 
		s~!!DATA_DIR!!~$prefix_dir/$data_dir~g;
 
		s~!!DOC_DIR!!~$prefix_dir/$doc_dir~g;
 
		s~!!MAN_DIR!!~$prefix_dir/$man_dir~g;
 
		s~!!ICON_DIR!!~$prefix_dir/$icon_dir~g;
 
		s~!!ICON_THEME_DIR!!~$prefix_dir/$icon_theme_dir~g;
 
		s~!!PERSONAL_DIR!!~$personal_dir~g;
 
		s~!!SHARED_DIR!!~$shared_dir~g;
 
		s~!!INSTALL_DIR!!~$install_dir~g;
 
		s~!!BINARY_NAME!!~$binary_name~g;
 
		s~!!STRGEN!!~$STRGEN~g;
 
		s~!!ENDIAN_CHECK!!~$ENDIAN_CHECK~g;
 
		s~!!DEPEND!!~$DEPEND~g;
 
		s~!!ENDIAN_FORCE!!~$endian~g;
 
		s~!!STAGE!!~$STAGE~g;
 
		s~!!MAKEDEPEND!!~$makedepend~g;
 
		s~!!CFLAGS_MAKEDEP!!~$cflags_makedep~g;
 
		s~!!SORT!!~$sort~g;
 
		s~!!CONFIG_CACHE_COMPILER!!~config.cache.compiler~g;
 
		s~!!CONFIG_CACHE_LINKER!!~config.cache.linker~g;
 
		s~!!CONFIG_CACHE_ENDIAN!!~config.cache.endian~g;
 
		s~!!CONFIG_CACHE_SOURCE!!~config.cache.source~g;
 
		s~!!CONFIG_CACHE_VERSION!!~config.cache.version~g;
 
		s~!!CONFIG_CACHE_SOURCE_LIST!!~config.cache.source.list~g;
 
		s~!!CONFIG_CACHE_PWD!!~config.cache.pwd~g;
 
		s~!!LANG_SUPPRESS!!~$lang_suppress~g;
 
		s~!!OBJS_C!!~$OBJS_C~g;
 
		s~!!OBJS_CPP!!~$OBJS_CPP~g;
 
		s~!!OBJS_MM!!~$OBJS_MM~g;
 
		s~!!OBJS_RC!!~$OBJS_RC~g;
 
		s~!!SRCS!!~$SRCS~g;
 
		s~!!OS!!~$os~g;
 
		s~!!CONFIGURE_FILES!!~$CONFIGURE_FILES~g;
 
		s~!!REVISION!!~$revision~g;
 
		s~!!AWK!!~$awk~g;
 
		s~!!GCC295!!~$gcc295~g;
 
		s~!!DISTCC!!~$distcc~g;
 
		s@!!CC_HOST!!@$cc_host@g;
 
		s@!!CXX_HOST!!@$cxx_host@g;
 
		s@!!CC_BUILD!!@$cc_build@g;
 
		s@!!CXX_BUILD!!@$cxx_build@g;
 
		s@!!WINDRES!!@$windres@g;
 
		s@!!STRIP!!@$strip $strip_arg@g;
 
		s@!!LIPO!!@$lipo@g;
 
		s@!!CC_CFLAGS!!@$CC_CFLAGS@g;
 
		s@!!CFLAGS!!@$T_CFLAGS@g;
 
		s@!!CFLAGS_BUILD!!@$CFLAGS_BUILD@g;
 
		s@!!STRGEN_FLAGS!!@$strgen_flags@g;
 
		s@!!LIBS!!@$LIBS@g;
 
		s@!!LDFLAGS!!@$T_LDFLAGS@g;
 
		s@!!BIN_DIR!!@$BIN_DIR@g;
 
		s@!!ROOT_DIR!!@$ROOT_DIR@g;
 
		s@!!MEDIA_DIR!!@$MEDIA_DIR@g;
 
		s@!!SOURCE_LIST!!@$SOURCE_LIST@g;
 
		s@!!SRC_OBJS_DIR!!@$SRC_OBJS_DIR@g;
 
		s@!!LANG_OBJS_DIR!!@$LANG_OBJS_DIR@g;
 
		s@!!SRC_DIR!!@$SRC_DIR@g;
 
		s@!!SCRIPT_SRC_DIR!!@$SCRIPT_SRC_DIR@g;
 
		s@!!OSXAPP!!@$OSXAPP@g;
 
		s@!!LANG_DIR!!@$LANG_DIR@g;
 
		s@!!TTD!!@$TTD@g;
 
		s@!!BINARY_DIR!!@$prefix_dir/$binary_dir@g;
 
		s@!!DATA_DIR!!@$prefix_dir/$data_dir@g;
 
		s@!!DOC_DIR!!@$prefix_dir/$doc_dir@g;
 
		s@!!MAN_DIR!!@$prefix_dir/$man_dir@g;
 
		s@!!ICON_DIR!!@$prefix_dir/$icon_dir@g;
 
		s@!!ICON_THEME_DIR!!@$prefix_dir/$icon_theme_dir@g;
 
		s@!!PERSONAL_DIR!!@$personal_dir@g;
 
		s@!!SHARED_DIR!!@$shared_dir@g;
 
		s@!!INSTALL_DIR!!@$install_dir@g;
 
		s@!!BINARY_NAME!!@$binary_name@g;
 
		s@!!STRGEN!!@$STRGEN@g;
 
		s@!!ENDIAN_CHECK!!@$ENDIAN_CHECK@g;
 
		s@!!DEPEND!!@$DEPEND@g;
 
		s@!!ENDIAN_FORCE!!@$endian@g;
 
		s@!!STAGE!!@$STAGE@g;
 
		s@!!MAKEDEPEND!!@$makedepend@g;
 
		s@!!CFLAGS_MAKEDEP!!@$cflags_makedep@g;
 
		s@!!SORT!!@$sort@g;
 
		s@!!CONFIG_CACHE_COMPILER!!@config.cache.compiler@g;
 
		s@!!CONFIG_CACHE_LINKER!!@config.cache.linker@g;
 
		s@!!CONFIG_CACHE_ENDIAN!!@config.cache.endian@g;
 
		s@!!CONFIG_CACHE_SOURCE!!@config.cache.source@g;
 
		s@!!CONFIG_CACHE_VERSION!!@config.cache.version@g;
 
		s@!!CONFIG_CACHE_SOURCE_LIST!!@config.cache.source.list@g;
 
		s@!!CONFIG_CACHE_PWD!!@config.cache.pwd@g;
 
		s@!!LANG_SUPPRESS!!@$lang_suppress@g;
 
		s@!!OBJS_C!!@$OBJS_C@g;
 
		s@!!OBJS_CPP!!@$OBJS_CPP@g;
 
		s@!!OBJS_MM!!@$OBJS_MM@g;
 
		s@!!OBJS_RC!!@$OBJS_RC@g;
 
		s@!!SRCS!!@$SRCS@g;
 
		s@!!OS!!@$os@g;
 
		s@!!CONFIGURE_FILES!!@$CONFIGURE_FILES@g;
 
		s@!!REVISION!!@$revision@g;
 
		s@!!AWK!!@$awk@g;
 
		s@!!GCC295!!@$gcc295@g;
 
		s@!!DISTCC!!@$distcc@g;
 
	"
 

	
 
	if [ "$icon_theme_dir" != "" ]; then
 
		SRC_REPLACE="$SRC_REPLACE
 
			s~!!ICON_THEME_DIR!!~$prefix_dir/$icon_theme_dir~g;
 
			s@!!ICON_THEME_DIR!!@$prefix_dir/$icon_theme_dir@g;
 
		"
 
	else
 
		SRC_REPLACE="$SRC_REPLACE
 
			s~!!ICON_THEME_DIR!!~~g;
 
			s@!!ICON_THEME_DIR!!@@g;
 
		"
 
	fi
 

	
 
	if [ "$man_dir" != "" ]; then
 
		SRC_REPLACE="$SRC_REPLACE
 
			s~!!MAN_DIR!!~$prefix_dir/$man_dir~g;
 
			s@!!MAN_DIR!!@$prefix_dir/$man_dir@g;
 
		"
 
	else
 
		SRC_REPLACE="$SRC_REPLACE
 
			s~!!MAN_DIR!!~~g;
 
			s@!!MAN_DIR!!@@g;
 
		"
 
	fi
 

	
 
	if [ "$menu_dir" != "" ]; then
 
		SRC_REPLACE="$SRC_REPLACE
 
			s~!!MENU_DIR!!~$prefix_dir/$menu_dir~g;
 
			s@!!MENU_DIR!!@$prefix_dir/$menu_dir@g;
 
		"
 
	else
 
		SRC_REPLACE="$SRC_REPLACE
 
			s~!!MENU_DIR!!~~g;
 
			s@!!MENU_DIR!!@@g;
 
		"
 
	fi
 
}
 

	
 
generate_menu_item() {
 
	MENU_REPLACE="
 
		s~!!TTD!!~$TTD~g;
 
		s~!!MENU_GROUP!!~$menu_group~g;
 
		s~!!MENU_NAME!!~$menu_name~g
 
		s@!!TTD!!@$TTD@g;
 
		s@!!MENU_GROUP!!@$menu_group@g;
 
		s@!!MENU_NAME!!@$menu_name@g
 
	"
 
	log 1 "Generating menu item..."
 
	mkdir -p media
 
	< $ROOT_DIR/media/openttd.desktop.in sed "$MENU_REPLACE" > media/openttd.desktop
 
}
 

	
 
generate_main() {
 
	STAGE="[MAIN]"
 

	
 
	make_sed
 

	
 
	# Create the main Makefile
configure
Show inline comments
 
@@ -38,48 +38,48 @@ 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
 
		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
 
	cat config.cache | sed 's@\\ @\\\\ @g' > cache.tmp
 
	sh cache.tmp
 
	rm -f cache.tmp
 
	exit $?
 
fi
 

	
 
set_default
 
detect_params "$@"
 
check_params
 
save_params
 
make_cflags_and_ldflags
 

	
 
EXE=""
 
if [ "$os" = "MINGW" ] || [ "$os" = "CYGWIN" ] || [ "$os" = "OS2" ] || [ "$os" = "DOS" ] || [ "$os" = "WINCE" ]; then
 
	EXE=".exe"
 
fi
 

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

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

	
 
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 '
 
	{  }
 
@@ -127,24 +127,24 @@ SRCS="`< $ROOT_DIR/source.list tr '\r' '
 
		}
 
	}
 
' | $PIPE_SORT`"
 

	
 
OBJS_C="`  echo \"$SRCS\" | $awk ' { ORS = " " } /\.c$/   { gsub(".c$",   ".o", $0); print $0; }'`"
 
OBJS_CPP="`echo \"$SRCS\" | $awk ' { ORS = " " } /\.cpp$/ { gsub(".cpp$", ".o", $0); print $0; }'`"
 
OBJS_MM="` echo \"$SRCS\" | $awk ' { ORS = " " } /\.mm$/  { gsub(".mm$",  ".o", $0); print $0; }'`"
 
OBJS_RC="` echo \"$SRCS\" | $awk ' { ORS = " " } /\.rc$/  { gsub(".rc$",  ".o", $0); print $0; }'`"
 
SRCS="`    echo \"$SRCS\" | $awk ' { ORS = " " } { print $0; }'`"
 

	
 
# In makefiles, we always use -u for sort
 
if [ -z "$sort" ]; then
 
	sort="sed s~a~a~"
 
	sort="sed s@a@a@"
 
else
 
	sort="$sort -u"
 
fi
 

	
 
CONFIGURE_FILES="$ROOT_DIR/configure $ROOT_DIR/config.lib $ROOT_DIR/Makefile.in $ROOT_DIR/Makefile.lang.in $ROOT_DIR/Makefile.src.in $ROOT_DIR/Makefile.bundle.in"
 

	
 
generate_main
 
generate_lang
 
generate_src
 

	
 
check_path_characters
findversion.sh
Show inline comments
 
@@ -77,35 +77,35 @@ if [ -d "$ROOT_DIR/.svn" ]; then
 
	if [ -n "$TAG" ]; then
 
		REV=$TAG
 
	else
 
		REV="r$REV_NR"
 
	fi
 
elif [ -d "$ROOT_DIR/.git" ]; then
 
	# We are a git checkout
 
	if [ -n "`git diff-index HEAD \"$SRC_DIR\"`" ]; then
 
		MODIFIED="2"
 
	fi
 
	HASH=`LC_ALL=C git rev-parse --verify HEAD 2>/dev/null`
 
	REV="g`echo $HASH | cut -c1-8`"
 
	BRANCH=`git branch|grep '[*]' | sed 's~\* ~~;s~^master$~~'`
 
	REV_NR=`LC_ALL=C git log --pretty=format:%s "$SRC_DIR" | grep "^(svn r[0-9]*)" | head -n 1 | sed "s~.*(svn r\([0-9]*\)).*~\1~"`
 
	BRANCH=`git branch|grep '[*]' | sed 's@\* @@;s@^master$@@'`
 
	REV_NR=`LC_ALL=C git log --pretty=format:%s "$SRC_DIR" | grep "^(svn r[0-9]*)" | head -n 1 | sed "s@.*(svn r\([0-9]*\)).*@\1@"`
 
elif [ -d "$ROOT_DIR/.hg" ]; then
 
	# We are a hg checkout
 
	if [ -n "`hg status \"$SRC_DIR\" | grep -v '^?'`" ]; then
 
		MODIFIED="2"
 
	fi
 
	HASH=`LC_ALL=C hg parents 2>/dev/null | head -n 1 | cut -d: -f3`
 
	REV="h`echo $HASH | cut -c1-8`"
 
	BRANCH=`hg branch | sed 's~^default$~~'`
 
	REV_NR=`LC_ALL=C hg log -r $HASH:0 -k "svn" -l 1 --template "{desc}\n" "$SRC_DIR" | grep "^(svn r[0-9]*)" | head -n 1 | sed "s~.*(svn r\([0-9]*\)).*~\1~"`
 
	BRANCH=`hg branch | sed 's@^default$@@'`
 
	REV_NR=`LC_ALL=C hg log -r $HASH:0 -k "svn" -l 1 --template "{desc}\n" "$SRC_DIR" | grep "^(svn r[0-9]*)" | head -n 1 | sed "s@.*(svn r\([0-9]*\)).*@\1@"`
 
else
 
	# We don't know
 
	MODIFIED="1"
 
	BRANCH=""
 
	REV=""
 
	REV_NR=""
 
fi
 

	
 
if [ "$MODIFIED" -eq "2" ]; then
 
	REV="${REV}M"
 
fi
 

	
projects/determineversion.vbs
Show inline comments
 
@@ -7,28 +7,28 @@ Sub FindReplaceInFile(filename, to_find,
 
	Dim file, data
 
	Set file = FSO.OpenTextFile(filename, 1, 0, 0)
 
	data = file.ReadAll
 
	file.Close
 
	data = Replace(data, to_find, replacement)
 
	Set file = FSO.CreateTextFile(filename, -1, 0)
 
	file.Write data
 
	file.Close
 
End Sub
 

	
 
Sub UpdateFile(modified, revision, version, cur_date, filename)
 
	FSO.CopyFile filename & ".in", filename
 
	FindReplaceInFile filename, "@@MODIFIED@@", modified
 
	FindReplaceInFile filename, "@@REVISION@@", revision
 
	FindReplaceInFile filename, "@@VERSION@@", version
 
	FindReplaceInFile filename, "@@DATE@@", cur_date
 
	FindReplaceInFile filename, "!!MODIFIED!!", modified
 
	FindReplaceInFile filename, "!!REVISION!!", revision
 
	FindReplaceInFile filename, "!!VERSION!!", version
 
	FindReplaceInFile filename, "!!DATE!!", cur_date
 
End Sub
 

	
 
Sub UpdateFiles(version)
 
	Dim modified, revision, cur_date
 
	cur_date = DatePart("D", Date) & "." & DatePart("M", Date) & "." & DatePart("YYYY", Date)
 

	
 
	If InStr(version, Chr(9)) Then
 
		revision = Mid(version, InStr(version, Chr(9)) + 1)
 
		revision = Mid(revision, 1, InStr(revision, Chr(9)) - 1)
 
		modified = Mid(version, InStrRev(version, Chr(9)) + 1)
 
		version  = Mid(version, 1, InStr(version, Chr(9)) - 1)
 
	Else
src/ottdres.rc.in
Show inline comments
 
@@ -55,51 +55,51 @@ BEGIN
 
    LTEXT           "",10,36,7,262,43
 
    ICON            100,IDC_STATIC,9,9,20,20
 
END
 

	
 

	
 
#ifndef _MAC
 
/////////////////////////////////////////////////////////////////////////////
 
//
 
// Version
 
//
 

	
 
VS_VERSION_INFO VERSIONINFO
 
 FILEVERSION 0,8,0,@@REVISION@@
 
 PRODUCTVERSION 0,8,0,@@REVISION@@
 
 FILEVERSION 0,8,0,!!REVISION!!
 
 PRODUCTVERSION 0,8,0,!!REVISION!!
 
 FILEFLAGSMASK 0x3fL
 
#ifdef _DEBUG
 
 FILEFLAGS 0x1L
 
#else
 
 FILEFLAGS 0x0L
 
#endif
 
 FILEOS 0x4L
 
 FILETYPE 0x1L
 
 FILESUBTYPE 0x0L
 
BEGIN
 
    BLOCK "StringFileInfo"
 
    BEGIN
 
        BLOCK "000004b0"
 
        BEGIN
 
            VALUE "Comments", "This program is licensed under the GNU General Public License.\0"
 
            VALUE "CompanyName", "OpenTTD Development Team\0"
 
            VALUE "FileDescription", "OpenTTD\0"
 
            VALUE "FileVersion", "Development @@VERSION@@\0"
 
            VALUE "FileVersion", "Development !!VERSION!!\0"
 
            VALUE "InternalName", "openttd\0"
 
            VALUE "LegalCopyright", "Copyright \xA9 OpenTTD Developers 2002-2009. All Rights Reserved.\0"
 
            VALUE "LegalTrademarks", "\0"
 
            VALUE "OriginalFilename", "openttd.exe\0"
 
            VALUE "PrivateBuild", "\0"
 
            VALUE "ProductName", "OpenTTD\0"
 
            VALUE "ProductVersion", "Development @@VERSION@@\0"
 
            VALUE "ProductVersion", "Development !!VERSION!!\0"
 
            VALUE "SpecialBuild", "-\0"
 
        END
 
    END
 
    BLOCK "VarFileInfo"
 
    BEGIN
 
        VALUE "Translation", 0x0, 1200
 
    END
 
END
 

	
 
#endif    // !_MAC
 

	
 
#endif    // Neutral (Default) resources
src/rev.cpp.in
Show inline comments
 
@@ -11,45 +11,45 @@
 
 * "r<revision number>[M][-<branch>]" or "norev000".
 
 *
 
 * The major, minor and build are the numbers that describe releases of
 
 * OpenTTD (like 0.5.3). "-RC" is used to flag release candidates.
 
 *
 
 * The revision number is fairly straight forward. The M is to show that
 
 * the binary is made from modified source code. The branch shows the
 
 * branch the revision is of and will not be there when it is trunk.
 
 *
 
 * norev000 is for non-releases that are made on systems without
 
 * subversion or sources that are not a checkout of subversion.
 
 */
 
const char _openttd_revision[] = "@@VERSION@@";
 
const char _openttd_revision[] = "!!VERSION!!";
 

	
 
/**
 
 * Let us know if current build was modified. This detection
 
 * works even in the case when revision string is overriden by
 
 * --revision argument.
 
 * Value 0 means no modification, 1 is for unknown state
 
 * (compiling from sources without any version control software)
 
 * and 2 is for modified revision.
 
 */
 
const byte _openttd_revision_modified = @@MODIFIED@@;
 
const byte _openttd_revision_modified = !!MODIFIED!!;
 

	
 
/**
 
 * The NewGRF revision of OTTD:
 
 * bits  meaning.
 
 * 28-31 major version
 
 * 24-27 minor version
 
 * 20-23 build
 
 *    19 1 if it is a release, 0 if it is not.
 
 *  0-18 revision number; 0 for releases and when the revision is unknown.
 
 *
 
 * The 19th bit is there so the development/betas/alpha, etc. leading to a
 
 * final release will always have a lower version number than the released
 
 * version, thus making comparisions on specific revisions easy.
 
 */
 
const uint32 _openttd_newgrf_version = 0 << 28 | 8 << 24 | 0 << 20 | 0 << 19 | (@@REVISION@@ & ((1 << 19) - 1));
 
const uint32 _openttd_newgrf_version = 0 << 28 | 8 << 24 | 0 << 20 | 0 << 19 | (!!REVISION!! & ((1 << 19) - 1));
 

	
 
#ifdef __MORPHOS__
 
/**
 
 * Variable used by MorphOS to show the version.
 
 */
 
extern const char morphos_versions_tag[] = "$VER: OpenTTD @@VERSION@@ (@@DATE@@) OpenTTD Team [MorphOS, PowerPC]";
 
extern const char morphos_versions_tag[] = "$VER: OpenTTD !!VERSION!! (!!DATE!!) OpenTTD Team [MorphOS, PowerPC]";
 
#endif
0 comments (0 inline, 0 general)