diff --git a/Makefile.am b/Makefile.am
index b4207cdf29489e64d32aff31a89aeec63a9f6809..a6ca4f2e140404ff821406e5cf41640d38aea783 100644 (file)
--- a/Makefile.am
+++ b/Makefile.am
AUTHORS NEWS README
man_MANS = doc/ncmpc.1
+if ENABLE_DOCUMENTATION
+doc/api/html/index.html: doc/doxygen.conf
+ @mkdir -p $(@D)
+ $(DOXYGEN) $<
+
+all-local: doc/api/html/index.html
+
+clean-local:
+ rm -rf doc/api
+
+# copied from MPD, disabled --jn
+#---------------------------------------
+#install-data-local: doc/api/html/index.html
+# $(mkinstalldirs) $(DESTDIR)$(docdir)/api/html
+# $(INSTALL_DATA) -c -m 644 doc/api/html/*.* \
+# $(DESTDIR)$(docdir)/api/html
+#
+#uninstall-local:
+# rm -f $(DESTDIR)$(docdir)/api/html/*.*
+#---------------------------------------
+endif
+
#
# Distribution
#
EXTRA_DIST = autogen.sh \
$(lyrics_plugins) \
- $(man_MANS) $(doc_DATA)
+ $(man_MANS) $(doc_DATA) doc/doxygen.conf