vlp-7 Added automatic doxygen documentation generation.
authorRafał Długołęcki <kontakt@dlugolecki.net.pl>
Mon, 15 Jul 2013 06:41:37 +0000 (08:41 +0200)
committerRafał Długołęcki <kontakt@dlugolecki.net.pl>
Wed, 24 Jul 2013 11:16:57 +0000 (13:16 +0200)
Makefile.am
configure.ac

index cd2e1eed57414eb4c109b5d53c2901d92bfa5634..cc1d19c6ecfb793ad00d403d7ac28f28b0006de4 100644 (file)
@@ -133,17 +133,12 @@ clean-loghelp-extra:
        rm -f bin/modules/loghelp
        rm -f bin/loghelp
 
-all-local:
+all-local: doxyfile.stamp
        test -d bin/modules || mkdir bin/modules
        ln -fs ../logedit bin/modules/
        ln -fs ../loggraph bin/modules/
        ln -fs ../loghelp bin/modules/
        ln -fs ../lognet bin/modules/
-       
-CLEANFILES = \
-       %.o \
-       %.bak \
-  %~
 
 clean-am: \
   clean-loggraph-extra \
@@ -155,4 +150,29 @@ clean-am: \
   clean-loghelp-extra
        rm -rf bin/modules
 
+CLEANFILES = \
+       %.o \
+       %.bak \
+       %~ \
+       doxyfile.stamp
+
+if HAVE_DOXYGEN
+
+directory = $(top_srcdir)/doc/man/man3/
+
+dist_man_MANS = $(directory)/man_page_1.3 $(directory)/man_page_2.3
+$(directory)/man_page_1.3: doxyfile.stamp
+$(directory)/man_page_2.3: doxyfile.stamp
+
+doxyfile.stamp:
+       $(DOXYGEN) Doxyfile
+       echo Timestamp > doxyfile.stamp
+
+#all-local: doxyfile.stamp
+
+clean-local:
+       rm -rf $(top_srcdir)/doc/man
+
+endif
+
 dist_noinst_SCRIPTS = autogen.sh
index e7397f6ff7f8daec5563b97ea0385d3bbacf56a8..65e94cf83f1fafff6910a6b625a41720e0e67895 100644 (file)
@@ -35,5 +35,12 @@ AC_ARG_WITH([moc-compiler-dir],
   [MOCDIR='/usr/bin'])
 AC_SUBST([MOCDIR])
 
+AC_CHECK_PROGS([DOXYGEN], [doxygen])
+if test -z "$DOXYGEN";
+   then AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
+fi
+
+AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
+AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([Doxyfile])])
 
 AC_OUTPUT