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

conrad's avatar
conrad committed
3 4 5 6 7
EXTRA_DIST = Doxyfile.in \
	forcefeed.fig forcefeed.eps forcefeed.png \
	hungry.fig hungry.eps hungry.png \
	oggzdump.1.sgml oggzdiff.1.sgml \
	oggzdump.1 oggzdiff.1
andre's avatar
andre committed
8

conrad's avatar
conrad committed
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
man_MANS = oggzdump.1 oggzdiff.1

doc_DATA = doxygen-build.stamp

html: oggzdump.1.html

if HAVE_DOCBOOKTOMAN
%.1: %.1.sgml
	docbook-to-man $< > $@
else
%.1: %.1.sgml
endif

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

if HAVE_DOXYGEN
conrad's avatar
conrad committed
29
doxygen-build.stamp: Doxyfile $(top_srcdir)/include/oggz/*.h $(top_srcdir)/src/examples/*.c
andre's avatar
andre committed
30 31 32 33 34 35 36 37
	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
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
dist_docdir = $(distdir)/liboggz

dist-hook:
	if test -d liboggz; then \
	  mkdir $(dist_docdir); \
	  for dir in liboggz/*; do \
            if test -d $$dir; then \
              b=`basename $$dir`; \
              mkdir $(dist_docdir)/$$b; \
	      for f in $$dir/*; do \
                cp -p $$f $(dist_docdir)/$$b; \
              done \
            fi \
          done \
	fi


andre's avatar
andre committed
55 56 57 58 59 60 61
install-data-local: doxygen-build.stamp
	$(mkinstalldirs) $(docdir)
	if test -d liboggz; then \
	  for dir in liboggz/*; do \
	    if test -d $$dir; then \
	      b=`basename $$dir`; \
	      $(mkinstalldirs) $(docdir)/$$b; \
conrad's avatar
conrad committed
62 63 64
	      for f in $$dir/*; do \
		$(INSTALL_DATA) $$f $(docdir)/$$b; \
              done \
andre's avatar
andre committed
65 66 67 68 69 70 71
	    fi \
	  done \
	fi

uninstall-local:
	rm -rf $(docdir)

72
clean-local:
andre's avatar
andre committed
73
	if test -d liboggz; then rm -rf liboggz; fi
74
	if test -f doxygen-build.stamp; then rm -f doxygen-build.stamp; fi