diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2020-12-18 18:48:46 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2021-01-13 22:32:43 +0300 |
commit | 2615896faa646e5830abf2c269150e1165c66515 (patch) | |
tree | 7d95978ec0a83094c9462ed4e1f59d42f4ff8ddb /libxsd/doc/buildfile | |
parent | 7420f85ea19b0562ffdd8123442f32bc8bac1267 (diff) |
Switch to build2
Diffstat (limited to 'libxsd/doc/buildfile')
-rw-r--r-- | libxsd/doc/buildfile | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/libxsd/doc/buildfile b/libxsd/doc/buildfile new file mode 100644 index 0000000..76640e6 --- /dev/null +++ b/libxsd/doc/buildfile @@ -0,0 +1,86 @@ +# file : doc/buildfile +# license : GNU GPL v2 + exceptions; see accompanying LICENSE file + +define html: file +html{*}: extension = html + +define doxygen: file +doxygen{*}: extension = doxygen + +define doxytag: doc +doxytag{*}: extension = doxytag + +# Import the doxygen program only if present on the system. This way a +# distribution that includes pre-generated files can be built without +# installing this programs. +# +import? doxygen = doxygen%exe{doxygen} + +# Note that we include the doxygen-generated files into the distribution and +# don't remove them when cleaning in src (so that clean results in a state +# identical to distributed). + +cxx/tree/reference/ +{ + # @@ Currently, there are the following issues that can only be addressed + # on the build2 level: + # + # - The update recipe is not re-executed after html/ directory content + # has changed or it is removed. + # + # - The clean operation doesn't remove the html/ directory. + # + # - The html/ directory is not installed nor distributed regardless of + # the doxygen presence. + # + if ($doxygen != [null]) + { + # Listing the generated html/ directory content here doesn't look right, + # so we specify the directory as a prerequisite. + # + ../../../: doxytag{libxsd} + + headers = buffer types date-time elements element-map exceptions + + <doxytag{libxsd} fsdir{html}>: doxygen{libxsd} \ + html{footer} \ + $src_root/libxsd/cxx/tree/hxx{$headers} \ + $doxygen + { + dist = true + clean = ($src_root != $out_root) + } + {{ + diag doxygen $> : ($<[0]) # @@ TMP: revise + + rm -r -f $directory($>[1]) + + $doxygen $path($<[0]) + }} + + doxygen{libxsd}: in{libxsd} + { + in.symbol = '%' + + input = $regex.merge($headers, \ + '^(.*)$', \ + "$src_root/libxsd/cxx/tree/\\1.hxx", \ + ' ') + } + + html{footer}: in{footer} + { + # Extract the copyright notice from the LICENSE file. + # + # Note that cat is a builtin which means this is both portable and fast. + # + copyright = $process.run_regex(cat $src_root/LICENSE, \ + 'Copyright \(c\) (.+)\.', \ + '\1') + } + } + else + ../../../: doxytag{+libxsd} +} + +doc{*}: install.subdirs = true |