Convert the EPS files to PNG when generating the documentation
authorAkos Ladanyi <ladanyi@tmit.bme.hu>
Tue, 22 Apr 2008 18:12:58 +0200
changeset 153976a014b3797
parent 152 b37cc0bb12db
child 154 f4e4dbc1d467
Convert the EPS files to PNG when generating the documentation
.hgignore
configure.ac
doc/Doxyfile.in
doc/Makefile.am
     1.1 --- a/.hgignore	Thu Apr 24 20:26:14 2008 +0100
     1.2 +++ b/.hgignore	Tue Apr 22 18:12:58 2008 +0200
     1.3 @@ -7,6 +7,7 @@
     1.4  *.log
     1.5  *.lo
     1.6  *.tar.*
     1.7 +*.bak
     1.8  Makefile.in
     1.9  aclocal.m4
    1.10  config.h.in
    1.11 @@ -25,6 +26,7 @@
    1.12  .libs/*
    1.13  .deps/*
    1.14  demo/*.eps
    1.15 +doc/images/*.png
    1.16  
    1.17  syntax: regexp
    1.18  (.*/)?\#[^/]*\#$
     2.1 --- a/configure.ac	Thu Apr 24 20:26:14 2008 +0100
     2.2 +++ b/configure.ac	Tue Apr 22 18:12:58 2008 +0200
     2.3 @@ -27,6 +27,7 @@
     2.4  AC_PROG_LIBTOOL
     2.5  
     2.6  AC_CHECK_PROG([doxygen_found],[doxygen],[yes],[no])
     2.7 +AC_CHECK_PROG([gs_found],[gs],[yes],[no])
     2.8  
     2.9  if test x"$lx_cmdline_cxxflags_set" != x"set" -a "$GXX" = yes; then
    2.10    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"
     3.1 --- a/doc/Doxyfile.in	Thu Apr 24 20:26:14 2008 +0100
     3.2 +++ b/doc/Doxyfile.in	Tue Apr 22 18:12:58 2008 +0200
     3.3 @@ -101,7 +101,8 @@
     3.4                           @abs_top_srcdir@/doc
     3.5  EXAMPLE_PATTERNS       = 
     3.6  EXAMPLE_RECURSIVE      = NO
     3.7 -IMAGE_PATH             = @abs_top_srcdir@/doc/images
     3.8 +IMAGE_PATH             = @abs_top_srcdir@/doc/images \
     3.9 +		       	 @abs_top_builddir@/doc/gen-images
    3.10  INPUT_FILTER           = 
    3.11  FILTER_PATTERNS        = 
    3.12  FILTER_SOURCE_FILES    = NO
     4.1 --- a/doc/Makefile.am	Thu Apr 24 20:26:14 2008 +0100
     4.2 +++ b/doc/Makefile.am	Tue Apr 22 18:12:58 2008 +0200
     4.3 @@ -9,10 +9,38 @@
     4.4  	doc/namespaces.dox \
     4.5  	doc/html
     4.6  
     4.7 +DOC_EPS_IMAGES18 = \
     4.8 +	nodeshape_0.eps \
     4.9 +	nodeshape_1.eps \
    4.10 +	nodeshape_2.eps \
    4.11 +	nodeshape_3.eps \
    4.12 +	nodeshape_4.eps
    4.13 +
    4.14 +DOC_EPS_IMAGES = \
    4.15 +	$(DOC_EPS_IMAGES18)
    4.16 +
    4.17 +DOC_PNG_IMAGES = \
    4.18 +	$(DOC_EPS_IMAGES:%.eps=doc/gen-images/%.png)
    4.19 +
    4.20 +EXTRA_DIST += $(DOC_EPS_IMAGES:%=doc/images/%)
    4.21 +
    4.22  doc/html:
    4.23  	$(MAKE) $(AM_MAKEFLAGS) html
    4.24  
    4.25 -html-local:
    4.26 +GS_COMMAND=gs -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4
    4.27 +
    4.28 +$(DOC_EPS_IMAGES18:%.eps=doc/gen-images/%.png): doc/gen-images/%.png: doc/images/%.eps
    4.29 +	-mkdir doc/gen-images
    4.30 +	if test ${gs_found} = yes; then \
    4.31 +	  $(GS_COMMAND) -sDEVICE=pngalpha -r18 -sOutputFile=$@ $<; \
    4.32 +	else \
    4.33 +	  echo; \
    4.34 +	  echo "Ghostscript not found."; \
    4.35 +	  echo; \
    4.36 +	  exit 1; \
    4.37 +	fi
    4.38 +
    4.39 +html-local: $(DOC_PNG_IMAGES)
    4.40  	if test ${doxygen_found} = yes; then \
    4.41  	  cd doc; \
    4.42  	  doxygen Doxyfile; \
    4.43 @@ -27,6 +55,8 @@
    4.44  clean-local:
    4.45  	-rm -rf doc/html
    4.46  	-rm -f doc/doxygen.log
    4.47 +	-rm -f $(DOC_PNG_IMAGES)
    4.48 +	-rm -rf doc/gen-images
    4.49  
    4.50  update-external-tags:
    4.51  	wget -O doc/libstdc++.tag.tmp http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/libstdc++.tag && \