From 879d7e92d823c9dfe6fb3691541f30b662f2a510 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 3 Sep 2016 17:27:33 +0200 Subject: First take on new installation and upgrade instructions --- doc/.gitignore | 6 +++--- doc/buildfile | 19 ++++++++++--------- doc/cli.sh | 46 +++++++++++++++++++++++++++++++++++++--------- doc/install.cli | 47 +++++++++++++++++++++++++++++++++++++++++++++++ doc/intro.cli | 5 ----- 5 files changed, 97 insertions(+), 26 deletions(-) create mode 100644 doc/install.cli (limited to 'doc') diff --git a/doc/.gitignore b/doc/.gitignore index 4bb8225..585f985 100644 --- a/doc/.gitignore +++ b/doc/.gitignore @@ -1,3 +1,3 @@ -build2-toolchain-intro*.ps -build2-toolchain-intro*.pdf -build2-toolchain-intro.xhtml +build2-toolchain-*.ps +build2-toolchain-*.pdf +build2-toolchain-*.xhtml diff --git a/doc/buildfile b/doc/buildfile index fb23206..6914d41 100644 --- a/doc/buildfile +++ b/doc/buildfile @@ -5,12 +5,13 @@ define css: file css{*}: extension = css -./: doc{build2-toolchain-intro.xhtml \ - build2-toolchain-intro-a4.pdf \ - build2-toolchain-intro-a4.ps \ - build2-toolchain-intro-letter.pdf \ - build2-toolchain-intro-letter.ps} \ - css{code-box common doc pre-box toc} \ - file{a4.html2ps letter.html2ps doc.html2ps} \ - file{doc-prologue.xhtml doc-epilogue.xhtml \ - intro.cli cli.sh} +intr = build2-toolchain-intro +inst = build2-toolchain-install + +./: \ +doc{$(intr).xhtml $intr-a4.pdf $intr-a4.ps $intr-letter.pdf $intr-letter.ps} \ +doc{$(inst).xhtml $inst-a4.pdf $inst-a4.ps $inst-letter.pdf $inst-letter.ps} \ +css{code-box common doc pre-box toc} \ +file{a4.html2ps letter.html2ps doc.html2ps} \ +file{doc-prologue.xhtml doc-epilogue.xhtml} \ +cli{intro.cli install.cli} file{cli.sh} diff --git a/doc/cli.sh b/doc/cli.sh index c9a3c8e..a376fad 100755 --- a/doc/cli.sh +++ b/doc/cli.sh @@ -13,7 +13,9 @@ while [ $# -gt 0 ]; do case $1 in --clean) rm -f build2-toolchain-intro.xhtml build2-toolchain-intro*.ps \ -build2-toolchain-intro*.pdf + build2-toolchain-intro*.pdf + rm -f build2-toolchain-install.xhtml build2-toolchain-install*.ps \ +build2-toolchain-install*.pdf exit 0 ;; *) @@ -22,16 +24,42 @@ build2-toolchain-intro*.pdf esac done -cli -I .. -v version="$version" -v date="$date" \ +function gen () # +{ + local n="$1" + shift + cli -I .. -v version="$version" -v date="$date" \ --generate-html --html-suffix .xhtml \ --html-prologue-file doc-prologue.xhtml \ --html-epilogue-file doc-epilogue.xhtml \ ---link-regex '%b([-.].+)%../../build2/doc/b$1%' \ ---link-regex '%bpkg([-.].+)%../../bpkg/doc/bpkg$1%' \ ---output-prefix build2-toolchain- intro.cli +--link-regex '%b([-.].+)%../../build2/doc/b$n%' \ +--link-regex '%bpkg([-.].+)%../../bpkg/doc/bpkg$n%' \ +--output-prefix build2-toolchain- "${@}" $n.cli -html2ps -f doc.html2ps:a4.html2ps -o build2-toolchain-intro-a4.ps build2-toolchain-intro.xhtml -ps2pdf14 -sPAPERSIZE=a4 -dOptimize=true -dEmbedAllFonts=true build2-toolchain-intro-a4.ps build2-toolchain-intro-a4.pdf +html2ps -f doc.html2ps:a4.html2ps -o build2-toolchain-$n-a4.ps build2-toolchain-$n.xhtml +ps2pdf14 -sPAPERSIZE=a4 -dOptimize=true -dEmbedAllFonts=true build2-toolchain-$n-a4.ps build2-toolchain-$n-a4.pdf -html2ps -f doc.html2ps:letter.html2ps -o build2-toolchain-intro-letter.ps build2-toolchain-intro.xhtml -ps2pdf14 -sPAPERSIZE=letter -dOptimize=true -dEmbedAllFonts=true build2-toolchain-intro-letter.ps build2-toolchain-intro-letter.pdf +html2ps -f doc.html2ps:letter.html2ps -o build2-toolchain-$n-letter.ps build2-toolchain-$n.xhtml +ps2pdf14 -sPAPERSIZE=letter -dOptimize=true -dEmbedAllFonts=true build2-toolchain-$n-letter.ps build2-toolchain-$n-letter.pdf +} + +# Auto-heading doesn't work since it is broken into multiple doc strings. +# +gen install --html-heading-map 2=h2 +gen intro + +# Generate INSTALL/BOOTSTRAP/UPGRADE file in ../ +# +function gen_txt () # +{ + cli --generate-txt --omit-link-check --link-regex '%#(.*)%\1 file%' \ +-o .. --txt-suffix "" ../$1.cli +} + +gen_txt INSTALL +gen_txt UPGRADE +gen_txt BOOTSTRAP-MACOSX +gen_txt BOOTSTRAP-MINGW +gen_txt BOOTSTRAP-MSVC +gen_txt BOOTSTRAP-UNIX +gen_txt BOOTSTRAP-WINDOWS diff --git a/doc/install.cli b/doc/install.cli new file mode 100644 index 0000000..f8042f7 --- /dev/null +++ b/doc/install.cli @@ -0,0 +1,47 @@ +// file : doc/install.cli +// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd +// license : MIT; see accompanying LICENSE file + +"\name=build2-toolchain-install" +"\subject=toolchain" +"\title=Toolchain Installation and Upgrade" + +// NOTES +// +// - Maximum
 line is 70 characters.
+//
+
+"
+\h#INSTALL|Introduction|
+"
+source "../INSTALL.cli";
+
+"
+\h#BOOTSTRAP-WINDOWS|Bootstrapping on Windows|
+"
+source "../BOOTSTRAP-WINDOWS.cli";
+
+"
+\h2#BOOTSTRAP-MSVC|Bootstrapping with MSVC|
+"
+source "../BOOTSTRAP-MSVC.cli";
+
+"
+\h2#BOOTSTRAP-MINGW|Bootstrapping with MINGW|
+"
+source "../BOOTSTRAP-MINGW.cli";
+
+"
+\h#BOOTSTRAP-MACOSX|Bootstrapping on Mac OS X|
+"
+source "../BOOTSTRAP-MACOSX.cli";
+
+"
+\h#BOOTSTRAP-UNIX|Bootstrapping on UNIX|
+"
+source "../BOOTSTRAP-UNIX.cli";
+
+"
+\h#UPGRADE|Upgrading|
+"
+source "../UPGRADE.cli";
diff --git a/doc/intro.cli b/doc/intro.cli
index e9782a3..791394c 100644
--- a/doc/intro.cli
+++ b/doc/intro.cli
@@ -1039,8 +1039,3 @@ $ wine hello-1.0.0/hello.exe Windows
 Hello, Windows!
 \
 "
-
-"
-\h#install|Installation|
-"
-source "../INSTALL.cli";
-- 
cgit v1.1