Browse Source

Adds doxygen documentation generation to autotools

Yann Weber 1 year ago
parent
commit
85fdc54fd1
5 changed files with 2704 additions and 2 deletions
  1. 1
    1
      Makefile.am
  2. 12
    0
      configure.ac
  3. 2662
    0
      docs/Doxyfile.in
  4. 28
    0
      docs/Makefile.am
  5. 1
    1
      regen.sh

+ 1
- 1
Makefile.am View File

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

+ 12
- 0
configure.ac View File

@@ -56,6 +56,18 @@ then
56 56
 	fi
57 57
 fi
58 58
 AC_CHECK_PROGS([CPPCHECK], [cppcheck])
59
+AC_CHECK_PROGS([DOXYGEN], [doxygen])
60
+if test -z "$DOXYGEN";
61
+then
62
+	AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])
63
+fi
64
+AC_CHECK_PROGS([DOT], [dot])
65
+if test -z "$DOT"; then
66
+	AC_MSG_ERROR([Doxygen needs dot, please install dot first])
67
+fi
68
+AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
69
+AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([docs/Doxyfile])])
70
+AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([docs/Makefile])])
59 71
 
60 72
 AM_CONDITIONAL([HAVE_GCOV], [test -n "$GCOV"])
61 73
 AM_CONDITIONAL([HAVE_LCOV], [test -n "$LCOV"])

+ 2662
- 0
docs/Doxyfile.in
File diff suppressed because it is too large
View File


+ 28
- 0
docs/Makefile.am View File

@@ -0,0 +1,28 @@
1
+if HAVE_DOXYGEN
2
+
3
+doxyman = $(top_srcdir)/docs/man/man3
4
+man = $(top_srcdir)/docs/man/asmsh.1
5
+stamp = doxyfile.stamp
6
+
7
+man_MANS=$(man)
8
+
9
+
10
+$(doxyman): $(stamp)
11
+
12
+$(man): $(doxyman)
13
+	cp $(doxyman)/asmsh.3 $@
14
+	sed -i 's/^.TH "asmsh" 3/.TH "asmsh" 1/' $@
15
+
16
+$(stamp): Doxyfile $(top_srcdir)/asmsh.h
17
+	$(DOXYGEN) $^
18
+	echo done > $@
19
+
20
+all-local: $(stamp) $(man)
21
+
22
+clean-local:
23
+	-rm -rf $(top_srcdir)/docs/man $(top_srcdir)/docs/html $(man)
24
+
25
+CLEANFILES = $(stamp)
26
+
27
+endif
28
+

+ 1
- 1
regen.sh View File

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

Loading…
Cancel
Save