summaryrefslogtreecommitdiff
path: root/Jamrules.jam
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-06-23 13:58:46 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-06-23 13:58:46 +0000
commit3a6448dff029addacb2e9260b6b99116f7369f1c (patch)
tree48b6286a33c5b72af925bc603f80f7ce6702f6e5 /Jamrules.jam
parentb515d5206172777973b521660ac4914d0f58c06a (diff)
docs: Added new user manual drafts (Quickbook sources) and documentation building support
git-svn-id: http://pugixml.googlecode.com/svn/trunk@529 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'Jamrules.jam')
-rw-r--r--Jamrules.jam47
1 files changed, 47 insertions, 0 deletions
diff --git a/Jamrules.jam b/Jamrules.jam
index 9c6c018..c420b7a 100644
--- a/Jamrules.jam
+++ b/Jamrules.jam
@@ -469,6 +469,16 @@ else
}
}
+actions QuickbookAction
+{
+ %QUICKBOOK_PATH%\bin\quickbook.exe --output-file $(<) --input-file $(>) >nul
+}
+
+actions XSLTProcAction
+{
+ %QUICKBOOK_PATH%\bin\xsltproc.exe --path$(SPACE)$(XSLPATH) --stringparam$(SPACE)$(XSLPARAM) --output $(<) $(XSL) $(>)
+}
+
rule MakeFileDir TARGET
{
local DIR = $(TARGET:D) ;
@@ -588,3 +598,40 @@ rule Coverage TARGET : SOURCE
CoverageAction $(TARGET) : $(FILES) ;
Depends $(TARGET) : $(SOURCE) ;
}
+
+rule Documentation TARGET : SOURCE
+{
+ # quickbook -> boostbook
+ local BOOSTBOOK = $(BUILD)/$(SOURCE:S=.bb.xml) ;
+
+ MakeFileDir $(BOOSTBOOK) ;
+ QuickbookAction $(BOOSTBOOK) : $(SOURCE) ;
+ Depends $(BOOSTBOOK) : $(SOURCE) ;
+
+ # boostbook -> docbook
+ local DOCBOOK = $(BUILD)/$(SOURCE:S=.db.xml) ;
+
+ XSL on $(DOCBOOK) = %QUICKBOOK_PATH%/boostbook/xsl/docbook.xsl ;
+ XSLPATH on $(DOCBOOK) = %QUICKBOOK_PATH%/boostbook/dtd %QUICKBOOK_PATH%/docbook-xml ;
+ XSLTProcAction $(DOCBOOK) : $(BOOSTBOOK) ;
+ Depends $(DOCBOOK) : $(BOOSTBOOK) ;
+
+ # docbook -> html
+ local HTML = $(TARGET) ;
+
+ XSL on $(HTML) = %QUICKBOOK_PATH%/boostbook/xsl/html.xsl ;
+ XSLPATH on $(HTML) = %QUICKBOOK_PATH%/docbook-xml %QUICKBOOK_PATH%/docbook-xsl/html %QUICKBOOK_PATH%/docbook-xsl/lib ;
+
+ XSLPARAM on $(HTML) =
+ "generate.manifest 0"
+ "html.stylesheet pugixml.css"
+ "root.filename $(TARGET:B)"
+ "generate.section.toc.level 1"
+ "toc.section.depth 3"
+ "admon.graphics.path images/"
+ "navig.graphics.path images/"
+ ;
+
+ XSLTProcAction $(HTML) : $(DOCBOOK) ;
+ Depends $(HTML) : $(DOCBOOK) ;
+}