Skip to content

Commit

Permalink
Improve the Makefile (#268)
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman committed Apr 21, 2021
1 parent 07369d5 commit 2429ad1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2429ad1

Please sign in to comment.