Makefile.am 2.26 KB
Newer Older
andre's avatar
andre committed
1 2
docdir=$(prefix)/share/doc/@PACKAGE@

3
if HAVE_DOCBOOKTOMAN
conrad's avatar
conrad committed
4
man_MANS = oggzdiff.1 oggzdump.1 oggzinfo.1 oggzmerge.1 oggz-sort.1 \
5
	oggzrip.1 oggz-comment.1 oggz-scan.1 oggz-validate.1
6 7
else
man_MANS =
8 9 10
check:
	@echo "Error: Unable to build man pages, docbook-to-man required"
	@false
11 12
endif

conrad's avatar
conrad committed
13 14 15 16
EXTRA_DIST = $(man_MANS) Doxyfile.in \
	forcefeed.fig forcefeed.eps forcefeed.png \
	hungry.fig hungry.eps hungry.png \
	oggzdiff.1.sgml oggzdump.1.sgml oggzinfo.1.sgml oggzmerge.1.sgml \
17
	oggz-sort.1.sgml oggzrip.1.sgml oggz-comment.1.sgml oggz-scan.1.sgml \
18
	oggz-validate.1.sgml
conrad's avatar
conrad committed
19

20 21 22 23
# ensure doxygen-build.stamp is included,  or else the documentation will
# not be built or distributed
noinst_DATA = doxygen-build.stamp

conrad's avatar
conrad committed
24
html: oggzdiff.1.html oggzdump.1.html oggzinfo.1.html oggzmerge.1.html \
conrad's avatar
conrad committed
25 26
	oggz-sort.1.html oggzrip.1.html oggz-comment.1.html oggz-scan.1.html \
	oggz-validate.1.html
conrad's avatar
conrad committed
27 28 29

if HAVE_DOCBOOKTOMAN
%.1: %.1.sgml
thomasvs's avatar
thomasvs committed
30
	$(DOCBOOKTOMAN) $< > $@
conrad's avatar
conrad committed
31 32 33 34 35 36 37 38 39
else
%.1: %.1.sgml
endif

if HAVE_DOCBOOK2HTML
%.1.html: %.1.sgml
	-docbook2html $<
	mv index.html $@
endif
andre's avatar
andre committed
40 41

if HAVE_DOXYGEN
conrad's avatar
conrad committed
42
doxygen-build.stamp: Doxyfile $(top_srcdir)/include/oggz/*.h $(top_srcdir)/src/examples/*.c
andre's avatar
andre committed
43 44 45 46 47 48 49 50
	doxygen
	touch doxygen-build.stamp
else
doxygen-build.stamp:
	echo "*** Warning: Doxygen not found; documentation will not be built."
	touch doxygen-build.stamp
endif

conrad's avatar
conrad committed
51 52 53 54 55 56
dist_docdir = $(distdir)/liboggz

dist-hook:
	if test -d liboggz; then \
	  mkdir $(dist_docdir); \
	  for dir in liboggz/*; do \
57 58 59 60 61 62 63 64
            b=`basename $$dir`; \
            if test $$b != "CVS"; then \
              if test -d $$dir; then \
                mkdir $(dist_docdir)/$$b; \
	        for f in $$dir/*; do \
                  cp -p $$f $(dist_docdir)/$$b; \
                done \
              fi \
conrad's avatar
conrad committed
65 66 67 68 69
            fi \
          done \
	fi


andre's avatar
andre committed
70
install-data-local: doxygen-build.stamp
71
	$(mkinstalldirs) $(DESTDIR)$(docdir)
andre's avatar
andre committed
72 73 74 75
	if test -d liboggz; then \
	  for dir in liboggz/*; do \
	    if test -d $$dir; then \
	      b=`basename $$dir`; \
76
	      $(mkinstalldirs) $(DESTDIR)$(docdir)/$$b; \
conrad's avatar
conrad committed
77
	      for f in $$dir/*; do \
78
		$(INSTALL_DATA) $$f $(DESTDIR)$(docdir)/$$b; \
conrad's avatar
conrad committed
79
              done \
andre's avatar
andre committed
80 81 82 83 84
	    fi \
	  done \
	fi

uninstall-local:
85
	rm -rf $(DESTDIR)$(docdir)
andre's avatar
andre committed
86

87
clean-local:
andre's avatar
andre committed
88
	if test -d liboggz; then rm -rf liboggz; fi
89
	if test -f doxygen-build.stamp; then rm -f doxygen-build.stamp; fi