summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-02-14 14:32:07 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-02-14 17:44:35 +0300
commit4452c6da402c0778b0263d0f86bed302c089ef96 (patch)
treea28c721063b3f89b408ecd51848a447b42e61e27
parent045eae73bb51affaf17dd484d8db4dfa79467a1c (diff)
Add doc/doc.sh
-rwxr-xr-xdoc/doc.sh105
-rw-r--r--doc/xsd-epilogue.12
-rw-r--r--doc/xsd-epilogue.xhtml2
-rw-r--r--doc/xsd-prologue.xhtml2
4 files changed, 108 insertions, 3 deletions
diff --git a/doc/doc.sh b/doc/doc.sh
new file mode 100755
index 0000000..36528fd
--- /dev/null
+++ b/doc/doc.sh
@@ -0,0 +1,105 @@
+#! /usr/bin/env bash
+
+version=4.1.0.a11
+
+trap 'exit 1' ERR
+set -o errtrace # Trap in functions.
+
+function info () { echo "$*" 1>&2; }
+function error () { info "$*"; exit 1; }
+
+date="$(date +"%B %Y")"
+copyright="$(sed -n -re 's%^Copyright \(c\) (.+)\.$%\1%p' ../LICENSE)"
+
+while [ $# -gt 0 ]; do
+ case $1 in
+ --clean)
+ rm -f xsd.xhtml xsd.1
+ rm -f cxx/parser/guide/cxx-parser-guide.{ps,pdf}
+ rm -f cxx/tree/guide/cxx-tree-guide.{ps,pdf}
+ rm -f cxx/tree/manual/cxx-tree-manual.{ps,pdf}
+ exit 0
+ ;;
+ *)
+ error "unexpected $1"
+ ;;
+ esac
+done
+
+ops=(\
+-v project="xsd" \
+-v version="$version" \
+-v date="$date" \
+-v copyright="$copyright" \
+-I ../xsd \
+--stdout \
+--suppress-undocumented \
+--exclude-base)
+
+# XHTML
+#
+# Common options.
+#
+cli "${ops[@]}" --generate-html --class CXX::options --class options \
+--html-prologue-file xsd-prologue.xhtml \
+../xsd/cxx/options.cli >xsd.xhtml
+
+# C++/Tree options.
+#
+cli "${ops[@]}" --generate-html \
+--html-prologue-file xsd-tree-header.xhtml \
+../xsd/cxx/tree/options.cli >>xsd.xhtml
+
+# C++/Parser options.
+#
+cli "${ops[@]}" --generate-html \
+--html-prologue-file xsd-parser-header.xhtml \
+--html-epilogue-file xsd-epilogue.xhtml \
+../xsd/cxx/parser/options.cli >>xsd.xhtml
+
+# MAN
+#
+# Common options.
+#
+cli "${ops[@]}" --generate-man --class CXX::options --class options \
+--man-prologue-file xsd-prologue.1 \
+../xsd/cxx/options.cli >xsd.1
+
+# C++/Tree options.
+#
+cli "${ops[@]}" --generate-man \
+--man-prologue-file xsd-tree-header.1 \
+../xsd/cxx/tree/options.cli >>xsd.1
+
+# C++/Parser options.
+#
+cli "${ops[@]}" --generate-man \
+--man-prologue-file xsd-parser-header.1 \
+--man-epilogue-file xsd-epilogue.1 \
+../xsd/cxx/parser/options.cli >>xsd.1
+
+# PS, PDF
+#
+# C++/Parser guide.
+#
+html2ps -f cxx/parser/guide/guide.html2ps \
+-o cxx/parser/guide/cxx-parser-guide.ps cxx/parser/guide/index.xhtml
+
+ps2pdf14 -dOptimize=true -dEmbedAllFonts=true \
+cxx/parser/guide/cxx-parser-guide.ps cxx/parser/guide/cxx-parser-guide.pdf
+
+# C++/Tree guide.
+#
+html2ps -f cxx/tree/guide/guide.html2ps \
+-o cxx/tree/guide/cxx-tree-guide.ps cxx/tree/guide/index.xhtml
+
+ps2pdf14 -dOptimize=true -dEmbedAllFonts=true \
+cxx/tree/guide/cxx-tree-guide.ps cxx/tree/guide/cxx-tree-guide.pdf
+
+# C++/Tree manual.
+#
+html2ps -f cxx/tree/manual/manual.html2ps \
+-o cxx/tree/manual/cxx-tree-manual.ps cxx/tree/manual/index.xhtml
+
+ps2pdf14 -dOptimize=true -dEmbedAllFonts=true \
+cxx/tree/manual/cxx-tree-manual.ps cxx/tree/manual/cxx-tree-manual.pdf
diff --git a/doc/xsd-epilogue.1 b/doc/xsd-epilogue.1
index c02f4dc..192880c 100644
--- a/doc/xsd-epilogue.1
+++ b/doc/xsd-epilogue.1
@@ -557,7 +557,7 @@ and exit with non-zero exit code.
.SH BUGS
Send bug reports to the xsd-users@codesynthesis.com mailing list.
.SH COPYRIGHT
-Copyright (c) 2005-2017 Code Synthesis Tools CC.
+Copyright (c) $copyright$.
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation License,
diff --git a/doc/xsd-epilogue.xhtml b/doc/xsd-epilogue.xhtml
index 3dc4693..aef0418 100644
--- a/doc/xsd-epilogue.xhtml
+++ b/doc/xsd-epilogue.xhtml
@@ -407,7 +407,7 @@ namespace .*
</div>
<div id="footer">
- &copy;2005-2017 <a href="https://www.codesynthesis.com">CODE SYNTHESIS TOOLS CC</a>
+ Copyright &#169; $copyright$.
<div id="terms">
Permission is granted to copy, distribute and/or modify this
diff --git a/doc/xsd-prologue.xhtml b/doc/xsd-prologue.xhtml
index 1961791..6facbe8 100644
--- a/doc/xsd-prologue.xhtml
+++ b/doc/xsd-prologue.xhtml
@@ -5,7 +5,7 @@
<head>
<title>XSD 4.1.0 Compiler Command Line Manual</title>
- <meta name="copyright" content="&copy; 2005-2017 Code Synthesis Tools CC"/>
+ <meta name="copyright" content="&#169; $copyright$"/>
<meta name="keywords" content="xsd,xml,schema,c++,mapping,data,binding,code,generator,manual,man,page"/>
<meta name="description" content="XSD Compiler Command Line Manual"/>