doc/Makefile.am
author Alpar Juttner <alpar@cs.elte.hu>
Wed, 07 Nov 2012 18:13:26 +0100
branch1.2
changeset 1169 774349a16ba0
parent 1114 cfdbf1574403
permissions -rw-r--r--
Merge bugfix #440 to branch 1.2
     1 EXTRA_DIST += \
     2 	doc/Doxyfile.in \
     3 	doc/DoxygenLayout.xml \
     4 	doc/coding_style.dox \
     5 	doc/dirs.dox \
     6 	doc/groups.dox \
     7 	doc/lgf.dox \
     8 	doc/license.dox \
     9 	doc/mainpage.dox \
    10 	doc/migration.dox \
    11 	doc/min_cost_flow.dox \
    12 	doc/named-param.dox \
    13 	doc/namespaces.dox \
    14 	doc/references.bib \
    15 	doc/template.h \
    16 	doc/html \
    17 	doc/CMakeLists.txt
    18 
    19 DOC_EPS_IMAGES18 = \
    20 	grid_graph.eps \
    21 	nodeshape_0.eps \
    22 	nodeshape_1.eps \
    23 	nodeshape_2.eps \
    24 	nodeshape_3.eps \
    25 	nodeshape_4.eps
    26 
    27 DOC_EPS_IMAGES27 = \
    28 	bipartite_matching.eps \
    29 	bipartite_partitions.eps \
    30 	connected_components.eps \
    31 	edge_biconnected_components.eps \
    32 	matching.eps \
    33 	node_biconnected_components.eps \
    34 	planar.eps \
    35 	strongly_connected_components.eps
    36 
    37 DOC_EPS_IMAGES = \
    38 	$(DOC_EPS_IMAGES18) \
    39 	$(DOC_EPS_IMAGES27)
    40 
    41 DOC_PNG_IMAGES = \
    42 	$(DOC_EPS_IMAGES:%.eps=doc/gen-images/%.png)
    43 
    44 EXTRA_DIST += $(DOC_EPS_IMAGES:%=doc/images/%)
    45 
    46 doc/html:
    47 	$(MAKE) $(AM_MAKEFLAGS) html
    48 
    49 GS_COMMAND=gs -dNOPAUSE -dBATCH -q -dEPSCrop -dTextAlphaBits=4 -dGraphicsAlphaBits=4
    50 
    51 $(DOC_EPS_IMAGES18:%.eps=doc/gen-images/%.png): doc/gen-images/%.png: doc/images/%.eps
    52 	-mkdir doc/gen-images
    53 	if test ${gs_found} = yes; then \
    54 	  $(GS_COMMAND) -sDEVICE=pngalpha -r18 -sOutputFile=$@ $<; \
    55 	else \
    56 	  echo; \
    57 	  echo "Ghostscript not found."; \
    58 	  echo; \
    59 	  exit 1; \
    60 	fi
    61 
    62 $(DOC_EPS_IMAGES27:%.eps=doc/gen-images/%.png): doc/gen-images/%.png: doc/images/%.eps
    63 	-mkdir doc/gen-images
    64 	if test ${gs_found} = yes; then \
    65 	  $(GS_COMMAND) -sDEVICE=pngalpha -r27 -sOutputFile=$@ $<; \
    66 	else \
    67 	  echo; \
    68 	  echo "Ghostscript not found."; \
    69 	  echo; \
    70 	  exit 1; \
    71 	fi
    72 
    73 references.dox: doc/references.bib
    74 	if test ${python_found} = yes; then \
    75 	  cd doc; \
    76 	  python @abs_top_srcdir@/scripts/bib2dox.py @abs_top_builddir@/$< >$@; \
    77 	  cd ..; \
    78 	else \
    79 	  echo; \
    80 	  echo "Python not found."; \
    81 	  echo; \
    82 	  exit 1; \
    83 	fi
    84 
    85 html-local: $(DOC_PNG_IMAGES) references.dox
    86 	if test ${doxygen_found} = yes; then \
    87 	  cd doc; \
    88 	  doxygen Doxyfile; \
    89 	  cd ..; \
    90 	else \
    91 	  echo; \
    92 	  echo "Doxygen not found."; \
    93 	  echo; \
    94 	  exit 1; \
    95 	fi
    96 
    97 clean-local:
    98 	-rm -rf doc/html
    99 	-rm -f doc/doxygen.log
   100 	-rm -f $(DOC_PNG_IMAGES)
   101 	-rm -rf doc/gen-images
   102 
   103 update-external-tags:
   104 	wget -O doc/libstdc++.tag.tmp http://gcc.gnu.org/onlinedocs/libstdc++/latest-doxygen/libstdc++.tag && \
   105 	mv doc/libstdc++.tag.tmp doc/libstdc++.tag || \
   106 	rm doc/libstdc++.tag.tmp
   107 
   108 install-html-local: doc/html
   109 	@$(NORMAL_INSTALL)
   110 	$(mkinstalldirs) $(DESTDIR)$(htmldir)/html
   111 	for p in doc/html/*.{html,css,png,map,gif,tag} ; do \
   112 	  f="`echo $$p | sed -e 's|^.*/||'`"; \
   113 	  echo " $(INSTALL_DATA) $$p $(DESTDIR)$(htmldir)/html/$$f"; \
   114 	  $(INSTALL_DATA) $$p $(DESTDIR)$(htmldir)/html/$$f; \
   115 	done
   116 
   117 uninstall-local:
   118 	@$(NORMAL_UNINSTALL)
   119 	for p in doc/html/*.{html,css,png,map,gif,tag} ; do \
   120 	  f="`echo $$p | sed -e 's|^.*/||'`"; \
   121 	  echo " rm -f $(DESTDIR)$(htmldir)/html/$$f"; \
   122 	  rm -f $(DESTDIR)$(htmldir)/html/$$f; \
   123 	done
   124 
   125 .PHONY: update-external-tags