From ea9063805ce849d2ef81396e53aa1437a520fe5e Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 11 May 2017 13:37:49 +0300 Subject: Complete doc/ infra --- buildfile | 2 +- doc/.gitignore | 3 +++ doc/buildfile | 30 ++++++++++++++++++++++++++++++ doc/cli.sh | 35 +++++++++++++++++++++++++++++++++++ doc/man-epilogue.1 | 1 + doc/man-epilogue.xhtml | 1 + doc/man-prologue.1 | 1 + doc/man-prologue.xhtml | 1 + doc/man.css | 1 + 9 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 doc/buildfile create mode 120000 doc/man-epilogue.1 create mode 120000 doc/man-epilogue.xhtml create mode 120000 doc/man-prologue.1 create mode 120000 doc/man-prologue.xhtml create mode 120000 doc/man.css diff --git a/buildfile b/buildfile index 6b5add5..584a35d 100644 --- a/buildfile +++ b/buildfile @@ -2,7 +2,7 @@ # copyright : Copyright (c) 2014-2017 Code Synthesis Ltd # license : TBC; see accompanying LICENSE file -./: bbot/ etc/ unit-tests/ doc{INSTALL LICENSE NEWS README version} \ +./: bbot/ etc/ unit-tests/ doc/ doc{INSTALL LICENSE NEWS README version} \ file{manifest} doc{version}: file{manifest} # Generated by the version module. diff --git a/doc/.gitignore b/doc/.gitignore index 5dddec7..dce64f2 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -1,3 +1,6 @@ build2-*-manual.xhtml *.ps *.pdf + +bbot*.xhtml +bbot*.1 diff --git a/doc/buildfile b/doc/buildfile new file mode 100644 index 0000000..c11de50 --- /dev/null +++ b/doc/buildfile @@ -0,0 +1,30 @@ +# file : doc/buildfile +# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +# license : TBC; see accompanying LICENSE file + +cmds = \ +bbot-agent \ +bbot-worker + +define css: file +css{*}: extension = css + +define xhtml: doc +xhtml{*}: extension = xhtml + +./: {man1 xhtml}{$cmds} \ + css{common pre-box man} \ + file{man-prologue.1 man-epilogue.1 \ + man-prologue.xhtml man-epilogue.xhtml} + +./: doc{build2-build-bot-manual.xhtml \ + build2-build-bot-manual-a4.pdf \ + build2-build-bot-manual-a4.ps \ + build2-build-bot-manual-letter.pdf \ + build2-build-bot-manual-letter.ps} \ + css{code-box common doc pre-box toc} \ + file{a4.html2ps letter.html2ps doc.html2ps} \ + file{doc-prologue.xhtml doc-epilogue.xhtml \ + manual.cli} + +./: file{cli.sh} diff --git a/doc/cli.sh b/doc/cli.sh index 7ab1db6..2a5136d 100755 --- a/doc/cli.sh +++ b/doc/cli.sh @@ -22,6 +22,41 @@ while [ $# -gt 0 ]; do esac done +function compile () +{ + local n=$1; shift + + # Use a bash array to handle empty arguments. + # + local o=() + while [ $# -gt 0 ]; do + o=("${o[@]}" "$1") + shift + done + + cli -I .. -v project="bbot" -v version="$version" -v date="$date" \ +--include-base-last "${o[@]}" --generate-html --html-prologue-file \ +man-prologue.xhtml --html-epilogue-file man-epilogue.xhtml --html-suffix \ +.xhtml ../$n.cli + + cli -I .. -v project="bbot" -v version="$version" -v date="$date" \ +--include-base-last "${o[@]}" --generate-man --man-prologue-file \ +man-prologue.1 --man-epilogue-file man-epilogue.1 --man-suffix .1 \ +../$n.cli +} + +o="--output-prefix bbot-" + +# A few special cases. +# +#compile "bbot" $o --output-prefix "" + +pages="bbot/agent bbot/worker" + +for p in $pages; do + compile $p $o +done + # Manuals. # diff --git a/doc/man-epilogue.1 b/doc/man-epilogue.1 new file mode 120000 index 0000000..878a9ae --- /dev/null +++ b/doc/man-epilogue.1 @@ -0,0 +1 @@ +style/man-epilogue.1 \ No newline at end of file diff --git a/doc/man-epilogue.xhtml b/doc/man-epilogue.xhtml new file mode 120000 index 0000000..6c1722a --- /dev/null +++ b/doc/man-epilogue.xhtml @@ -0,0 +1 @@ +style/man-epilogue.xhtml \ No newline at end of file diff --git a/doc/man-prologue.1 b/doc/man-prologue.1 new file mode 120000 index 0000000..08b5b4b --- /dev/null +++ b/doc/man-prologue.1 @@ -0,0 +1 @@ +style/man-prologue.1 \ No newline at end of file diff --git a/doc/man-prologue.xhtml b/doc/man-prologue.xhtml new file mode 120000 index 0000000..34997e3 --- /dev/null +++ b/doc/man-prologue.xhtml @@ -0,0 +1 @@ +style/man-prologue.xhtml \ No newline at end of file diff --git a/doc/man.css b/doc/man.css new file mode 120000 index 0000000..e0c4308 --- /dev/null +++ b/doc/man.css @@ -0,0 +1 @@ +style/man.css \ No newline at end of file -- cgit v1.1