Adds doxygen documentation generation to autotools

This commit is contained in:
Yann Weber 2023-03-29 18:11:24 +02:00
commit 85fdc54fd1
5 changed files with 2704 additions and 2 deletions

View file

@ -22,7 +22,7 @@ child_bin.o: child$(EXEEXT)
ALL_CHECKS=
LINT=
SUBDIRS = .
SUBDIRS = . docs
if CHECK
noinst_LIBRARIES = libcheck_asmsh.a
libcheck_asmsh_a_LDDADD=child_bin.o

View file

@ -56,6 +56,18 @@ then
fi
fi
AC_CHECK_PROGS([CPPCHECK], [cppcheck])
AC_CHECK_PROGS([DOXYGEN], [doxygen])
if test -z "$DOXYGEN";
then
AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
fi
AC_CHECK_PROGS([DOT], [dot])
if test -z "$DOT"; then
AC_MSG_ERROR([Doxygen needs dot, please install dot first])
fi
AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([docs/Doxyfile])])
AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([docs/Makefile])])
AM_CONDITIONAL([HAVE_GCOV], [test -n "$GCOV"])
AM_CONDITIONAL([HAVE_LCOV], [test -n "$LCOV"])

2662
docs/Doxyfile.in Normal file

File diff suppressed because it is too large Load diff

28
docs/Makefile.am Normal file
View file

@ -0,0 +1,28 @@
if HAVE_DOXYGEN
doxyman = $(top_srcdir)/docs/man/man3
man = $(top_srcdir)/docs/man/asmsh.1
stamp = doxyfile.stamp
man_MANS=$(man)
$(doxyman): $(stamp)
$(man): $(doxyman)
cp $(doxyman)/asmsh.3 $@
sed -i 's/^.TH "asmsh" 3/.TH "asmsh" 1/' $@
$(stamp): Doxyfile $(top_srcdir)/asmsh.h
$(DOXYGEN) $^
echo done > $@
all-local: $(stamp) $(man)
clean-local:
-rm -rf $(top_srcdir)/docs/man $(top_srcdir)/docs/html $(man)
CLEANFILES = $(stamp)
endif

View file

@ -8,7 +8,7 @@ in
rm -v ar-lib aclocal.m4 "config.h.in~" compile depcomp \
INSTALL install-sh missing test-driver configure \
Makefile.in tests/Makefile.in tests/samples/Makefile.in \
tests/Makefile.am \
tests/Makefile.am docs/Makefile.in \
2>/dev/null
rm -vR autom4te.cache/ .deps 2>/dev/null
exit 0