removed UTF-8 charizing
[rofl0r-chaos-pp.git] / pp-book / build
blob6027ead1d875b04771efe06517611c27ce9e130d
1 #!/bin/bash
3 # **************************************************************************
4 # * *
5 # * (C) Copyright Paul Mensonides 2003-2005. *
6 # * *
7 # * Distributed under the Boost Software License, Version 1.0. *
8 # * (See accompanying file LICENSE). *
9 # * *
10 # * See http://chaos-pp.sourceforge.net for the most recent version. *
11 # * *
12 # **************************************************************************
14 # $1 == library specification file
15 # $2 == source path
16 # $3 == destination path
17 # $4 == regular expression
19 # example: ./build ../documentation{/library.xml,} ../built-docs ".*"
21 clear
23 echo expanding library...
24 xsltproc -o .library.xml --stringparam source "$2" library.xsl "$1"
26 echo generating symbol table...
27 xsltproc -o .symbol.xsl symbol.xsl .library.xml
29 echo copying support files...
30 mkdir -p "$3"
31 cp style.css "$3"/style.css
32 cp alternate.css "$3"/alternate.css
33 cp background.gif "$3"/background.gif
35 echo creating indices...
36 xsltproc -o "$3"/documents.html --stringparam mode documents --stringparam source "$2" index.xsl .library.xml
37 xsltproc -o "$3"/headers.html --stringparam mode headers --stringparam source "$2" index.xsl .library.xml
38 xsltproc -o "$3"/primary.html --stringparam mode primaries --stringparam source "$2" index.xsl .library.xml
39 xsltproc -o "$3"/secondary.html --stringparam mode secondaries --stringparam source "$2" index.xsl .library.xml
41 echo generating meta-transformations...
42 xsltproc -o .meta.xsl --stringparam source "$2" meta.xsl "$1"
44 echo generating script...
45 xsltproc -o .script script.xsl "$1"
46 chmod +rx .script
48 echo executing script...
49 echo "" > .temp.xml
50 ./.script $@ ".*"
52 echo deleting temporary files...
53 rm .library.xml .meta.xsl .script .symbol.xsl .temp.xml