From 3123212a1db75d9d699c6ba8da5669bee54af7d3 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 20 Apr 2021 23:14:52 -0400 Subject: [PATCH] Improve the Makefile --- Makefile | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index fee4940ebf..d96289baaa 100644 --- a/Makefile +++ b/Makefile @@ -16,15 +16,18 @@ export GMT_END_SHOW=off help: @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -.PHONY: help Makefile +.PHONY: help Makefile build build_html build_pdf optimize_pdf serve watch # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) -build: $(HTML) latexpdf optimize_pdf - @echo "Copy built PDF to HTML directory" +build: build_html build_pdf + +build_html: $(HTML) + +build_pdf: latexpdf optimize_pdf cp $(BUILDDIR)/latex/$(DOCNAME).pdf $(BUILDDIR)/$(HTML)/ # reduce file size of the final PDF documentation