aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2020-02-14 17:39:25 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2020-02-14 17:40:41 +0300
commitf714a63d4444e42bd277ee8f7bd330f1dec36a86 (patch)
treec390a35dd78d4b8e53b9908c54cdb8268ee52621
parent617178bca704f70568ce3f4c49ab54b46743f724 (diff)
Add doc/doc.sh
-rwxr-xr-xdoc/doc.sh117
-rw-r--r--doc/xsde-epilogue.12
-rw-r--r--doc/xsde-epilogue.xhtml2
-rw-r--r--doc/xsde-prologue.xhtml2
4 files changed, 120 insertions, 3 deletions
diff --git a/doc/doc.sh b/doc/doc.sh
new file mode 100755
index 0000000..36b96e2
--- /dev/null
+++ b/doc/doc.sh
@@ -0,0 +1,117 @@
+#! /usr/bin/env bash
+
+version=3.3.0.a10
+
+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 xsde.xhtml xsde.1
+ rm -f cxx/hybrid/guide/cxx-hybrid-e-guide.{ps,pdf}
+ rm -f cxx/parser/guide/cxx-parser-e-guide.{ps,pdf}
+ rm -f cxx/serializer/guide/cxx-serializer-e-guide.{ps,pdf}
+ exit 0
+ ;;
+ *)
+ error "unexpected $1"
+ ;;
+ esac
+done
+
+ops=(\
+-v project="xsde" \
+-v version="$version" \
+-v date="$date" \
+-v copyright="$copyright" \
+-I ../xsde \
+--stdout \
+--suppress-undocumented \
+--exclude-base)
+
+# XHTML
+#
+# Common options.
+#
+cli "${ops[@]}" --generate-html --class CXX::options --class options \
+--html-prologue-file xsde-prologue.xhtml \
+../xsde/cxx/options.cli >xsde.xhtml
+
+# C++/Hybrid options.
+#
+cli "${ops[@]}" --generate-html \
+--html-prologue-file xsde-hybrid-header.xhtml \
+../xsde/cxx/hybrid/options.cli >>xsde.xhtml
+
+# C++/Parser options.
+#
+cli "${ops[@]}" --generate-html \
+--html-prologue-file xsde-parser-header.xhtml \
+../xsde/cxx/parser/options.cli >>xsde.xhtml
+
+# C++/Serializer options.
+#
+cli "${ops[@]}" --generate-html \
+--html-prologue-file xsde-serializer-header.xhtml \
+--html-epilogue-file xsde-epilogue.xhtml \
+../xsde/cxx/serializer/options.cli >>xsde.xhtml
+
+# MAN
+#
+# Common options.
+#
+cli "${ops[@]}" --generate-man --class CXX::options --class options \
+--man-prologue-file xsde-prologue.1 \
+../xsde/cxx/options.cli >xsde.1
+
+# C++/Hybrid options.
+#
+cli "${ops[@]}" --generate-man \
+--man-prologue-file xsde-hybrid-header.1 \
+../xsde/cxx/hybrid/options.cli >>xsde.1
+
+# C++/Parser options.
+#
+cli "${ops[@]}" --generate-man \
+--man-prologue-file xsde-parser-header.1 \
+../xsde/cxx/parser/options.cli >>xsde.1
+
+# C++/Serializer options.
+#
+cli "${ops[@]}" --generate-man \
+--man-prologue-file xsde-serializer-header.1 \
+--man-epilogue-file xsde-epilogue.1 \
+../xsde/cxx/serializer/options.cli >>xsde.1
+
+# PS, PDF
+#
+# C++/Hybrid guide.
+#
+html2ps -f cxx/hybrid/guide/guide.html2ps \
+-o cxx/hybrid/guide/cxx-hybrid-e-guide.ps cxx/hybrid/guide/index.xhtml
+
+ps2pdf14 -dOptimize=true -dEmbedAllFonts=true \
+cxx/hybrid/guide/cxx-hybrid-e-guide.ps cxx/hybrid/guide/cxx-hybrid-e-guide.pdf
+
+# C++/Parser guide.
+#
+html2ps -f cxx/parser/guide/guide.html2ps \
+-o cxx/parser/guide/cxx-parser-e-guide.ps cxx/parser/guide/index.xhtml
+
+ps2pdf14 -dOptimize=true -dEmbedAllFonts=true \
+cxx/parser/guide/cxx-parser-e-guide.ps cxx/parser/guide/cxx-parser-e-guide.pdf
+
+# C++/Serializer guide.
+#
+html2ps -f cxx/serializer/guide/guide.html2ps \
+-o cxx/serializer/guide/cxx-serializer-e-guide.ps cxx/serializer/guide/index.xhtml
+
+ps2pdf14 -dOptimize=true -dEmbedAllFonts=true \
+cxx/serializer/guide/cxx-serializer-e-guide.ps cxx/serializer/guide/cxx-serializer-e-guide.pdf
diff --git a/doc/xsde-epilogue.1 b/doc/xsde-epilogue.1
index 488b714..e907472 100644
--- a/doc/xsde-epilogue.1
+++ b/doc/xsde-epilogue.1
@@ -531,7 +531,7 @@ and exit with non-zero exit code.
Send bug reports to the xsde-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/xsde-epilogue.xhtml b/doc/xsde-epilogue.xhtml
index cd09eaf..68f35d2 100644
--- a/doc/xsde-epilogue.xhtml
+++ b/doc/xsde-epilogue.xhtml
@@ -350,7 +350,7 @@ namespace http://www.w3.org/2001/XMLSchema
</div>
<div id="footer">
- &copy;2005-2017 <a href="http://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/xsde-prologue.xhtml b/doc/xsde-prologue.xhtml
index 6d85a23..5aa2873 100644
--- a/doc/xsde-prologue.xhtml
+++ b/doc/xsde-prologue.xhtml
@@ -5,7 +5,7 @@
<head>
<title>XSD/e 3.3.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/e Compiler Command Line Manual"/>