From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 3B36BB5C8 for ; Mon, 16 Feb 2015 13:19:54 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga102.jf.intel.com with ESMTP; 16 Feb 2015 04:15:50 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.09,587,1418112000"; d="scan'208";a="667007423" Received: from irsmsx105.ger.corp.intel.com ([163.33.3.28]) by fmsmga001.fm.intel.com with ESMTP; 16 Feb 2015 04:19:48 -0800 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.218]) by irsmsx105.ger.corp.intel.com ([169.254.7.117]) with mapi id 14.03.0195.001; Mon, 16 Feb 2015 12:19:47 +0000 From: "Iremonger, Bernard" To: "Mcnamara, John" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v4 1/5] mk: Add 'make doc-pdf' target to convert guide docs to pdf Thread-Index: AQHQP7vKDBBZy9jWZUuVXf1L3A78SpzzRPJA Date: Mon, 16 Feb 2015 12:19:46 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C2049E7F31@IRSMSX108.ger.corp.intel.com> References: <1421255657-19521-1-git-send-email-john.mcnamara@intel.com> <1422972678-7982-1-git-send-email-john.mcnamara@intel.com> <1422972678-7982-2-git-send-email-john.mcnamara@intel.com> In-Reply-To: <1422972678-7982-2-git-send-email-john.mcnamara@intel.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [163.33.239.182] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4 1/5] mk: Add 'make doc-pdf' target to convert guide docs to pdf X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Feb 2015 12:19:54 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of John McNamara > Sent: Tuesday, February 3, 2015 2:11 PM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH v4 1/5] mk: Add 'make doc-pdf' target to conve= rt guide docs to pdf >=20 > Added make system support for building PDF versions of the guides. Requir= es Python Sphinx and > TexLive Full. >=20 > Signed-off-by: John McNamara > --- > mk/rte.sdkdoc.mk | 43 ++++++++++++++++++++++++++++++++++++++++++- > 1 files changed, 42 insertions(+), 1 deletions(-) >=20 > diff --git a/mk/rte.sdkdoc.mk b/mk/rte.sdkdoc.mk index dabc0d6..e09628f 1= 00644 > --- a/mk/rte.sdkdoc.mk > +++ b/mk/rte.sdkdoc.mk > @@ -37,13 +37,24 @@ endif > endif >=20 > RTE_SPHINX_BUILD =3D sphinx-build > +RTE_PDFLATEX_VERBOSE :=3D --interaction=3Dnonstopmode > + > ifndef V > RTE_SPHINX_VERBOSE :=3D -q > +RTE_PDFLATEX_VERBOSE :=3D --interaction=3Dbatchmode RTE_INKSCAPE_VERBOSE= :=3D > +> /dev/null 2>&1 > endif > ifeq '$V' '0' > RTE_SPHINX_VERBOSE :=3D -q > +RTE_PDFLATEX_VERBOSE :=3D --interaction=3Dbatchmode RTE_INKSCAPE_VERBOSE= :=3D > +> /dev/null 2>&1 > endif >=20 > +RTE_GUIDE_PDFS :=3D $(filter %/, $(wildcard $(RTE_SDK)/doc/guides/*/)) > +RTE_GUIDE_PDFS :=3D > +$(RTE_GUIDE_PDFS:$(RTE_SDK)/doc/guides%=3D$(RTE_OUTPUT)/doc/latex/guides= % > +) RTE_GUIDE_PDFS :=3D $(RTE_GUIDE_PDFS:%/=3D%.pdf) RTE_DEFAULT_DPI ?=3D = 300 > + > .PHONY: help > help: > @cat $(RTE_SDK)/doc/build-sdk-quick.txt > @@ -53,7 +64,7 @@ help: > all: api-html guides-html >=20 > .PHONY: clean > -clean: api-html-clean guides-html-clean > +clean: api-html-clean guides-html-clean guides-latex-clean Hi John, Would it be clearer to have a guides-pdf-clean target instead of guides-l= atex-clean given that there is a doc-pdf target? Regards, Bernard. >=20 > .PHONY: api-html > api-html: api-html-clean > @@ -83,3 +94,33 @@ guides-%: > @echo 'sphinx for guides...' > $(Q)$(RTE_SPHINX_BUILD) -b $* $(RTE_SPHINX_VERBOSE) \ > -c $(RTE_SDK)/doc/guides $(RTE_SDK)/doc/guides $(RTE_OUTPUT)/doc/$*/gu= ides > + > + > +pdf: $(RTE_GUIDE_PDFS) > + > +.SECONDEXPANSION: > +# Use wildcard expansion to avoid * expansion issue with make 3.82. > +$(RTE_OUTPUT)/doc/latex/guides/%.pdf: $$(wildcard $(RTE_SDK)/doc/guides/= %/*.rst) > + @echo 'creating' $* 'pdf ...' > + > + @# Convert the svg files to png for pdflatex. > + $(eval tmp_images =3D $(wildcard $(RTE_SDK)/doc/guides/$*/img/*.svg)) > + $(Q)for image in $(tmp_images:.svg=3D); do \ > + inkscape -d $(RTE_DEFAULT_DPI) -D -b ffffff \ > + -f $$image.svg -e $$image.png $(RTE_INKSCAPE_VERBOSE); \ > + done > + > + @# Generate the latex files. > + $(Q)$(RTE_SPHINX_BUILD) -b latex $(RTE_SPHINX_VERBOSE) \ > + -c $(RTE_SDK)/doc/guides $(RTE_SDK)/doc/guides/$* \ > + $(RTE_OUTPUT)/doc/latex/guides/$* > + > + @# Remove the generated png files. > + $(Q)rm -f $(tmp_images:.svg=3D.png) > + > + @# Generate the pdf files. > + $(Q)sed -i 's/LATEXOPTS =3D/LATEXOPTS =3D $(RTE_PDFLATEX_VERBOSE)/' \ > + $(RTE_OUTPUT)/doc/latex/guides/$*/Makefile > + $(Q)make all-pdf -s -C $(RTE_OUTPUT)/doc/latex/guides/$* > + > + $(Q)mv $(RTE_OUTPUT)/doc/latex/guides/$*/dpdk_doc.pdf $@ > -- > 1.7.4.1