prepare documentation of the APIs
[apps/madmutt.git] / apidoc / Makefile.am
diff --git a/apidoc/Makefile.am b/apidoc/Makefile.am
new file mode 100644 (file)
index 0000000..a11d01d
--- /dev/null
@@ -0,0 +1,47 @@
+# $Id: Makefile.am 1036 2006-11-12 10:42:14Z sam $
+
+EXTRA_DIST = doxygen.cfg.in $(doxygen_DOX)
+doxygen_DOX = 
+
+if BUILD_DOCUMENTATION
+htmldoc_DATA = html/doxygen.css
+htmldocdir = $(datadir)/doc/madmutt-api/html
+if USE_LATEX
+pdfdoc_DATA = latex/madmutt-api.pdf
+pdfdocdir = $(datadir)/doc/madmutt-api/pdf
+endif
+endif
+
+html/doxygen.css html/doxygen.png: stamp-doxygen
+latex/madmutt-api.pdf: stamp-latex
+
+stamp-doxygen: $(doxygen_DOX)
+if BUILD_DOCUMENTATION
+       doxygen doxygen.cfg
+       touch stamp-doxygen
+endif
+
+stamp-latex: stamp-doxygen
+if BUILD_DOCUMENTATION
+if USE_LATEX
+       rm -f latex/madmutt-api.tex latex/madmutt-api.pdf
+       mv latex/refman.tex latex/madmutt-api.tex
+       sed 's/setlength{/renewcommand{/' latex/madmutt-api.tex > latex/refman.tex
+       cd latex && $(MAKE) $(AM_CFLAGS) refman.pdf
+       mv latex/refman.pdf latex/madmutt-api.pdf
+       touch stamp-latex
+endif
+endif
+
+clean: clean-local
+clean-local:
+       -rm -Rf html latex
+       -rm -f stamp-latex stamp-doxygen
+
+install-data-local:
+if BUILD_DOCUMENTATION
+       $(mkinstalldirs) $(DESTDIR)$(datadir)/doc/madmutt-api/html
+       cp `find html -name '*.html' -o -name '*.gif' -o -name '*.png'` \
+         $(DESTDIR)$(datadir)/doc/madmutt-api/html
+endif
+