aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/.gitignore2
-rwxr-xr-xdoc/cli.sh57
l---------doc/common.css1
l---------doc/man-epilogue.11
l---------doc/man-epilogue.xhtml1
l---------doc/man-prologue.11
l---------doc/man-prologue.xhtml1
l---------doc/man.css1
l---------doc/pre-box.css1
9 files changed, 66 insertions, 0 deletions
diff --git a/doc/.gitignore b/doc/.gitignore
new file mode 100644
index 0000000..c3a9ae5
--- /dev/null
+++ b/doc/.gitignore
@@ -0,0 +1,2 @@
+b*.xhtml
+b*.1
diff --git a/doc/cli.sh b/doc/cli.sh
new file mode 100755
index 0000000..4307e63
--- /dev/null
+++ b/doc/cli.sh
@@ -0,0 +1,57 @@
+#! /usr/bin/env bash
+
+version="0.2.0"
+date="January 2016"
+
+trap 'exit 1' ERR
+set -o errtrace # Trap in functions.
+
+function info () { echo "$*" 1>&2; }
+function error () { info "$*"; exit 1; }
+
+while [ $# -gt 0 ]; do
+ case $1 in
+ --clean)
+ rm -f b*.xhtml b*.1
+ exit 0
+ ;;
+ *)
+ error "unexpected $1"
+ ;;
+ 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="build2" -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 ../build2/$n.cli
+
+ cli -I .. -v project="build2" -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 \
+../build2/$n.cli
+}
+
+o="--output-prefix b-"
+
+# A few special cases.
+#
+compile "b" $o --output-prefix "" --suppress-undocumented
+
+pages=""
+
+for p in $pages; do
+ compile $p $o
+done
diff --git a/doc/common.css b/doc/common.css
new file mode 120000
index 0000000..3ddf6fc
--- /dev/null
+++ b/doc/common.css
@@ -0,0 +1 @@
+style/common.css \ No newline at end of file
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
diff --git a/doc/pre-box.css b/doc/pre-box.css
new file mode 120000
index 0000000..b9ec76c
--- /dev/null
+++ b/doc/pre-box.css
@@ -0,0 +1 @@
+style/pre-box.css \ No newline at end of file