Files
@ r11980:193f7a6b6e37
Branch filter:
Location: cpp/openttd-patchpack/source/configure - annotation
r11980:193f7a6b6e37
4.6 KiB
text/plain
(svn r16391) -Codechange: use Train instead of Vehicle where appropriate.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | r3198:2fd76a5c7026 r3198:2fd76a5c7026 r11880:02a6568b43ea r11880:02a6568b43ea r11880:02a6568b43ea r11880:02a6568b43ea r11880:02a6568b43ea r11880:02a6568b43ea r11880:02a6568b43ea r11880:02a6568b43ea r6246:05127c85a10b r6246:05127c85a10b r6246:05127c85a10b r6387:c2b5fc2f69cb r6387:c2b5fc2f69cb r6387:c2b5fc2f69cb r6387:c2b5fc2f69cb r6339:53a33070f380 r6339:53a33070f380 r6339:53a33070f380 r6339:53a33070f380 r6246:05127c85a10b r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r3198:2fd76a5c7026 r11880:02a6568b43ea r11880:02a6568b43ea r5475:3f5cd13d1b63 r9962:288ef297f5e3 r3198:2fd76a5c7026 r5475:3f5cd13d1b63 r3198:2fd76a5c7026 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r3198:2fd76a5c7026 r8080:18ba871a1f5b r9758:639c35eca387 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r11911:68c886dabb52 r5560:3a25b20628de r5560:3a25b20628de r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r3198:2fd76a5c7026 r5475:3f5cd13d1b63 r5486:22474c931347 r6811:1bece01dbf0a r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r3198:2fd76a5c7026 r5475:3f5cd13d1b63 r10385:d164fb8e2b21 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r11902:1d7b999e8b04 r5475:3f5cd13d1b63 r5558:87193b0bf8bb r11911:68c886dabb52 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r3198:2fd76a5c7026 r3198:2fd76a5c7026 r9758:639c35eca387 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r3205:d6457bf4d56d r3205:d6457bf4d56d r5475:3f5cd13d1b63 r6081:185aed7a2254 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r3205:d6457bf4d56d r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r10379:941352ab53b3 r5475:3f5cd13d1b63 r6901:0ac8fd77d505 r5475:3f5cd13d1b63 r5589:5e73b493e4bc r5957:394583cb3593 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r10400:576ffcc0a2be r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r9119:839152b932a1 r5753:bbe19c062464 r5475:3f5cd13d1b63 r5480:d3f0d8831363 r6035:172ee15a26d5 r8934:d5858392238b r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r3198:2fd76a5c7026 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r3200:de20afe05adc r6081:185aed7a2254 r6081:185aed7a2254 r6081:185aed7a2254 r6081:185aed7a2254 r6081:185aed7a2254 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5558:87193b0bf8bb r11911:68c886dabb52 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r3200:de20afe05adc r3200:de20afe05adc r10333:ad6d19331c7c r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r5475:3f5cd13d1b63 r11880:02a6568b43ea r11880:02a6568b43ea | #!/bin/sh
check_path_characters() {
if [ -n "`echo $ROOT_DIR | grep '[^-_A-Za-z0-9\/\\\.:]'`" ]; then
echo "WARNING: The path contains a non-alphanumeric character that might cause"
echo " failures in subsequent build stages. Any failures with the build"
echo " will most likely be caused by this."
fi
}
CONFIGURE_EXECUTABLE="$_"
# On *nix systems those two are equal when ./configure is done
if [ "$0" != "$CONFIGURE_EXECUTABLE" ]; then
# On some systems, when ./configure is triggered from 'make'
# the $_ is filled with 'make'. So if that is true, skip 'make'
# and use $0 (and hope that is correct ;))
if [ -n "`echo $CONFIGURE_EXECUTABLE | grep make`" ]; then
CONFIGURE_EXECUTABLE="$0"
else
CONFIGURE_EXECUTABLE="$CONFIGURE_EXECUTABLE $0"
fi
fi
# Find out where configure is (in what dir)
ROOT_DIR="`dirname $0`"
ROOT_DIR="`cd $ROOT_DIR && pwd`"
check_path_characters
PWD="`pwd`"
PREFIX="$PWD/bin"
. $ROOT_DIR/config.lib
# 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
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
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@"
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 '
{ }
/^( *)#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);
if (deep != skip) { deep += 1; next; }
deep += 1;
if ($0 == "ALLEGRO" && "'$allegro_config'" == "") { next; }
if ($0 == "SDL" && "'$sdl_config'" == "") { next; }
if ($0 == "PNG" && "'$png_config'" == "") { next; }
if ($0 == "OSX" && "'$os'" != "OSX") { next; }
if ($0 == "OS2" && "'$os'" != "OS2") { next; }
if ($0 == "PSP" && "'$os'" != "PSP") { next; }
if ($0 == "DEDICATED" && "'$enable_dedicated'" != "1") { next; }
if ($0 == "COCOA" && "'$with_cocoa'" == "0") { next; }
if ($0 == "DOS" && "'$os'" != "DOS") { next; }
if ($0 == "BEOS" && "'$os'" != "BEOS") { next; }
if ($0 == "WIN32" && "'$os'" != "MINGW" &&
"'$os'" != "CYGWIN" && "'$os'" != "MSVC" ) { next; }
if ($0 == "MORPHOS" && "'$os'" != "MORPHOS") { next; }
if ($0 == "WINCE" && "'$os'" != "WINCE") { next; }
if ($0 == "MSVC" && "'$os'" != "MSVC") { next; }
if ($0 == "DIRECTMUSIC" && "'$with_direct_music'" == "0") { next; }
if ($0 == "LIBTIMIDITY" && "'$libtimidity'" == "" ) { next; }
if ($0 == "HAVE_THREAD" && "'$with_threads'" == "0") { next; }
skip += 1;
next;
}
/^( *)#/ { next }
/^$/ { next }
/\.h$/ { next }
/\.hpp$/ { next }
{
if (deep == skip) {
gsub(" ", "", $0);
print $0;
}
}
' | $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@"
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
|