Fix: deps calculation call could fail due to command line length

This commit is contained in:
glx
2019-01-15 02:26:54 +01:00
committed by Charles Pigott
parent 5a09337c20
commit ee84f98f1e
2 changed files with 15 additions and 9 deletions

View File

@@ -1959,7 +1959,7 @@ make_cflags_and_ldflags() {
cflags_makedep="`echo | $cxx_host $CXXFLAGS -E -x c++ -dM - | sed 's@.define @-D@g;s@ .*@ @g;s@(.*)@@g' | tr -d '\r\n'`"
# Please escape ALL " within ` because e.g. "" terminates the string in some sh implementations
cflags_makedep="$cflags_makedep `echo \"$CFLAGS\" \"$CXXFLAGS\" | sed 's@ /@ -@g;s@-I[ ]*[^ ]*@@g'`"
cflags_makedep="$cflags_makedep `echo \"$CFLAGS\" \"$CXXFLAGS\" | sed 's@ /@ -@g;s@-I[ ]*[^ ]*@@g;s@[ ]*-[^D][^ ]*@@g'`"
else
makedepend=""
fi