Makefile.am 2.3 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 5 6
EXTRA_DIST = Doxyfile.in \
	forcefeed.fig forcefeed.eps forcefeed.png \
	hungry.fig hungry.eps hungry.png \
conrad's avatar
conrad committed
7
	oggzdump.1.sgml oggzdiff.1.sgml oggzmerge.1.sgml \
conrad's avatar
conrad committed
8 9
	oggzrip.1.sgml oggzinfo.1.sgml oggz-validate.1.sgml \
	oggzdump.1 oggzdiff.1 oggzmerge.1 oggzrip.1 oggzinfo.1 oggz-validate.1
andre's avatar
andre committed
10

conrad's avatar
conrad committed
11
man_MANS = oggzdump.1 oggzdiff.1 oggzmerge.1 oggzrip.1 oggzinfo.1 oggz-validate.1
conrad's avatar
conrad committed
12

13 14 15 16 17 18 19 20 21 22
else
EXTRA_DIST = Doxyfile.in \
	forcefeed.fig forcefeed.eps forcefeed.png \
	hungry.fig hungry.eps hungry.png \
	oggzdump.1.sgml oggzdiff.1.sgml oggzmerge.1.sgml \
	oggzrip.1.sgml oggzinfo.1.sgml oggz-validate.1.sgml
man_MANS =
endif


23 24 25 26
# 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
27
html: oggzdump.1.html oggzdiff.1.html oggzmerge.1.html oggzrip.1.html oggzinfo.1.html oggz-validate.1.html
conrad's avatar
conrad committed
28 29 30 31 32 33 34 35 36 37 38 39 40

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
41 42

if HAVE_DOXYGEN
conrad's avatar
conrad committed
43
doxygen-build.stamp: Doxyfile $(top_srcdir)/include/oggz/*.h $(top_srcdir)/src/examples/*.c
andre's avatar
andre committed
44 45 46 47 48 49 50 51
	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
52 53 54 55 56 57
dist_docdir = $(distdir)/liboggz

dist-hook:
	if test -d liboggz; then \
	  mkdir $(dist_docdir); \
	  for dir in liboggz/*; do \
58 59 60 61 62 63 64 65
            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
66 67 68 69 70
            fi \
          done \
	fi


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

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

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