forked from raspberrypi/documentation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.ninja
52 lines (36 loc) · 1.95 KB
/
build.ninja
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
41
42
43
44
45
46
47
48
49
50
51
52
# All the static (non-changing) parts of the ninjabuild
# These uppercase variables are used in autogenerated.ninja
DOCUMENTATION_IMAGES_DIR = documentation/images
GITHUB_EDIT_TEMPLATE = jekyll-assets/_includes/github_edit.adoc
HTACCESS_EXTRA = documentation/htaccess_extra.txt
DOXYGEN_PICOSDK_INDEX_JSON = documentation/asciidoc/pico-sdk/picosdk_index.json
# this corresponds to BUILD_DIR in Makefile
builddir = build
rule copy
command = cp $in $out
rule create_categories_page
command = echo "---\nlayout: boxes\n---\n:doctitle: $title" > $out
rule create_toc
command = $scripts_dir/create_nav.py $in $src_dir $out
rule create_output_supplemental_data
command = $scripts_dir/create_output_supplemental_data.py $in $out
rule create_build_adoc
command = $scripts_dir/create_build_adoc.py $documentation_index $site_config $GITHUB_EDIT_TEMPLATE $in $inc_dir $out
rule create_build_adoc_doxygen
command = $scripts_dir/create_build_adoc_doxygen.py $documentation_index $site_config $in $DOXYGEN_PICOSDK_INDEX_JSON $out_dir $out
rule create_build_adoc_include
command = $scripts_dir/create_build_adoc_include.py $site_config $GITHUB_EDIT_TEMPLATE $in $out
rule create_htaccess
command = $scripts_dir/create_htaccess.py $in $redirects_dir $out
rule create_index_json
command = $scripts_dir/create_output_index_json.py $in $out $src_dir $DOCUMENTATION_IMAGES_DIR
rule create_edit_warning
command = echo "Do not edit any files in this directory. Everything will get overwritten when you run 'make'" > $out
# created (as AUTO_NINJABUILD) in Makefile before invoking ninja
include $builddir/autogenerated.ninja
build $out_dir/_data/index.json: create_index_json $documentation_index | $scripts_dir/create_output_index_json.py
default $out_dir/_data/index.json
build $out_dir/images/opensocial.png: copy $DOCUMENTATION_IMAGES_DIR/opensocial.png
default $out_dir/images/opensocial.png
build $out_dir/DO_NOT_EDIT.txt: create_edit_warning
default $out_dir/DO_NOT_EDIT.txt