Soft Patch Panel
 help / color / mirror / Atom feed
From: ogawa.yasufumi@lab.ntt.co.jp
To: spp@dpdk.org, ferruh.yigit@intel.com
Cc: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
Subject: [spp] [PATCH 09/11] makefile: fix bug of PDF compilation
Date: Fri, 31 Aug 2018 18:14:39 +0900	[thread overview]
Message-ID: <20180831091441.39055-10-ogawa.yasufumi@lab.ntt.co.jp> (raw)
In-Reply-To: <20180831091441.39055-1-ogawa.yasufumi@lab.ntt.co.jp>

From: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>

This patch includes bug fix and refactor of Makefile.

In target 'doc-pdf', PDF images embedded into the document is removed
immediately after sphinx command is executed. However, it possibly
remove PDF images before sphinx refers them. It is resulted in a
failure of file not found.
To fix the bug, move removing PDF images from 'doc-pdf' to 'doc-clean'
to avoid the error.

For refactoring, remove 'compile-doc.sh' for running Makefile in
'docs/guides' directory and do the task from project root Makefile.
'compile-doc.sh' is no needed any more.

Signed-off-by: Yasufumi Ogawa <ogawa.yasufumi@lab.ntt.co.jp>
---
 Makefile                   | 11 +++++++----
 docs/guides/compile-doc.sh | 11 -----------
 2 files changed, 7 insertions(+), 15 deletions(-)
 delete mode 100644 docs/guides/compile-doc.sh

diff --git a/Makefile b/Makefile
index 6d29dcc..47fa4cb 100644
--- a/Makefile
+++ b/Makefile
@@ -47,17 +47,20 @@ include $(RTE_SDK)/mk/rte.extsubdir.mk
 DOC_ROOT = docs/guides
 
 # Compile RST documents
+.PHONY: doc-pdf
+doc-all: doc-pdf doc-html
+
 .PHONY: doc-html
 doc-html:
-	sh $(DOC_ROOT)/compile-doc.sh doc-html
+	make -C $(DOC_ROOT) html
 
 .PHONY: doc-pdf
 doc-pdf:
 	python $(DOC_ROOT)/gen_pdf_imgs.py
-	sh $(DOC_ROOT)/compile-doc.sh doc-pdf
-	find $(DOC_ROOT)/images/ -type f -name "*.pdf" -delete
+	make -C $(DOC_ROOT) latexpdf
 	@echo "Succeeded to generate '$(DOC_ROOT)/_build/latex/SoftPatchPanel.pdf'"
 
 .PHONY: doc-clean
 doc-clean:
-	sh $(DOC_ROOT)/compile-doc.sh clean
+	find $(DOC_ROOT)/images/ -type f -name "*.pdf" -delete
+	make -C $(DOC_ROOT) clean
diff --git a/docs/guides/compile-doc.sh b/docs/guides/compile-doc.sh
deleted file mode 100644
index 237c526..0000000
--- a/docs/guides/compile-doc.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/sh
-
-cd `dirname ${0}`
-
-if [ $1 = 'doc-html' ]; then
-	make html
-elif [ $1 = 'doc-pdf' ]; then
-	make latexpdf
-elif [ $1 = 'clean' ]; then
-	make clean
-fi
-- 
2.7.4

  parent reply	other threads:[~2018-08-31  9:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-31  9:14 [spp] [PATCH 00/11] PDF documentation support ogawa.yasufumi
2018-08-31  9:14 ` [spp] [PATCH 01/11] docs: move SPP VF images ogawa.yasufumi
2018-08-31  9:14 ` [spp] [PATCH 02/11] docs: resize figures of SPP VF ogawa.yasufumi
2018-08-31  9:14 ` [spp] [PATCH 03/11] docs: resize figures of SPP ogawa.yasufumi
2018-08-31  9:14 ` [spp] [PATCH 04/11] docs: resize figures of SPP container ogawa.yasufumi
2018-08-31  9:14 ` [spp] [PATCH 05/11] docs: add script for generating PDF images ogawa.yasufumi
2018-08-31  9:14 ` [spp] [PATCH 06/11] project: update gitignore to exclude PDF files ogawa.yasufumi
2018-08-31  9:14 ` [spp] [PATCH 07/11] docs: add sphinx config to PDF ogawa.yasufumi
2018-08-31  9:14 ` [spp] [PATCH 08/11] makefile: add make option to compile PDF doc ogawa.yasufumi
2018-08-31  9:14 ` ogawa.yasufumi [this message]
2018-08-31  9:14 ` [spp] [PATCH 10/11] docs: refactor for character length ogawa.yasufumi
2018-08-31  9:14 ` [spp] [PATCH 11/11] docs: fix typo of label ogawa.yasufumi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180831091441.39055-10-ogawa.yasufumi@lab.ntt.co.jp \
    --to=ogawa.yasufumi@lab.ntt.co.jp \
    --cc=ferruh.yigit@intel.com \
    --cc=spp@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).