[cig-commits] [commit] master: bullet-proof doc/Makefile (3aab014)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Mon Jan 26 18:34:49 PST 2015


Repository : https://github.com/geodynamics/aspect

On branch  : master
Link       : https://github.com/geodynamics/aspect/compare/9f802b89fe0a0c887376e96acaf4ccb45243610c...8d9c25c1a7eeb792e442d488d9d570d7b3032696

>---------------------------------------------------------------

commit 3aab0146e74262788c312b3db4d126ddfe5a653a
Author: Timo Heister <timo.heister at gmail.com>
Date:   Mon Jan 26 21:10:03 2015 -0500

    bullet-proof doc/Makefile
    
    - better default target
    - nice error message if manual/ is missing
    - cleanup


>---------------------------------------------------------------

3aab0146e74262788c312b3db4d126ddfe5a653a
 doc/Makefile | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/doc/Makefile b/doc/Makefile
index c23b240..5b24a80 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -6,16 +6,17 @@ aspect-files      = $(shell echo ../include/aspect/*.h \
                             ../include/aspect/*/*h     \
                             ../include/aspect/*/*/*h   \
                             modules/*h)
-aspect-manual-pix = $(shell find manual/cookbooks/ -name \*.png)
+aspect-manual-pix = $(shell find manual/cookbooks/ -name \*.png 2>/dev/null)
 
 
-aspect-prms = $(shell find manual/cookbooks/ -name \*.prm)
+aspect-prms = $(shell find manual/cookbooks/ -name \*.prm 2>/dev/null)
 aspect-prms-out = $(aspect-prms:=.out)
 
-test:
-	@echo "prms: ${aspect-prms}"
-	@echo "prm-out: ${aspect-prms-out}"
-
+default:
+	@echo "make targets:"
+	@echo "  aspect.tag  - generates doxygen documentation into doxygen/"
+	@echo "  manual.pdf  - generates manual.pdf"
+	@echo "  all         - generates both"
 
 all: aspect.tag manual.pdf
 
@@ -76,6 +77,17 @@ manual.pdf: manual/manual.tex manual/manual.bib manual/parameters.tex \
 	  false ; \
 	 fi
 
+# This rule will only trigger if the file is missing, which happens if the
+# user has a release tarball.
+manual/manual.tex:
+	@echo "------------------------------------------------------"
+	@echo "Error: Can not generate manual.pdf without the source"
+	@echo "files in manual/. If you are currently using a release"
+	@echo "of ASPECT, download the latest development version of"
+	@echo "ASPECT instead."
+	@echo "------------------------------------------------------"
+	@false
+
 clean:
 	-rm -f aspect.dox aspect.tag
 	-rm -rf doxygen



More information about the CIG-COMMITS mailing list