|
@@ -101,49 +101,48 @@ AWKCOMMAND='
|
|
|
/^( *)#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 == "DEDICATED" && "'$enable_dedicated'" != "1") { next; }
|
|
|
if ($0 == "AI" && "'$enable_ai'" == "0") { next; }
|
|
|
if ($0 == "COCOA" && "'$with_cocoa'" == "0") { next; }
|
|
|
if ($0 == "DOS" && "'$os'" != "DOS") { next; }
|
|
|
if ($0 == "HAIKU" && "'$os'" != "HAIKU") { next; }
|
|
|
if ($0 == "WIN32" && "'$os'" != "MINGW" &&
|
|
|
"'$os'" != "CYGWIN" && "'$os'" != "MSVC") { next; }
|
|
|
if ($0 == "MSVC" && "'$os'" != "MSVC") { next; }
|
|
|
if ($0 == "DIRECTMUSIC" && "'$with_direct_music'" == "0") { next; }
|
|
|
if ($0 == "LIBTIMIDITY" && "'$libtimidity'" == "" ) { next; }
|
|
|
if ($0 == "FLUIDSYNTH" && "'$fluidsynth'" == "" ) { next; }
|
|
|
if ($0 == "HAVE_THREAD" && "'$with_threads'" == "0") { next; }
|
|
|
if ($0 == "SSE" && "'$with_sse'" != "1") { next; }
|
|
|
|
|
|
skip += 1;
|
|
|
|
|
|
next;
|
|
|
}
|
|
|
/^( *)#/ { next }
|
|
|
/^$/ { next }
|
|
|
/\.h$/ { next }
|
|
|
/\.hpp$/ { next }
|
|
|
{
|
|
|
if (deep == skip) {
|
|
|
gsub(" ", "", $0);
|
|
|
print $0;
|
|
|
}
|
|
|
}
|
|
|
'
|
|
|
|
|
|
# Read the source.list and process it
|
|
|
# Please escape ALL " within ` because e.g. "" terminates the string in some sh implementations
|
|
|
SRCS="`< $ROOT_DIR/source.list tr '\r' '\n' | $awk \"$AWKCOMMAND\" | LC_ALL=C $PIPE_SORT`"
|
|
|
|