OSDN Git Service

change alias
[ccunit/ccunit.git] / doc / Makefile.am
1 EXTRA_DIST = $(doxygen_input) $(static_pages) $(DOXYSRCS)
2
3 DOXYGEN=@DOXYGEN@
4 doxygen_input = header.html footer.html
5 static_pages = FAQ
6 DOXYSRCS=mainpage.dox cookbook.dox
7
8 CCUNITSRCS=$(top_srcdir)/src/ccunit/*.[ch] $(top_srcdir)/src/tools/*.c
9
10 if DOC
11
12 htmldir = $(pkgdatadir)/html
13 distdocdir = $(top_distdir)/$(PACKAGE)-$(VERSION)-doc
14 if JPNDOC
15 htmljadir = $(pkgdatadir)/ja/html
16 distdocjadir = $(top_distdir)/$(PACKAGE)-$(VERSION)-doc-ja
17 endif
18
19 install-data-hook:
20         -test -d html && cp -p $(static_pages) html
21         -test -d html && cp -dpR html/* $(DESTDIR)$(htmldir) 
22 if JPNDOC
23         -test -d ja/html && cp -dpR ja/html/* $(DESTDIR)$(htmljadir)
24 endif
25
26 uninstall-local:
27         $(RM) -rf $(DESTDIR)$(htmldir)
28 if JPNDOC
29         $(RM) -rf $(DESTDIR)$(htmljadir)
30 endif
31
32 docs: $(static_pages) html/index.html ja/html/index.html
33
34 dist-docs:
35         cp -p $(static_pages) $(distdocdir)/html
36         cp -p html/* $(distdocdir)/html
37 if JPNDOC
38         cp -p ja/html/* $(distdocjadir)/ja/html
39 endif
40
41 else
42
43 install-data-hook:
44 uninstall-local:
45 docs:
46
47 endif
48
49
50 CMNTST=<span class="comment">/
51 CMNTED=/</span>
52
53 html/index.html: Doxyfile Doxyfile.en \
54                 $(doxygen_input) $(CCUNITSRCS) $(DOXYSRCS)
55         $(DOXYGEN) Doxyfile.en
56         sed -e 's!\($(CMNTST)\)/\(\*.*\*\)\\\($(CMNTED)\)!\1\2\3!g' \
57                 html/cookbook.html > cookbook-cmntfix.html
58         mv cookbook-cmntfix.html html/cookbook.html
59
60 if JPNDOC
61 ja/html/index.html: Doxyfile Doxyfile.jp \
62                 $(doxygen_input) $(CCUNITSRCS) $(DOXYSRCS)
63         $(DOXYGEN) Doxyfile.jp
64         sed -e 's!\($(CMNTST)\)/\(\*.*\*\)\\\($(CMNTED)\)!\1\2\3!g' \
65                 ja/html/cookbook.html > cookbook-cmntfix.html
66         mv cookbook-cmntfix.html ja/html/cookbook.html
67 else
68
69 ja/html/index.html:
70         @true
71
72 endif
73
74 pdf: @PACKAGE@.pdf
75 @PACKAGE@.pdf:
76         $(MAKE) -C ./latex pdf
77         $(LN_S) ./latex/refman.ps @PACKAGE@.ps
78         $(LN_S) ./latex/refman.pdf @PACKAGE@.pdf
79
80
81 clean-local:
82         $(RM) -r latex
83         $(RM) -r html man @PACKAGE@.ps @PACKAGE@.pdf
84
85 CLEANFILES=*~ .*~ ./\#*\# *.log