source: trunk/doc/Makefile.am @ 1265

Last change on this file since 1265 was 1265, checked in by Peter, 14 years ago

Changing so generated docs are not distributed and consequently docs can be generated in builddir

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.2 KB
Line 
1## Process this file with automake to produce Makefile.in
2##
3## $Id: Makefile.am 1265 2008-04-09 12:04:37Z peter $
4
5# Copyright (C) 2003 Jari Häkkinen
6# Copyright (C) 2005 Peter Johansson
7# Copyright (C) 2006 Jari Häkkinen, Peter Johansson
8# Copyright (C) 2007 2008 Peter Johansson
9#
10# This file is part of the yat library, http://trac.thep.lu.se/yat
11#
12# The yat library is free software; you can redistribute it and/or
13# modify it under the terms of the GNU General Public License as
14# published by the Free Software Foundation; either version 2 of the
15# License, or (at your option) any later version.
16#
17# The yat library is distributed in the hope that it will be useful,
18# but WITHOUT ANY WARRANTY; without even the implied warranty of
19# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20# General Public License for more details.
21#
22# You should have received a copy of the GNU General Public License
23# along with this program; if not, write to the Free Software
24# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25# 02111-1307, USA.
26
27
28stamp-doxygen: doxygen.config Makefile
29  @$(MAKE) $(AM_MAKEFLAGS) update-stamp-doxygen
30
31update-stamp-doxygen: FORCE
32  @input=`$(SED) -n 's/^[ \t]*INPUT[ \t]*=[ \t]*//p' doxygen.config`;\
33  pattern=\
34  `$(SED) -n 's/^[ \t]*FILE_PATTERNS[ \t]*=[ \t]*//p' doxygen.config`;\
35  if (test -z "$$pattern"); then \
36    pattern="*.c *.cc *.cxx *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp *.h++ *.idl";\
37  fi;\
38  for i in $$input; do \
39    if (test -d $$i); then \
40      for p in $$pattern; do \
41        input2="$$input2 `find $$i -name $$p|xargs`";\
42      done; \
43    else \
44      input2="$$input2 $ii"; \
45    fi; \
46  done; \
47  for i in $$input2; do \
48    if (test $$i -nt stamp-doxygen); then \
49      echo timestamp > stamp-doxygen; \
50    fi; \
51  done;
52
53if HAVE_DOXYGEN
54
55doc: html dvi ps pdf
56
57
58# these are supported by automake and *-local will add target to *
59dvi-local: update-stamp-doxygen $(PACKAGE).dvi
60ps-local: update-stamp-doxygen $(PACKAGE).ps
61pdf-local: update-stamp-doxygen $(PACKAGE).pdf
62html-local: update-stamp-doxygen $(DX_HTML_OUTPUT)/index.html
63
64# this is not supported by automake - there is no target latex
65latex-local: $(DX_LATEX_OUTPUT)/refman.tex
66
67$(DX_HTML_OUTPUT)/index.html: Makefile doxygen.config stamp-doxygen
68  @(cat doxygen.config; $(ECHO) GENERATE_HTML = YES) | doxygen -;
69
70$(DX_LATEX_OUTPUT)/refman.tex: Makefile doxygen.config stamp-doxygen
71  @(cat doxygen.config; $(ECHO) GENERATE_LATEX = YES) | doxygen -;
72
73$(PACKAGE).dvi: $(DX_LATEX_OUTPUT)/refman.tex
74  cd $(DX_LATEX_OUTPUT) && latex refman.tex && latex refman.tex
75  cp $(DX_LATEX_OUTPUT)/refman.dvi $(PACKAGE).dvi
76
77$(PACKAGE).ps: $(PACKAGE).dvi
78  cd $(DX_LATEX_OUTPUT) && dvips -o refman.ps refman.dvi;
79  cp $(DX_LATEX_OUTPUT)/refman.ps $(PACKAGE).ps
80
81$(PACKAGE).pdf: $(DX_LATEX_OUTPUT)/refman.tex
82  cd $(DX_LATEX_OUTPUT) && $(MAKE) pdf;
83  cp $(DX_LATEX_OUTPUT)/refman.pdf $(PACKAGE).pdf
84
85endif
86
87install-data-hook:
88  @$(MAKE) $(AM_MAKEFLAGS) install-dvi install-ps install-pdf install-html
89
90uninstall-hook:
91  rm -rf $(DESTDIR)$(htmldir)/html $(DESTDIR)$(dvidir)/$(PACKAGE).dvi \
92  $(DESTDIR)$(psdir)/$(PACKAGE).ps $(DESTDIR)$(pdfdir)/$(PACKAGE).pdf
93
94install-html-am:
95  if test -d $(DX_HTML_OUTPUT); then \
96  test -d $(DESTDIR)$(htmldir)/html || \
97    $(MKDIR_P) $(DESTDIR)$(htmldir)/html;\
98  $(INSTALL_DATA) $(DX_HTML_OUTPUT)/* $(DESTDIR)$(htmldir)/html; \
99  fi
100
101install-dvi-am:
102  @if test -f "$(PACKAGE).dvi"; then \
103  test -d $(DESTDIR)$(dvidir) || $(MKDIR_P) $(DESTDIR)$(dvidir);\
104  $(INSTALL_DATA) $(PACKAGE).dvi \
105   $(DESTDIR)$(dvidir)/$(PACKAGE).dvi; \
106  $(ECHO) $(INSTALL_DATA) $(PACKAGE).dvi \
107   $(DESTDIR)$(dvidir)/$(PACKAGE).dvi; \
108  fi
109
110install-ps-am:
111  @if test -f "$(PACKAGE).ps"; then \
112  test -d $(DESTDIR)$(psdir) || $(MKDIR_P) $(DESTDIR)$(psdir);\
113  $(INSTALL_DATA) $(PACKAGE).ps \
114   $(DESTDIR)$(psdir)/$(PACKAGE).ps; \
115  $(ECHO) $(INSTALL_DATA) $(PACKAGE).ps $(DESTDIR)$(psdir)/$(PACKAGE).ps;\
116  fi
117
118install-pdf-am:
119  @if test -f "$(PACKAGE).pdf"; then \
120  test -d $(DESTDIR)$(pdfdir) || $(MKDIR_P) $(DESTDIR)$(pdfdir);\
121  $(INSTALL_DATA) $(PACKAGE).pdf \
122   $(DESTDIR)$(pdfdir)/$(PACKAGE).pdf; \
123  $(ECHO) $(INSTALL_DATA) $(PACKAGE).pdf \
124   $(DESTDIR)$(pdfdir)/$(PACKAGE).pdf; \
125  fi
126
127
128mostlyclean-local:
129  rm -f *~
130
131clean-local:
132  rm -rf $(PACKAGE).dvi $(PACKAGE).ps $(PACKAGE).pdf $(DX_HTML_OUTPUT) \
133  $(DX_LATEX_OUTPUT)
134
135FORCE:
136
137
Note: See TracBrowser for help on using the repository browser.