1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-14 01:59:09 +00:00

(svn r16164) -Fix: make dependencies checking more accurate by using compiler's built-in defines

This commit is contained in:
glx
2009-04-26 16:03:50 +00:00
parent 85b653bafc
commit 779640b53a

View File

@@ -1400,8 +1400,10 @@ make_cflags_and_ldflags() {
# 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" ]; then
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