diff options
author | Thomas Orgis | 2015-04-23 09:51:06 +0200 |
---|---|---|
committer | Thomas Orgis | 2015-04-23 09:51:06 +0200 |
commit | 3fd574c7a86894b1c963f8589d1d0b9632f3497e (patch) | |
tree | bf83521dd7f6dfe2c3c98e524dc808e5b7edf11e /FUNCTIONS | |
parent | 144d5c558340b527c970f38b9d34b302f13a8fd1 (diff) |
FUNCTIONS: more robust waf_build
Diffstat (limited to 'FUNCTIONS')
-rwxr-xr-x | FUNCTIONS | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -508,12 +508,22 @@ function note_config_files() { # please use this one instead of maunaly calling waf when possible # Disabled caching as this has GREAT potential for borkage # and waf is fast without it as well +# The waf disables options between versions and bails out if they are given, +# so check first if they are supported.. function waf_build() { - ./waf configure --prefix=${INSTALL_ROOT}/usr \ - --mandir=${INSTALL_ROOT}/usr/share/man \ + local waf_opts="--prefix=$INSTALL_ROOT/usr" + # Some waf not know man, waf angry with man. + if ./waf --help | grep -q -- --mandir; then + waf_opts="$waf_opts --mandir=$INSTALL_ROOT/usr/share/man" + fi + # Same with some other options. + if ./waf --help | grep -q -- --nocache; then + waf_opts="$waf_opts --nocache" + fi + ./waf configure $waf_opts \ -j $MAKE_NJOBS \ - --nocache $OPTS && + $OPTS && ./waf build } |