mirror of https://github.com/OpenTTD/OpenTTD
(svn r17026) -Fix [FS#3076]: "[bd]ash"-ism in configure
parent
5d083f3039
commit
144a84a348
|
@ -1434,7 +1434,9 @@ make_cflags_and_ldflags() {
|
||||||
# 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'`"
|
|
||||||
|
# Please escape ALL " within ` because e.g. "" terminates the string in some sh implementations
|
||||||
|
cflags_makedep="$cflags_makedep `echo \"$CFLAGS\" | sed 's@ /@ -@g;s@-I[ ]*[^ ]*@@g'`"
|
||||||
else
|
else
|
||||||
makedepend=""
|
makedepend=""
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -86,7 +86,7 @@ if [ ! -f "$LANG_DIR/english.txt" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Read the source.list and process it
|
# Read the source.list and process it
|
||||||
SRCS="`< $ROOT_DIR/source.list tr '\r' '\n' | $awk '
|
AWKCOMMAND='
|
||||||
{ }
|
{ }
|
||||||
/^( *)#end/ { if (deep == skip) { skip -= 1; } deep -= 1; next; }
|
/^( *)#end/ { if (deep == skip) { skip -= 1; } deep -= 1; next; }
|
||||||
/^( *)#else/ { if (deep == skip) { skip -= 1; } else if (deep - 1 == skip) { skip += 1; } next; }
|
/^( *)#else/ { if (deep == skip) { skip -= 1; } else if (deep - 1 == skip) { skip += 1; } next; }
|
||||||
|
@ -131,13 +131,17 @@ SRCS="`< $ROOT_DIR/source.list tr '\r' '\n' | $awk '
|
||||||
print $0;
|
print $0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
' | $PIPE_SORT`"
|
'
|
||||||
|
|
||||||
OBJS_C="` echo \"$SRCS\" | $awk ' { ORS = " " } /\.c$/ { gsub(".c$", ".o", $0); print $0; }'`"
|
# Read the source.list and process it
|
||||||
OBJS_CPP="`echo \"$SRCS\" | $awk ' { ORS = " " } /\.cpp$/ { gsub(".cpp$", ".o", $0); print $0; }'`"
|
# Please escape ALL " within ` because e.g. "" terminates the string in some sh implementations
|
||||||
OBJS_MM="` echo \"$SRCS\" | $awk ' { ORS = " " } /\.mm$/ { gsub(".mm$", ".o", $0); print $0; }'`"
|
SRCS="`< $ROOT_DIR/source.list tr '\r' '\n' | $awk \"$AWKCOMMAND\" | $PIPE_SORT`"
|
||||||
OBJS_RC="` echo \"$SRCS\" | $awk ' { ORS = " " } /\.rc$/ { gsub(".rc$", ".o", $0); print $0; }'`"
|
|
||||||
SRCS="` echo \"$SRCS\" | $awk ' { ORS = " " } { print $0; }'`"
|
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
|
# In makefiles, we always use -u for sort
|
||||||
if [ -z "$sort" ]; then
|
if [ -z "$sort" ]; then
|
||||||
|
|
Loading…
Reference in New Issue