Changeset 7b38f3f for wscript


Ignore:
Timestamp:
Dec 10, 2016, 11:33:37 PM (3 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, sampler, yinfft+
Children:
ce7d03e
Parents:
4e56c55
Message:

wscript: add 'manpages', 'sphinx', and 'doxygen' methods to build doc, improve sphinx build, exclude tarball

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wscript

    r4e56c55 r7b38f3f  
    355355    bld.env['LIB_VERSION'] = LIB_VERSION
    356356
     357    # main source
     358    bld.recurse('src')
     359
    357360    # add sub directories
    358     bld.recurse('src')
    359361    if bld.env['DEST_OS'] not in ['ios', 'iosimulator', 'android']:
    360362        bld.recurse('examples')
    361363        bld.recurse('tests')
    362364
     365    # pkg-config template
    363366    bld( source = 'aubio.pc.in' )
    364367
     368    # documentation
     369    txt2man(bld)
     370    doxygen(bld)
     371    sphinx(bld)
     372
     373def txt2man(bld):
    365374    # build manpages from txt files using txt2man
    366375    if bld.env['TXT2MAN']:
     
    382391        bld( source = bld.path.ant_glob('doc/*.txt') )
    383392
     393def doxygen(bld):
    384394    # build documentation from source files using doxygen
    385395    if bld.env['DOXYGEN']:
     
    392402                relative_trick = True)
    393403
     404def sphinx(bld):
    394405    # build documentation from source files using sphinx-build
    395406    if bld.env['SPHINX']:
    396         bld( name = 'sphinx', rule = 'make html',
    397                 source = ['doc/conf.py'] + bld.path.ant_glob('doc/**.rst'),
    398                 cwd = 'doc')
     407        bld( name = 'sphinx', rule = '${SPHINX} -b html -a -q ../doc sphinx',
     408                source = 'doc/conf.py',
     409                target = ['sphinx/'])
    399410        bld.install_files( '${DATAROOTDIR}' + '/doc/libaubio-doc/sphinx',
    400411                bld.path.ant_glob('doc/_build/html/**'),
    401412                cwd = bld.path.find_dir ('doc/_build/html'),
    402413                relative_trick = True)
     414
     415# register the previous rules as build rules
     416from waflib.Build import BuildContext
     417
     418class build_txt2man(BuildContext):
     419    cmd = 'txt2man'
     420    fun = 'txt2man'
     421
     422class build_manpages(BuildContext):
     423    cmd = 'manpages'
     424    fun = 'txt2man'
     425
     426class build_sphinx(BuildContext):
     427    cmd = 'sphinx'
     428    fun = 'sphinx'
     429
     430class build_doxygen(BuildContext):
     431    cmd = 'doxygen'
     432    fun = 'doxygen'
    403433
    404434def shutdown(bld):
     
    420450    ctx.excl += ' **.egg-info'
    421451    ctx.excl += ' **/**.zip **/**.tar.bz2'
     452    ctx.excl += ' **.tar.bz2'
    422453    ctx.excl += ' **/doc/full/* **/doc/web/*'
    423454    ctx.excl += ' **/python/*.db'
Note: See TracChangeset for help on using the changeset viewer.