# HG changeset patch # User Akos Ladanyi # Date 2008-04-22 18:12:58 # Node ID 976a014b379731b0d9352deb12e7b9c16ee06a1c # Parent b37cc0bb12dbeeb1e39d4fc2b6ba21133676718e Convert the EPS files to PNG when generating the documentation diff --git a/.hgignore b/.hgignore --- a/.hgignore +++ b/.hgignore @@ -7,6 +7,7 @@ *.log *.lo *.tar.* +*.bak Makefile.in aclocal.m4 config.h.in @@ -25,6 +26,7 @@ .libs/* .deps/* demo/*.eps +doc/images/*.png syntax: regexp (.*/)?\#[^/]*\#$ diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -27,6 +27,7 @@ AC_PROG_LIBTOOL AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no]) +AC_CHECK_PROG([gs_found],[gs],[yes],[no]) if test x"$lx_cmdline_cxxflags_set" != x"set" -a "$GXX" = yes; then CXXFLAGS="$CXXFLAGS -Wall -W -Wall -W -Wunused -Wformat=2 -Wctor-dtor-privacy -Wnon-virtual-dtor -Wno-char-subscripts -Wwrite-strings -Wno-char-subscripts -Wreturn-type -Wcast-qual -Wcast-align -Wsign-promo -Woverloaded-virtual -Woverloaded-virtual -ansi -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas" diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in --- a/doc/Doxyfile.in +++ b/doc/Doxyfile.in @@ -101,7 +101,8 @@ @abs_top_srcdir@/doc EXAMPLE_PATTERNS = EXAMPLE_RECURSIVE = NO -IMAGE_PATH = @abs_top_srcdir@/doc/images +IMAGE_PATH = @abs_top_srcdir@/doc/images \ + @abs_top_builddir@/doc/gen-images INPUT_FILTER = FILTER_PATTERNS = FILTER_SOURCE_FILES = NO diff --git a/doc/Makefile.am b/doc/Makefile.am --- a/doc/Makefile.am +++ b/doc/Makefile.am @@ -9,10 +9,38 @@ doc/namespaces.dox \ doc/html +DOC_EPS_IMAGES18 = \ + nodeshape_0.eps \ + nodeshape_1.eps \ + nodeshape_2.eps \ + nodeshape_3.eps \ + nodeshape_4.eps + +DOC_EPS_IMAGES = \ + $(DOC_EPS_IMAGES18) + +DOC_PNG_IMAGES = \ + $(DOC_EPS_IMAGES:%.eps=doc/gen-images/%.png) + +EXTRA_DIST += $(DOC_EPS_IMAGES:%=doc/images/%) + doc/html: $(MAKE) $(AM_MAKEFLAGS) html -html-local: +GS_COMMAND=gs -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4 + +$(DOC_EPS_IMAGES18:%.eps=doc/gen-images/%.png): doc/gen-images/%.png: doc/images/%.eps + -mkdir doc/gen-images + if test ${gs_found} = yes; then \ + $(GS_COMMAND) -sDEVICE=pngalpha -r18 -sOutputFile=$@ $<; \ + else \ + echo; \ + echo "Ghostscript not found."; \ + echo; \ + exit 1; \ + fi + +html-local: $(DOC_PNG_IMAGES) if test ${doxygen_found} = yes; then \ cd doc; \ doxygen Doxyfile; \ @@ -27,6 +55,8 @@ clean-local: -rm -rf doc/html -rm -f doc/doxygen.log + -rm -f $(DOC_PNG_IMAGES) + -rm -rf doc/gen-images update-external-tags: wget -O doc/libstdc++.tag.tmp http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/libstdc++.tag && \