diff options
author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2013-03-14 18:54:48 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-04-02 18:58:30 +0200 |
commit | d8a127fdcc3575f3a478aec452f10bd60966a2c2 (patch) | |
tree | 33f8beeab9316890b0a180128feb2f84f52d8477 /configure | |
parent | 6c9e8e611fe2bc915211bafb2faa9151afad91d7 (diff) |
don't try to de-duplicate QMAKE_DEFAULT_{INC,LIB}DIRS
the de-duplication has the side effect of sorting, which is a very bad
idea: x-compilers tend to append the host library paths at the end, and
we really want them to stay at the end.
and the lists should have no duplicates to start with. should we find a
compiler which breaks this assumption, we can use qmake's $$unique()
strategically.
Change-Id: I01560e3c33736c2dfffdb05d5c960c492439c946
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -2962,14 +2962,16 @@ fi # auto-detect default include and library search paths gccout=`$TEST_COMPILER $SYSROOT_FLAG $TEST_COMPILER_CXXFLAGS -xc++ -E -v - < /dev/null 2>&1 > /dev/null` +# extract from one line like 'LIBRARY_PATH=/one/path:/another/path:...' libdirs=`echo "$gccout" | sed -n -e 's/^LIBRARY_PATH=\(.*\)/\1/p'` -DEFAULT_LIBDIRS=`IFS=${HOST_DIRLIST_SEP}; for i in $libdirs; do test -d "$i" && cd "$i" && pwd; done | sort -u` +DEFAULT_LIBDIRS=`IFS=${HOST_DIRLIST_SEP}; for i in $libdirs; do test -d "$i" && cd "$i" && pwd; done` +# extract from indented lines between '#include <...> search starts here:' and 'End of search list.' DEFAULT_INCDIRS=`echo "$gccout" | awk ' /^End of search/ { yup=0 } / \(framework directory\)$/ { next } yup { print substr($0, 2) } /^\#include </ { yup=1 } -' | sort -u` +'` test -z "$DEFAULT_LIBDIRS" && DEFAULT_LIBDIRS="/lib /usr/lib" test -z "$DEFAULT_INCDIRS" && DEFAULT_INCDIRS="/usr/include |