source: trunk/doc/Makefile.am @ 1905

Last change on this file since 1905 was 1905, checked in by Peter, 12 years ago

Revised make dependencies for generating doxygen docs (fixes #438 and #501).

In doxygen.config removed variables INPUT and FILE_PATTERN to avoid us
from editing these values. The variables ignored in the new setup.

doc/Makefile includes a 'doxygen.mk' located in each of the
directories with header files. This is similar to how Maefiles include
files from '.deps/' to get dependencies for source and header
files. The inclusion relies on an undocumented feature in Automake,
but it should likely not be a problem with future versions of Automake
as it has been frequently been mentioned as a solution on the automake
mailing list.

These 'doxygen.mk' are generated during 'make all' in each of these
directories; they are also updated during 'make {doc|html|dvi|ps|pdf}'
in topdir and topdir/yat. This latter is to avoid situations in which
doc/Makefile is corrupted because of missing include.

This implies that obscure things like
make clean && cd doc && make doc
will fail noisily.

One could let doc/Makefile go into yat/subdirs and create the
doxygen.mk files but I don't like that kind of setup.

Another thought might be to have doxygen.mk removed during 'make
distclean' rather than 'make clean'. Thoughts are welcome.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.6 KB
Line 
1## Process this file with automake to produce Makefile.in
2##
3## $Id: Makefile.am 1905 2009-04-17 16:46:43Z peter $
4
5# Copyright (C) 2003 Jari Häkkinen
6# Copyright (C) 2005 Peter Johansson
7# Copyright (C) 2006, 2007, 2008 Jari Häkkinen, Peter Johansson
8#
9# This file is part of the yat library, http://dev.thep.lu.se/yat
10#
11# The yat library is free software; you can redistribute it and/or
12# modify it under the terms of the GNU General Public License as
13# published by the Free Software Foundation; either version 3 of the
14# License, or (at your option) any later version.
15#
16# The yat library is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19# General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with yat. If not, see <http://www.gnu.org/licenses/>.
23
24EXTRA_DIST = build_tool.doxygen concepts.doxygen \
25  namespaces.doxygen Statistics.doxygen
26
27
28@am__include@ @am__quote@./$(top_builddir)/yat/classifier/doxygen.mk@am__quote@
29@am__include@ @am__quote@./$(top_builddir)/yat/normalizer/doxygen.mk@am__quote@
30@am__include@ @am__quote@./$(top_builddir)/yat/random/doxygen.mk@am__quote@
31@am__include@ @am__quote@./$(top_builddir)/yat/regression/doxygen.mk@am__quote@
32@am__include@ @am__quote@./$(top_builddir)/yat/statistics/doxygen.mk@am__quote@
33@am__include@ @am__quote@./$(top_builddir)/yat/utility/doxygen.mk@am__quote@
34
35DOXYGEN_INPUT=$(classifier_doxygen_input) \
36$(normalizer_doxygen_input) \
37$(random_doxygen_input) \
38$(regression_doxygen_input) \
39$(statistics_doxygen_input) \
40$(utility_doxygen_input) \
41$(srcdir)/build_tool.doxygen \
42$(builddir)/first_page.doxygen \
43$(srcdir)/namespaces.doxygen \
44$(srcdir)/concepts.doxygen \
45$(srcdir)/Statistics.doxygen
46
47DOXYGEN_DEPS = $(DOXYGEN_INPUT) doxygen.config \
48$(top_builddir)/yat/classifier/doxygen.mk \
49$(top_builddir)/yat/normalizer/doxygen.mk \
50$(top_builddir)/yat/random/doxygen.mk \
51$(top_builddir)/yat/regression/doxygen.mk \
52$(top_builddir)/yat/statistics/doxygen.mk \
53$(top_builddir)/yat/utility/doxygen.mk
54
55doc: html dvi ps pdf
56
57if HAVE_DOXYGEN
58
59
60# these are supported by automake and *-local will add target to *
61dvi-local: $(PACKAGE).dvi
62ps-local: $(PACKAGE).ps
63pdf-local: $(PACKAGE).pdf
64html-local: $(DX_HTML_OUTPUT)/index.html
65
66# this is not supported by automake - there is no target latex
67latex-local: $(DX_LATEX_OUTPUT)/refman.tex
68
69$(DX_HTML_OUTPUT)/index.html: $(DOXYGEN_DEPS)
70  @(cat doxygen.config && $(ECHO) "INPUT = $(DOXYGEN_INPUT)" && \
71  $(ECHO) GENERATE_HTML = YES) | $(DOXYGEN) -;
72
73$(DX_LATEX_OUTPUT)/refman.tex: $(DOXYGEN_DEPS)
74  @(cat doxygen.config && $(ECHO) "INPUT = $(DOXYGEN_INPUT)" && \
75  $(ECHO) GENERATE_LATEX = YES) | $(DOXYGEN) -;
76
77$(PACKAGE).dvi: $(DX_LATEX_OUTPUT)/refman.tex
78  cd $(DX_LATEX_OUTPUT) && latex refman.tex && latex refman.tex
79  cp $(DX_LATEX_OUTPUT)/refman.dvi $(PACKAGE).dvi
80
81$(PACKAGE).ps: $(PACKAGE).dvi
82  cd $(DX_LATEX_OUTPUT) && dvips -q -o refman.ps refman.dvi;
83  cp $(DX_LATEX_OUTPUT)/refman.ps $(PACKAGE).ps
84
85$(PACKAGE).pdf: $(DX_LATEX_OUTPUT)/refman.tex
86  cd $(DX_LATEX_OUTPUT) && $(MAKE) pdf;
87  cp $(DX_LATEX_OUTPUT)/refman.pdf $(PACKAGE).pdf
88
89endif
90
91install-data-hook:
92  @$(NORMAL_INSTALL)
93  @$(MAKE) $(AM_MAKEFLAGS) install-dvi install-ps install-pdf install-html
94
95uninstall-hook:
96  @$(NORMAL_UNINSTALL)
97  rm -rf $(DESTDIR)$(htmldir)/html $(DESTDIR)$(dvidir)/$(PACKAGE).dvi \
98  $(DESTDIR)$(psdir)/$(PACKAGE).ps $(DESTDIR)$(pdfdir)/$(PACKAGE).pdf
99
100install-html-am:
101  @if test -d $(DX_HTML_OUTPUT); then \
102  test -d $(DESTDIR)$(htmldir)/html || \
103    $(MKDIR_P) $(DESTDIR)$(htmldir)/html;\
104  $(INSTALL_DATA) $(DX_HTML_OUTPUT)/* $(DESTDIR)$(htmldir)/html; \
105  fi
106
107install-dvi-am:
108  @if test -f "$(PACKAGE).dvi"; then \
109  test -d $(DESTDIR)$(dvidir) || $(MKDIR_P) $(DESTDIR)$(dvidir);\
110  $(INSTALL_DATA) $(PACKAGE).dvi \
111   $(DESTDIR)$(dvidir)/$(PACKAGE).dvi; \
112  $(ECHO) $(INSTALL_DATA) $(PACKAGE).dvi \
113   $(DESTDIR)$(dvidir)/$(PACKAGE).dvi; \
114  fi
115
116install-ps-am:
117  @if test -f "$(PACKAGE).ps"; then \
118  test -d $(DESTDIR)$(psdir) || $(MKDIR_P) $(DESTDIR)$(psdir);\
119  $(INSTALL_DATA) $(PACKAGE).ps \
120   $(DESTDIR)$(psdir)/$(PACKAGE).ps; \
121  $(ECHO) $(INSTALL_DATA) $(PACKAGE).ps $(DESTDIR)$(psdir)/$(PACKAGE).ps;\
122  fi
123
124install-pdf-am:
125  @if test -f "$(PACKAGE).pdf"; then \
126  test -d $(DESTDIR)$(pdfdir) || $(MKDIR_P) $(DESTDIR)$(pdfdir);\
127  $(INSTALL_DATA) $(PACKAGE).pdf \
128   $(DESTDIR)$(pdfdir)/$(PACKAGE).pdf; \
129  $(ECHO) $(INSTALL_DATA) $(PACKAGE).pdf \
130   $(DESTDIR)$(pdfdir)/$(PACKAGE).pdf; \
131  fi
132
133
134mostlyclean-local:
135  rm -f doxygen.error *~
136
137clean-local:
138  rm -rf $(PACKAGE).dvi $(PACKAGE).ps $(PACKAGE).pdf $(DX_HTML_OUTPUT) \
139  $(DX_LATEX_OUTPUT) stamp-doxygen
140
141FORCE:
Note: See TracBrowser for help on using the repository browser.