source: neercs/trunk/doc/Makefile.am @ 4221

Last change on this file since 4221 was 4221, checked in by Sam Hocevar, 12 years ago

Improve doc generation.

File size: 1.6 KB
Line 
1# $Id: Makefile.am 1986 2008-06-20 19:49:23Z jylam $
2
3EXTRA_DIST = doxygen.cfg.in doxygen.css footer.html header.html \
4             $(man_MANS) $(doxygen_DOX)
5CLEANFILES = doxygen.log stamp-latex stamp-doxygen
6
7doxygen_DOX = neercs.dox
8man_MANS = neercs.1
9
10if BUILD_DOCUMENTATION
11htmldoc_DATA = html/doxygen.css
12htmldocdir = $(datadir)/doc/neercs/html
13if USE_LATEX
14pdfdoc_DATA = latex/neercs.pdf
15pdfdocdir = $(datadir)/doc/neercs/pdf
16endif
17endif
18
19html/doxygen.css html/doxygen.png: stamp-doxygen
20latex/neercs.pdf: stamp-latex
21
22stamp-doxygen: $(doxygen_DOX) doxygen.cfg
23if BUILD_DOCUMENTATION
24        doxygen doxygen.cfg 2>&1 | tee doxygen.log
25        touch stamp-doxygen
26endif
27
28stamp-latex: stamp-doxygen
29if BUILD_DOCUMENTATION
30if USE_LATEX
31        rm -f latex/neercs.tex latex/neercs.pdf
32        mv latex/refman.tex latex/neercs.tex
33        sed 's/setlength{/renewcommand{/' latex/neercs.tex > latex/refman.tex
34        cd latex && $(MAKE) $(AM_CFLAGS) refman.pdf || (cat refman.log; exit 1)
35        mv latex/refman.pdf latex/neercs.pdf
36        touch stamp-latex
37endif
38endif
39
40clean-local:
41        -rm -Rf html latex
42
43install-data-local:
44        $(mkinstalldirs) $(DESTDIR)$(mandir)/man1
45if BUILD_DOCUMENTATION
46        mkdir -p $(DESTDIR)$(datadir)/doc
47        $(mkinstalldirs) $(DESTDIR)$(datadir)/doc/neercs/html
48        cp `find html -name '*.html' -o -name '*.gif' -o -name '*.png'` \
49          $(DESTDIR)$(datadir)/doc/neercs/html
50        $(mkinstalldirs) $(DESTDIR)$(mandir)/man3
51        for man in $$(find man -name '*.3neercs'); do \
52          sed -e 's/man3neercs/man3/g' -e "s/fC'\([a-zA-Z0-9]*\)'/fC\"\1\"/g" \
53            $$man >$(DESTDIR)$(mandir)/man3/$${man##*/}; \
54        done
55endif
56
57uninstall-local:
58        rmdir $(DESTDIR)$(datadir)/doc 2>/dev/null || true
59
Note: See TracBrowser for help on using the repository browser.