File: wscript

package info (click to toggle)
ntpsec 1.2.0%2Bdfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 10,044 kB
  • sloc: ansic: 60,737; python: 31,610; sh: 1,494; yacc: 1,291; makefile: 176; javascript: 138
file content (40 lines) | stat: -rw-r--r-- 1,077 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
def build(ctx):

    doc_source = ctx.path.ant_glob("*.adoc", excl='*-body.adoc')

    ctx(
        source=doc_source,
        target="doc",
    )

    image_source = []
    ctx.path.get_bld().make_node("hints").mkdir()    # create 'hints' directory
    for dir in ["icons", "pic"]:

        files = ctx.path.ant_glob('%s/*' % dir)      # Find images
        ctx.path.get_bld().make_node(dir).mkdir()    # create 'pic' directory
        image_source += files

        # Copy images
        ctx(
            features="subst",
            is_copy=True,
            source=files,
            target=[ctx.path.find_node(dir).get_bld().make_node(x.name)
                    for x in files]
        )

    extra = ["asciidoc.js", "asciidoc.css"]

    # Copy extra files
    ctx(
        features="subst",
        is_copy=True,
        source=extra,
        target=extra
    )

    # Install HTML
    ctx.install_files('${HTMLDIR}', extra +
                      [x.change_ext(".html").name for x in doc_source])
    ctx.install_files('${HTMLDIR}', image_source, relative_trick=True)