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