Changeset 8e8094a in rtems-docs


Ignore:
Timestamp:
Oct 13, 2017, 12:46:00 AM (21 months ago)
Author:
Chris Johns <chrisj@…>
Branches:
master
Children:
2804294
Parents:
2c3cf21
git-author:
Chris Johns <chrisj@…> (10/13/17 00:46:00)
git-committer:
Joel Sherrill <joel@…> (10/13/17 01:25:20)
Message:

build: Add extra source to the sphinx build.

Updates #3177.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • common/waf.py

    r2c3cf21 r8e8094a  
    2626
    2727def sphinx_cmdline(ctx, build_type, conf_dir, doctrees, source_dir, output_dir):
    28     rule = "${BIN_SPHINX_BUILD} %s -b %s -c %s %s -d %s %s %s" % \
     28    rule = "${BIN_SPHINX_BUILD} %s -b %s -c %s %s -d %s %s %s ${SRC}" % \
    2929           (sphinx_verbose(ctx), build_type, conf_dir, version_cmdline(ctx),
    3030            doctrees, source_dir, output_dir)
     
    235235                          "(https://github.com/remy/inliner)")
    236236
    237 def doc_pdf(ctx, source_dir, conf_dir):
     237def doc_pdf(ctx, source_dir, conf_dir, extra_source):
    238238    buildtype = 'latex'
    239239    build_dir, output_node, output_dir, doctrees = build_dir_setup(ctx, buildtype)
     
    243243        rule         = rule,
    244244        cwd          = ctx.path,
    245         source       = ctx.path.ant_glob('**/*.rst'),
     245        source       = ctx.path.ant_glob('**/*.rst') + extra_source,
    246246        target       = ctx.path.find_or_declare("%s/%s.tex" % (buildtype,
    247247                                                               ctx.path.name))
     
    259259                      quiet = True)
    260260
    261 def doc_singlehtml(ctx, source_dir, conf_dir):
     261def doc_singlehtml(ctx, source_dir, conf_dir, extra_source):
    262262    #
    263263    # Use a run command to handle stdout and stderr output from inliner. Using
     
    293293        rule         = rule,
    294294        cwd          = ctx.path,
    295         source       = ctx.path.ant_glob('**/*.rst'),
     295        source       = ctx.path.ant_glob('**/*.rst') + extra_source,
    296296        target       = ctx.path.find_or_declare("%s/index.html" % (buildtype)),
    297297        install_path = None
     
    305305    )
    306306
    307 def doc_html(ctx, conf_dir, source_dir):
     307def doc_html(ctx, source_dir, conf_dir, extra_source):
    308308    buildtype = 'html'
    309309    build_dir, output_node, output_dir, doctrees = build_dir_setup(ctx, buildtype)
     
    313313        rule         = rule,
    314314        cwd          = ctx.path,
    315         source       = ctx.path.ant_glob('**/*.rst'),
     315        source       = ctx.path.ant_glob('**/*.rst') + extra_source,
    316316        target       = ctx.path.find_or_declare('%s/index.html' % buildtype),
    317317        install_path = None
     
    323323                      quiet = True)
    324324
    325 def cmd_build(ctx):
     325def cmd_build(ctx, extra_source = []):
    326326    conf_dir = ctx.path.get_src()
    327327    source_dir = ctx.path.get_src()
    328328
    329329    if ctx.env.BUILD_PDF == 'yes':
    330         doc_pdf(ctx, source_dir, conf_dir)
     330        doc_pdf(ctx, source_dir, conf_dir, extra_source)
    331331
    332332    if ctx.env.BUILD_SINGLEHTML == 'yes':
    333         doc_singlehtml(ctx, source_dir, conf_dir)
    334 
    335     doc_html(ctx, source_dir, conf_dir)
     333        doc_singlehtml(ctx, source_dir, conf_dir, extra_source)
     334
     335    doc_html(ctx, source_dir, conf_dir, extra_source)
    336336
    337337def cmd_options(ctx):
Note: See TracChangeset for help on using the changeset viewer.