1
0
Fork 0

(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.
release/1.0
rubidium 2009-05-16 12:36:33 +00:00
parent db7e24e211
commit a34d5bb6ab
9 changed files with 112 additions and 112 deletions

View File

@ -93,7 +93,7 @@ ifeq ($(shell if test -f config.cache; then echo 1; fi), 1)
@echo " Going to reconfigure with last known settings..." @echo " Going to reconfigure with last known settings..."
@echo "----------------" @echo "----------------"
# Make sure we don't lock config.cache # 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 "----------------"
@echo "Reconfig done. Please re-execute make." @echo "Reconfig done. Please re-execute make."
@echo "----------------" @echo "----------------"

View File

@ -20,7 +20,7 @@ SRC_DIR = "$(ROOT_DIR)/src"
BUNDLE_DIR = "$(ROOT_DIR)/bundle" BUNDLE_DIR = "$(ROOT_DIR)/bundle"
BUNDLES_DIR = "$(ROOT_DIR)/bundles" BUNDLES_DIR = "$(ROOT_DIR)/bundles"
TTD = "openttd.exe" 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: all:
$(Q)cp objs/$(TARGET)/Release/$(TTD) $(BIN_DIR)/$(TTD) $(Q)cp objs/$(TARGET)/Release/$(TTD) $(BIN_DIR)/$(TTD)

View File

@ -58,7 +58,7 @@ ENDIAN_TARGETS := endian_target.h $(ENDIAN_CHECK)
# For more information, please check: # For more information, please check:
# http://maillist.openttd.org/pipermail/devs/2007-April/000284.html # http://maillist.openttd.org/pipermail/devs/2007-April/000284.html
# http://maillist.openttd.org/pipermail/devs/2007-February/000248.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 # 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 # 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 # compiler can't handle that information (just don't ask). So we remove it
@ -66,7 +66,7 @@ GCC295_FIX=sed -r 's~^(\t*)(.*)( const )([A-Za-z0-9_ ]+(\[.*\]){2,})(( = \{)|(;)
# Furthermore gcc 2.95 has some trouble with protected and private when # Furthermore gcc 2.95 has some trouble with protected and private when
# accessing the protected/private stuff of the enclosing class (or the # accessing the protected/private stuff of the enclosing class (or the
# super class of the enclosing class). # 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 # Check if we want to show what we are doing
ifdef VERBOSE ifdef VERBOSE
@ -99,7 +99,7 @@ MODIFIED := $(shell echo "$(VERSIONS)" | cut -f 3 -d' ')
ifdef REVISION ifdef REVISION
# Use specified revision (which should be of the form "r000"). # Use specified revision (which should be of the form "r000").
REV := $(REVISION) REV := $(REVISION)
REV_NR := $(shell echo $(REVISION) | sed "s~[^0-9]~~g") REV_NR := $(shell echo $(REVISION) | sed "s@[^0-9]@@g")
else else
# Use autodetected revisions # Use autodetected revisions
REV := $(shell echo "$(VERSIONS)" | cut -f 1 -d' ') REV := $(shell echo "$(VERSIONS)" | cut -f 1 -d' ')
@ -144,15 +144,15 @@ endif
$(OBJS_C:%.o=%.d): %.d: $(SRC_DIR)/%.c $(FILE_DEP) $(OBJS_C:%.o=%.d): %.d: $(SRC_DIR)/%.c $(FILE_DEP)
$(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.c=%.c)' $(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) $(OBJS_CPP:%.o=%.d): %.d: $(SRC_DIR)/%.cpp $(FILE_DEP)
$(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.cpp=%.cpp)' $(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) $(OBJS_MM:%.o=%.d): %.d: $(SRC_DIR)/%.mm $(FILE_DEP)
$(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.mm=%.mm)' $(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) $(OBJS_RC:%.o=%.d): %.d: $(SRC_DIR)/%.rc $(FILE_DEP)
$(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.mm=%.mm)' $(E) '$(STAGE) DEP $(<:$(SRC_DIR)/%.mm=%.mm)'
@ -190,7 +190,7 @@ endif
# Convert x:/... paths to /x/... for mingw # Convert x:/... paths to /x/... for mingw
ifeq ($(OS), 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 @cp Makefile.dep.tmp.mingw Makefile.dep.tmp
@rm -f Makefile.dep.tmp.mingw @rm -f Makefile.dep.tmp.mingw
endif endif
@ -219,7 +219,7 @@ endif
{ \ { \
print $$0 \ 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 $(Q)rm -f Makefile.dep.tmp Makefile.dep.tmp.bak
@ -288,10 +288,10 @@ $(ENDIAN_CHECK): $(SRC_DIR)/endian_check.cpp
# Revision files # Revision files
$(SRC_DIR)/rev.cpp: $(CONFIG_CACHE_VERSION) $(SRC_DIR)/rev.cpp.in $(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 $(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: FORCE:

View File

@ -421,7 +421,7 @@ save_params() {
configure="$CONFIGURE_EXECUTABLE --ignore-extra-parameters" configure="$CONFIGURE_EXECUTABLE --ignore-extra-parameters"
for p in $save_params_array; do for p in $save_params_array; do
eval "v=\"\$$p\"" 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 # Only save those params that aren't empty
configure="$configure --$p=\"$v\"" configure="$configure --$p=\"$v\""
done done
@ -922,7 +922,7 @@ check_params() {
doc_dir="$data_dir/docs" doc_dir="$data_dir/docs"
fi fi
else 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 fi
if [ "$icon_theme_dir" = "1" ]; then if [ "$icon_theme_dir" = "1" ]; then
@ -932,7 +932,7 @@ check_params() {
icon_theme_dir="" icon_theme_dir=""
fi fi
else 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 fi
if [ "$personal_dir" = "1" ]; then if [ "$personal_dir" = "1" ]; then
@ -944,7 +944,7 @@ check_params() {
personal_dir=".openttd" personal_dir=".openttd"
fi fi
else 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 fi
if [ "$shared_dir" = "1" ]; then if [ "$shared_dir" = "1" ]; then
@ -955,7 +955,7 @@ check_params() {
shared_dir="" shared_dir=""
fi fi
else 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 fi
if [ "$man_dir" = "1" ]; then if [ "$man_dir" = "1" ]; then
@ -966,7 +966,7 @@ check_params() {
man_dir="" man_dir=""
fi fi
else 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 fi
if [ "$menu_dir" = "1" ]; then if [ "$menu_dir" = "1" ]; then
@ -977,7 +977,7 @@ check_params() {
menu_dir="" menu_dir=""
fi fi
else 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 fi
# "set_universal_binary_flags" needs to be before "detect_iconv" # "set_universal_binary_flags" needs to be before "detect_iconv"
@ -1237,7 +1237,7 @@ make_cflags_and_ldflags() {
if [ -n "$sdl_config" ]; then if [ -n "$sdl_config" ]; then
CFLAGS="$CFLAGS -DWITH_SDL" CFLAGS="$CFLAGS -DWITH_SDL"
# SDL must not add _GNU_SOURCE as it breaks many platforms # 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 [ "$os" != "MINGW" ] && [ "$os" != "CYGWIN" ] && [ "$os" != "WINCE" ]; then
if [ "$enable_static" != "0" ]; then if [ "$enable_static" != "0" ]; then
LIBS="$LIBS `$sdl_config --static-libs`" LIBS="$LIBS `$sdl_config --static-libs`"
@ -1299,7 +1299,7 @@ make_cflags_and_ldflags() {
if [ "$os" = "OSX" ]; then if [ "$os" = "OSX" ]; then
# fontconfig_config goes via pkg-config on all systems, which doesn't know --prefix # 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 # 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 else
LIBS="$LIBS `$fontconfig_config --libs --static | tr '\n\r' ' '`" LIBS="$LIBS `$fontconfig_config --libs --static | tr '\n\r' ' '`"
fi fi
@ -1433,8 +1433,8 @@ make_cflags_and_ldflags() {
# not something we can control. # not something we can control.
# Also make makedepend aware of compiler's built-in defines. # Also make makedepend aware of compiler's built-in defines.
if [ "$with_makedepend" != "0" ] || [ "$enable_builtin_depend" != "0" ]; then 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="`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="$cflags_makedep `echo "$CFLAGS" | sed 's@ /@ -@g;s@-I[ ]*[^ ]*@@g'`"
else else
makedepend="" makedepend=""
fi fi
@ -2604,105 +2604,105 @@ make_sed() {
# use multiple OBJS_DIR, because all in-between # use multiple OBJS_DIR, because all in-between
# binaries are stored in there, and nowhere else. # binaries are stored in there, and nowhere else.
SRC_REPLACE=" SRC_REPLACE="
s~!!CC_HOST!!~$cc_host~g; s@!!CC_HOST!!@$cc_host@g;
s~!!CXX_HOST!!~$cxx_host~g; s@!!CXX_HOST!!@$cxx_host@g;
s~!!CC_BUILD!!~$cc_build~g; s@!!CC_BUILD!!@$cc_build@g;
s~!!CXX_BUILD!!~$cxx_build~g; s@!!CXX_BUILD!!@$cxx_build@g;
s~!!WINDRES!!~$windres~g; s@!!WINDRES!!@$windres@g;
s~!!STRIP!!~$strip $strip_arg~g; s@!!STRIP!!@$strip $strip_arg@g;
s~!!LIPO!!~$lipo~g; s@!!LIPO!!@$lipo@g;
s~!!CC_CFLAGS!!~$CC_CFLAGS~g; s@!!CC_CFLAGS!!@$CC_CFLAGS@g;
s~!!CFLAGS!!~$T_CFLAGS~g; s@!!CFLAGS!!@$T_CFLAGS@g;
s~!!CFLAGS_BUILD!!~$CFLAGS_BUILD~g; s@!!CFLAGS_BUILD!!@$CFLAGS_BUILD@g;
s~!!STRGEN_FLAGS!!~$strgen_flags~g; s@!!STRGEN_FLAGS!!@$strgen_flags@g;
s~!!LIBS!!~$LIBS~g; s@!!LIBS!!@$LIBS@g;
s~!!LDFLAGS!!~$T_LDFLAGS~g; s@!!LDFLAGS!!@$T_LDFLAGS@g;
s~!!BIN_DIR!!~$BIN_DIR~g; s@!!BIN_DIR!!@$BIN_DIR@g;
s~!!ROOT_DIR!!~$ROOT_DIR~g; s@!!ROOT_DIR!!@$ROOT_DIR@g;
s~!!MEDIA_DIR!!~$MEDIA_DIR~g; s@!!MEDIA_DIR!!@$MEDIA_DIR@g;
s~!!SOURCE_LIST!!~$SOURCE_LIST~g; s@!!SOURCE_LIST!!@$SOURCE_LIST@g;
s~!!SRC_OBJS_DIR!!~$SRC_OBJS_DIR~g; s@!!SRC_OBJS_DIR!!@$SRC_OBJS_DIR@g;
s~!!LANG_OBJS_DIR!!~$LANG_OBJS_DIR~g; s@!!LANG_OBJS_DIR!!@$LANG_OBJS_DIR@g;
s~!!SRC_DIR!!~$SRC_DIR~g; s@!!SRC_DIR!!@$SRC_DIR@g;
s~!!SCRIPT_SRC_DIR!!~$SCRIPT_SRC_DIR~g; s@!!SCRIPT_SRC_DIR!!@$SCRIPT_SRC_DIR@g;
s~!!OSXAPP!!~$OSXAPP~g; s@!!OSXAPP!!@$OSXAPP@g;
s~!!LANG_DIR!!~$LANG_DIR~g; s@!!LANG_DIR!!@$LANG_DIR@g;
s~!!TTD!!~$TTD~g; s@!!TTD!!@$TTD@g;
s~!!BINARY_DIR!!~$prefix_dir/$binary_dir~g; s@!!BINARY_DIR!!@$prefix_dir/$binary_dir@g;
s~!!DATA_DIR!!~$prefix_dir/$data_dir~g; s@!!DATA_DIR!!@$prefix_dir/$data_dir@g;
s~!!DOC_DIR!!~$prefix_dir/$doc_dir~g; s@!!DOC_DIR!!@$prefix_dir/$doc_dir@g;
s~!!MAN_DIR!!~$prefix_dir/$man_dir~g; s@!!MAN_DIR!!@$prefix_dir/$man_dir@g;
s~!!ICON_DIR!!~$prefix_dir/$icon_dir~g; s@!!ICON_DIR!!@$prefix_dir/$icon_dir@g;
s~!!ICON_THEME_DIR!!~$prefix_dir/$icon_theme_dir~g; s@!!ICON_THEME_DIR!!@$prefix_dir/$icon_theme_dir@g;
s~!!PERSONAL_DIR!!~$personal_dir~g; s@!!PERSONAL_DIR!!@$personal_dir@g;
s~!!SHARED_DIR!!~$shared_dir~g; s@!!SHARED_DIR!!@$shared_dir@g;
s~!!INSTALL_DIR!!~$install_dir~g; s@!!INSTALL_DIR!!@$install_dir@g;
s~!!BINARY_NAME!!~$binary_name~g; s@!!BINARY_NAME!!@$binary_name@g;
s~!!STRGEN!!~$STRGEN~g; s@!!STRGEN!!@$STRGEN@g;
s~!!ENDIAN_CHECK!!~$ENDIAN_CHECK~g; s@!!ENDIAN_CHECK!!@$ENDIAN_CHECK@g;
s~!!DEPEND!!~$DEPEND~g; s@!!DEPEND!!@$DEPEND@g;
s~!!ENDIAN_FORCE!!~$endian~g; s@!!ENDIAN_FORCE!!@$endian@g;
s~!!STAGE!!~$STAGE~g; s@!!STAGE!!@$STAGE@g;
s~!!MAKEDEPEND!!~$makedepend~g; s@!!MAKEDEPEND!!@$makedepend@g;
s~!!CFLAGS_MAKEDEP!!~$cflags_makedep~g; s@!!CFLAGS_MAKEDEP!!@$cflags_makedep@g;
s~!!SORT!!~$sort~g; s@!!SORT!!@$sort@g;
s~!!CONFIG_CACHE_COMPILER!!~config.cache.compiler~g; s@!!CONFIG_CACHE_COMPILER!!@config.cache.compiler@g;
s~!!CONFIG_CACHE_LINKER!!~config.cache.linker~g; s@!!CONFIG_CACHE_LINKER!!@config.cache.linker@g;
s~!!CONFIG_CACHE_ENDIAN!!~config.cache.endian~g; s@!!CONFIG_CACHE_ENDIAN!!@config.cache.endian@g;
s~!!CONFIG_CACHE_SOURCE!!~config.cache.source~g; s@!!CONFIG_CACHE_SOURCE!!@config.cache.source@g;
s~!!CONFIG_CACHE_VERSION!!~config.cache.version~g; s@!!CONFIG_CACHE_VERSION!!@config.cache.version@g;
s~!!CONFIG_CACHE_SOURCE_LIST!!~config.cache.source.list~g; s@!!CONFIG_CACHE_SOURCE_LIST!!@config.cache.source.list@g;
s~!!CONFIG_CACHE_PWD!!~config.cache.pwd~g; s@!!CONFIG_CACHE_PWD!!@config.cache.pwd@g;
s~!!LANG_SUPPRESS!!~$lang_suppress~g; s@!!LANG_SUPPRESS!!@$lang_suppress@g;
s~!!OBJS_C!!~$OBJS_C~g; s@!!OBJS_C!!@$OBJS_C@g;
s~!!OBJS_CPP!!~$OBJS_CPP~g; s@!!OBJS_CPP!!@$OBJS_CPP@g;
s~!!OBJS_MM!!~$OBJS_MM~g; s@!!OBJS_MM!!@$OBJS_MM@g;
s~!!OBJS_RC!!~$OBJS_RC~g; s@!!OBJS_RC!!@$OBJS_RC@g;
s~!!SRCS!!~$SRCS~g; s@!!SRCS!!@$SRCS@g;
s~!!OS!!~$os~g; s@!!OS!!@$os@g;
s~!!CONFIGURE_FILES!!~$CONFIGURE_FILES~g; s@!!CONFIGURE_FILES!!@$CONFIGURE_FILES@g;
s~!!REVISION!!~$revision~g; s@!!REVISION!!@$revision@g;
s~!!AWK!!~$awk~g; s@!!AWK!!@$awk@g;
s~!!GCC295!!~$gcc295~g; s@!!GCC295!!@$gcc295@g;
s~!!DISTCC!!~$distcc~g; s@!!DISTCC!!@$distcc@g;
" "
if [ "$icon_theme_dir" != "" ]; then if [ "$icon_theme_dir" != "" ]; then
SRC_REPLACE="$SRC_REPLACE 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 else
SRC_REPLACE="$SRC_REPLACE SRC_REPLACE="$SRC_REPLACE
s~!!ICON_THEME_DIR!!~~g; s@!!ICON_THEME_DIR!!@@g;
" "
fi fi
if [ "$man_dir" != "" ]; then if [ "$man_dir" != "" ]; then
SRC_REPLACE="$SRC_REPLACE SRC_REPLACE="$SRC_REPLACE
s~!!MAN_DIR!!~$prefix_dir/$man_dir~g; s@!!MAN_DIR!!@$prefix_dir/$man_dir@g;
" "
else else
SRC_REPLACE="$SRC_REPLACE SRC_REPLACE="$SRC_REPLACE
s~!!MAN_DIR!!~~g; s@!!MAN_DIR!!@@g;
" "
fi fi
if [ "$menu_dir" != "" ]; then if [ "$menu_dir" != "" ]; then
SRC_REPLACE="$SRC_REPLACE SRC_REPLACE="$SRC_REPLACE
s~!!MENU_DIR!!~$prefix_dir/$menu_dir~g; s@!!MENU_DIR!!@$prefix_dir/$menu_dir@g;
" "
else else
SRC_REPLACE="$SRC_REPLACE SRC_REPLACE="$SRC_REPLACE
s~!!MENU_DIR!!~~g; s@!!MENU_DIR!!@@g;
" "
fi fi
} }
generate_menu_item() { generate_menu_item() {
MENU_REPLACE=" MENU_REPLACE="
s~!!TTD!!~$TTD~g; s@!!TTD!!@$TTD@g;
s~!!MENU_GROUP!!~$menu_group~g; s@!!MENU_GROUP!!@$menu_group@g;
s~!!MENU_NAME!!~$menu_name~g s@!!MENU_NAME!!@$menu_name@g
" "
log 1 "Generating menu item..." log 1 "Generating menu item..."
mkdir -p media mkdir -p media

6
configure vendored
View File

@ -47,7 +47,7 @@ if [ "$1" = "--reconfig" ] || [ "$1" = "--reconfigure" ]; then
exit 1 exit 1
fi fi
# Make sure we don't lock config.cache # 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 sh cache.tmp
rm -f cache.tmp rm -f cache.tmp
exit $? exit $?
@ -70,7 +70,7 @@ ENDIAN_CHECK="endian_check$EXE"
DEPEND="depend$EXE" DEPEND="depend$EXE"
if [ -z "$sort" ]; then if [ -z "$sort" ]; then
PIPE_SORT="sed s~a~a~" PIPE_SORT="sed s@a@a@"
else else
PIPE_SORT="$sort" PIPE_SORT="$sort"
fi fi
@ -136,7 +136,7 @@ SRCS="` echo \"$SRCS\" | $awk ' { ORS = " " } { print $0; }'`"
# In makefiles, we always use -u for sort # In makefiles, we always use -u for sort
if [ -z "$sort" ]; then if [ -z "$sort" ]; then
sort="sed s~a~a~" sort="sed s@a@a@"
else else
sort="$sort -u" sort="$sort -u"
fi fi

View File

@ -86,8 +86,8 @@ elif [ -d "$ROOT_DIR/.git" ]; then
fi fi
HASH=`LC_ALL=C git rev-parse --verify HEAD 2>/dev/null` HASH=`LC_ALL=C git rev-parse --verify HEAD 2>/dev/null`
REV="g`echo $HASH | cut -c1-8`" REV="g`echo $HASH | cut -c1-8`"
BRANCH=`git branch|grep '[*]' | sed 's~\* ~~;s~^master$~~'` 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~"` 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 elif [ -d "$ROOT_DIR/.hg" ]; then
# We are a hg checkout # We are a hg checkout
if [ -n "`hg status \"$SRC_DIR\" | grep -v '^?'`" ]; then if [ -n "`hg status \"$SRC_DIR\" | grep -v '^?'`" ]; then
@ -95,8 +95,8 @@ elif [ -d "$ROOT_DIR/.hg" ]; then
fi fi
HASH=`LC_ALL=C hg parents 2>/dev/null | head -n 1 | cut -d: -f3` HASH=`LC_ALL=C hg parents 2>/dev/null | head -n 1 | cut -d: -f3`
REV="h`echo $HASH | cut -c1-8`" REV="h`echo $HASH | cut -c1-8`"
BRANCH=`hg branch | sed 's~^default$~~'` 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~"` 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 else
# We don't know # We don't know
MODIFIED="1" MODIFIED="1"

View File

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

View File

@ -64,8 +64,8 @@ END
// //
VS_VERSION_INFO VERSIONINFO VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,8,0,@@REVISION@@ FILEVERSION 0,8,0,!!REVISION!!
PRODUCTVERSION 0,8,0,@@REVISION@@ PRODUCTVERSION 0,8,0,!!REVISION!!
FILEFLAGSMASK 0x3fL FILEFLAGSMASK 0x3fL
#ifdef _DEBUG #ifdef _DEBUG
FILEFLAGS 0x1L FILEFLAGS 0x1L
@ -83,14 +83,14 @@ BEGIN
VALUE "Comments", "This program is licensed under the GNU General Public License.\0" VALUE "Comments", "This program is licensed under the GNU General Public License.\0"
VALUE "CompanyName", "OpenTTD Development Team\0" VALUE "CompanyName", "OpenTTD Development Team\0"
VALUE "FileDescription", "OpenTTD\0" VALUE "FileDescription", "OpenTTD\0"
VALUE "FileVersion", "Development @@VERSION@@\0" VALUE "FileVersion", "Development !!VERSION!!\0"
VALUE "InternalName", "openttd\0" VALUE "InternalName", "openttd\0"
VALUE "LegalCopyright", "Copyright \xA9 OpenTTD Developers 2002-2009. All Rights Reserved.\0" VALUE "LegalCopyright", "Copyright \xA9 OpenTTD Developers 2002-2009. All Rights Reserved.\0"
VALUE "LegalTrademarks", "\0" VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "openttd.exe\0" VALUE "OriginalFilename", "openttd.exe\0"
VALUE "PrivateBuild", "\0" VALUE "PrivateBuild", "\0"
VALUE "ProductName", "OpenTTD\0" VALUE "ProductName", "OpenTTD\0"
VALUE "ProductVersion", "Development @@VERSION@@\0" VALUE "ProductVersion", "Development !!VERSION!!\0"
VALUE "SpecialBuild", "-\0" VALUE "SpecialBuild", "-\0"
END END
END END

View File

@ -20,7 +20,7 @@
* norev000 is for non-releases that are made on systems without * norev000 is for non-releases that are made on systems without
* subversion or sources that are not a checkout of subversion. * 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 * Let us know if current build was modified. This detection
@ -30,7 +30,7 @@ const char _openttd_revision[] = "@@VERSION@@";
* (compiling from sources without any version control software) * (compiling from sources without any version control software)
* and 2 is for modified revision. * and 2 is for modified revision.
*/ */
const byte _openttd_revision_modified = @@MODIFIED@@; const byte _openttd_revision_modified = !!MODIFIED!!;
/** /**
* The NewGRF revision of OTTD: * The NewGRF revision of OTTD:
@ -45,11 +45,11 @@ const byte _openttd_revision_modified = @@MODIFIED@@;
* final release will always have a lower version number than the released * final release will always have a lower version number than the released
* version, thus making comparisions on specific revisions easy. * 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__ #ifdef __MORPHOS__
/** /**
* Variable used by MorphOS to show the version. * 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 #endif