Changeset 868c6b8 for wscript


Ignore:
Timestamp:
Dec 19, 2018, 6:16:29 PM (5 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/constantq
Children:
dfe6ab6
Parents:
f87e191 (diff), fda3394 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into feature/constantq

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wscript

    rf87e191 r868c6b8  
    518518    sphinx(bld)
    519519
     520    from waflib.Tools import waf_unit_test
     521    bld.add_post_fun(waf_unit_test.summary)
     522    bld.add_post_fun(waf_unit_test.set_exit_code)
     523
    520524def txt2man(bld):
    521525    # build manpages from txt files using txt2man
     
    543547    if bld.env['DOXYGEN']:
    544548        bld.env.VERSION = VERSION
    545         rule = '( cat ${SRC} && echo PROJECT_NUMBER=${VERSION}; )'
     549        rule = '( cat ${SRC[0]} && echo PROJECT_NUMBER=${VERSION}'
     550        rule += ' && echo OUTPUT_DIRECTORY=%s && echo HTML_OUTPUT=%s )'
    546551        rule += ' | doxygen - > /dev/null'
     552        rule %= (os.path.abspath(out), 'api')
    547553        bld( name = 'doxygen', rule = rule,
    548                 source = 'doc/web.cfg',
    549                 target = '../doc/web/html/index.html',
    550                 cwd = 'doc')
    551         bld.install_files( '${DATAROOTDIR}' + '/doc/libaubio-doc',
    552                 bld.path.ant_glob('doc/web/html/**'),
    553                 cwd = bld.path.find_dir ('doc/web'),
    554                 relative_trick = True)
     554                source = ['doc/web.cfg']
     555                    + bld.path.find_dir('src').ant_glob('**/*.h'),
     556                target = bld.path.find_or_declare('api/index.html'),
     557                cwd = bld.path.find_dir('doc'))
     558        # evaluate nodes lazily to prevent build directory traversal warnings
     559        bld.install_files('${DATAROOTDIR}/doc/libaubio-doc/api',
     560                bld.path.find_or_declare('api').ant_glob('**/*',
     561                    generator=True), cwd=bld.path.find_or_declare('api'),
     562                relative_trick=True)
    555563
    556564def sphinx(bld):
    557     # build documentation from source files using sphinx-build note: build in
    558     # ../doc/_build/html, otherwise waf wont install unsigned files
    559     if bld.env['SPHINX']:
     565    # build documentation from source files using sphinx-build
     566    try:
     567        import aubio
     568        has_aubio = True
     569    except ImportError:
     570        from waflib import Logs
     571        Logs.pprint('YELLOW', "Sphinx manual: install aubio first")
     572        has_aubio = False
     573    if bld.env['SPHINX'] and has_aubio:
    560574        bld.env.VERSION = VERSION
    561         bld( name = 'sphinx',
    562                 rule = '${SPHINX} -b html -D release=${VERSION}' \
    563                         ' -D version=${VERSION} -a -q' \
    564                         ' `dirname ${SRC}` `dirname ${TGT}`',
    565                 source = 'doc/conf.py',
    566                 target = '../doc/_build/html/index.html')
    567         bld.install_files( '${DATAROOTDIR}' + '/doc/libaubio-doc/sphinx',
    568                 bld.path.ant_glob('doc/_build/html/**'),
    569                 cwd = bld.path.find_dir('doc/_build/html'),
    570                 relative_trick = True)
     575        rule = '${SPHINX} -b html -D release=${VERSION}' \
     576                ' -D version=${VERSION} -W -a -q' \
     577                ' -d %s ' % os.path.join(os.path.abspath(out), 'doctrees')
     578        rule += ' . %s' % os.path.join(os.path.abspath(out), 'manual')
     579        bld( name = 'sphinx', rule = rule,
     580                cwd = bld.path.find_dir('doc'),
     581                source = bld.path.find_dir('doc').ant_glob('*.rst'),
     582                target = bld.path.find_or_declare('manual/index.html'))
     583        # evaluate nodes lazily to prevent build directory traversal warnings
     584        bld.install_files('${DATAROOTDIR}/doc/libaubio-doc/manual',
     585                bld.path.find_or_declare('manual').ant_glob('**/*',
     586                    generator=True), cwd=bld.path.find_or_declare('manual'),
     587                relative_trick=True)
    571588
    572589# register the previous rules as build rules
Note: See TracChangeset for help on using the changeset viewer.