doc: move pdf generation into new doc-pdf make target
authorFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 4 Jan 2017 12:13:26 +0000 (13:13 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Wed, 4 Jan 2017 12:18:32 +0000 (13:18 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Makefile
doc/Makefile

index 7755786..65fc5ed 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -257,6 +257,9 @@ libs_uninstall uninstall_libs:
 doc:
                $(MAKECMDPREFIX)$(MAKECMD) -C doc OS=$(OS)
 
+doc-pdf:
+               $(MAKECMDPREFIX)$(MAKECMD) -C doc-pdf OS=$(OS)
+
 doc_clean:
                $(MAKECMDPREFIX)$(MAKECMD) -C doc OS=$(OS) clean
 
index f0d9f8c..c555997 100644 (file)
@@ -90,7 +90,7 @@ all: default_target
 
 default_target: doc
 
-.PHONY: .gitignore doc clean
+.PHONY: .gitignore doc doc-pdf clean
 
 clean:
        @echo "[$@] doc"
@@ -99,10 +99,9 @@ clean:
 doc: $(DOX_FILE)
        @echo "[$@] doc"
        @echo "  Cleaning up $(OS) outputs..."
-       @rm -fr "$(HTML_OUTPUT)" "$(LATEX_OUTPUT)" "$(PDF_OUTPUT)"
+       @rm -fr "$(HTML_OUTPUT)" "$(LATEX_OUTPUT)"
        @mkdir -pv "$(HTML_OUTPUT)"
        @mkdir -pv "$(LATEX_OUTPUT)"
-       @mkdir -pv "$(PDF_DIR)"
        @echo "  Generating doxygen configuration..."
        @sed \
          -e "s/__OLSRD_VER__/$(OLSRD_VER)/" \
@@ -116,6 +115,13 @@ doc: $(DOX_FILE)
        @echo "  Running doxygen to create HTML..."
        @doxygen "$(TMP_DOX_FILE)"
        @rm -f "$(TMP_DOX_FILE)"
+       @echo "  Done"
+
+doc-pdf: doc
+       @echo "[$@] doc"
+       @echo "  Cleaning up $(OS) outputs..."
+       @rm -fr "$(PDF_OUTPUT)"
+       @mkdir -pv "$(PDF_DIR)"
        @echo "  Running latex to create a PDF..."
        @$(MAKE) -s -C $(LATEX_OUTPUT) all
        @mkdir -pv "$(PDF_DIR)"