From 0cc55b624e050e62f8b931c58ca33eefcff9f539 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Tue, 6 Jun 2017 18:13:01 +0300 Subject: [PATCH] Add pdf_ target --- doc/Jamfile | 10 ++++++++-- doc/asciidoctor.jam | 15 +++++++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/doc/Jamfile b/doc/Jamfile index 164a562..d4a4802 100644 --- a/doc/Jamfile +++ b/doc/Jamfile @@ -14,10 +14,16 @@ html assert.html : index.adoc ; # docbook assert.docbook : index.adoc ; # boostbook assert.html : assert.docbook : onehtml ; -install assert_html : assert.html : html ; +install html_ : assert.html : html ; + +pdf assert.pdf : index.adoc ; +explicit assert.pdf ; + +install pdf_ : assert.pdf : pdf ; +explicit pdf_ ; ############################################################################### alias boostdoc ; explicit boostdoc ; -alias boostrelease : assert_html ; +alias boostrelease : html_ ; explicit boostrelease ; diff --git a/doc/asciidoctor.jam b/doc/asciidoctor.jam index 5988cd4..488670d 100644 --- a/doc/asciidoctor.jam +++ b/doc/asciidoctor.jam @@ -10,6 +10,7 @@ import generators ; import boostbook ; # File type + type.register ASCIIDOC : asciidoc adoc ; # Define dependency scanner @@ -27,17 +28,23 @@ type.set-scanner ASCIIDOC : asciidoc-scanner ; # Define generators -generators.register-standard asciidoctor.asciidoc2html : ASCIIDOC : HTML ; -# generators.register-standard asciidoctor.asciidoc2docbook : ASCIIDOC : DOCBOOK ; +generators.register-standard asciidoctor.asciidoc-to-html : ASCIIDOC : HTML ; +generators.register-standard asciidoctor.asciidoc-to-pdf : ASCIIDOC : PDF ; +# generators.register-standard asciidoctor.asciidoc-to-docbook : ASCIIDOC : DOCBOOK ; # Define actions -actions asciidoc2html +actions asciidoc-to-html { asciidoctor -b html -o $(1) $(2) } -actions asciidoc2docbook +actions asciidoc-to-pdf +{ + asciidoctor -r asciidoctor-pdf -b pdf -o $(1) $(2) +} + +actions asciidoc-to-docbook { asciidoctor -b docbook -o $(1) $(2) }