From 34be21a72a396240642acf3050eead875d3ed4b4 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 17 Jan 2017 11:22:23 +0200 Subject: Update doc generation script --- doc/.gitignore | 10 +++++----- doc/cli.sh | 38 +++++++++++++++++++------------------- doc/testscript.cli | 2 +- 3 files changed, 25 insertions(+), 25 deletions(-) diff --git a/doc/.gitignore b/doc/.gitignore index dabc15d..9d45a89 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -1,5 +1,5 @@ -b*.xhtml -b*.1 -build2-build-system-manual*.ps -build2-build-system-manual*.pdf -build2-build-system-manual.xhtml +b.xhtml +b.1 +build2-*-manual.xhtml +*.ps +*.pdf diff --git a/doc/cli.sh b/doc/cli.sh index 99b17c5..b561664 100755 --- a/doc/cli.sh +++ b/doc/cli.sh @@ -13,9 +13,9 @@ while [ $# -gt 0 ]; do case $1 in --clean) rm -f b*.xhtml b*.1 - rm -f build2-build-system-manual*.ps \ - build2-build-system-manual*.pdf \ - build2-build-system-manual.xhtml + rm -f build2-build-system-manual.xhtml + rm -f build2-testscript-manual.xhtml + rm -f *.ps *.pdf exit 0 ;; *) @@ -59,32 +59,32 @@ for p in $pages; do compile $p $o done -# Manual. +# Manuals. # -cli -I .. \ +function compile_doc () # +{ + cli -I .. \ -v version="$(echo "$version" | sed -e 's/^\([^.]*\.[^.]*\).*/\1/')" \ -v date="$date" \ --generate-html --html-suffix .xhtml \ --html-prologue-file doc-prologue.xhtml \ --html-epilogue-file doc-epilogue.xhtml \ ---output-prefix build2-build-system- manual.cli +--output-prefix "$2" \ +--output-suffix "$3" \ +"$1" -html2ps -f doc.html2ps:a4.html2ps -o build2-build-system-manual-a4.ps build2-build-system-manual.xhtml -ps2pdf14 -sPAPERSIZE=a4 -dOptimize=true -dEmbedAllFonts=true build2-build-system-manual-a4.ps build2-build-system-manual-a4.pdf + local n="$2$(basename -s .cli $1)$3" -html2ps -f doc.html2ps:letter.html2ps -o build2-build-system-manual-letter.ps build2-build-system-manual.xhtml -ps2pdf14 -sPAPERSIZE=letter -dOptimize=true -dEmbedAllFonts=true build2-build-system-manual-letter.ps build2-build-system-manual-letter.pdf + html2ps -f doc.html2ps:a4.html2ps -o "$n-a4.ps" "$n.xhtml" + ps2pdf14 -sPAPERSIZE=a4 -dOptimize=true -dEmbedAllFonts=true "$n-a4.ps" "$n-a4.pdf" -# Testscript spec. -# -cli -I .. \ --v version="$(echo "$version" | sed -e 's/^\([^.]*\.[^.]*\).*/\1/')" \ --v date="$date" \ ---generate-html --html-suffix .xhtml \ ---html-prologue-file doc-prologue.xhtml \ ---html-epilogue-file doc-epilogue.xhtml \ ---output-prefix build2- testscript.cli + html2ps -f doc.html2ps:letter.html2ps -o "$n-letter.ps" "$n.xhtml" + ps2pdf14 -sPAPERSIZE=letter -dOptimize=true -dEmbedAllFonts=true "$n-letter.ps" "$n-letter.pdf" +} + +compile_doc manual.cli 'build2-build-system-' +compile_doc testscript.cli 'build2-' '-manual' # Generate INSTALL in ../ # diff --git a/doc/testscript.cli b/doc/testscript.cli index 5e72e92..89f9db5 100644 --- a/doc/testscript.cli +++ b/doc/testscript.cli @@ -2,7 +2,7 @@ // copyright : Copyright (c) 2014-2017 Code Synthesis Ltd // license : MIT; see accompanying LICENSE file -"\name=build2-testscript-language" +"\name=build2-testscript-manual" "\subject=Testscript language" "\title=Testscript Language" -- cgit v1.1