OSDN Git Service

add document dist rules
[ccunit/ccunit.git] / doc / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2 ##    Copyright (C) 2003 TSUTSUMI Kikuo.
3 ##    This file is part of the CCUnit Library.
4
5 ##    The CCUnit Library is free software; you can redistribute it and/or
6 ##    modify it under the terms of the GNU Lesser General Public License
7 ##    as published by the Free Software Foundation; either version 2.1 of
8 ##    the License, or (at your option) any later version.
9
10 ##    The CCUnit Library is distributed in the hope that it will be
11 ##    useful, but WITHOUT ANY WARRANTY; without even the implied warranty
12 ##    of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 ##    GNU Lesser General Public License for more details.
14
15 ##    You should have received a copy of the GNU Lesser General Public
16 ##    License along with the CCUnit Library; see the file COPYING.LESSER.
17 ##    If not, write to the Free Software Foundation, Inc., 59 Temple
18 ##    Place - Suite 330, Boston, MA 02111-1307, USA.  
19
20 # $Id$
21
22 EXTRA_DIST = $(doxygen_input) $(static_pages) $(DOXYSRCS)
23 doxygen_input=header.html footer.html
24 DOXYSRCS=mainpage.dox cookbook.dox
25
26 html_DATA = html/index.html
27 htmldir = $(pkgdatadir)/html
28
29 if ENABLE_JADOC
30 htmlja_DATA = ja/html/index.html
31 htmljadir = $(htmldir)/ja
32 endif
33
34 static_pages=FAQ
35
36 install-data-hook:
37         -test -d html && cp -p $(static_pages) $(DESTDIR)$(htmldir)
38         -test -d html && cp -dpR html/* $(DESTDIR)$(htmldir)
39 if ENABLE_JADOC
40         -test -d html/ja && cp -dpR ja/html/* $(DESTDIR)$(htmldir)/ja
41 endif
42
43 uninstall-local:
44         $(RM) -rf $(DESTDIR)$(htmldir)
45
46 distdocdir=@DISTDOCDIR@
47 distdocjadir=@DISTDOCJADIR@
48
49 dist-docs:
50         -$(mkinstalldirs) $(distdocdir)/html
51         cp -p $(static_pages) $(distdocdir)/html
52         cp -p html/* $(distdocdir)/html
53 if ENABLE_JADOC
54         -$(mkinstalldirs) $(distdocjadir)/html/ja
55         cp -p html/* $(distdocjadir)/html/ja
56 endif
57
58 CMNTST=<span class="comment">/
59 CMNTED=/</span>
60
61 html/index.html: Doxyfile Doxyfile.en \
62                 $(doxygen_input) $(CCUNITSRCS) $(DOXYSRCS)
63         doxygen Doxyfile.en
64         sed -e 's!\($(CMNTST)\)/\(\*.*\*\)\\\($(CMNTED)\)!\1\2\3!g' \
65                 html/cookbook.html > cookbook-cmntfix.html
66         mv cookbook-cmntfix.html html/cookbook.html
67
68 if ENABLE_JADOC
69 ja/html/index.html: Doxyfile Doxyfile.en \
70                 $(doxygen_input) $(CCUNITSRCS) $(DOXYSRCS)
71         doxygen Doxyfile.ja
72         sed -e 's!\($(CMNTST)\)/\(\*.*\*\)\\\($(CMNTED)\)!\1\2\3!g' \
73                 ja/html/cookbook.html > cookbook-cmntfix.html
74         mv cookbook-cmntfix.html ja/html/cookbook.html
75 endif
76
77 CLEANFILES=*~ .*~ ./\#*\# *.log latex html man