summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/Makefile.am9
-rw-r--r--app/configure.ac9
-rw-r--r--app/doc/Makefile.am34
-rw-r--r--app/doc/main.lou11
4 files changed, 62 insertions, 1 deletions
diff --git a/app/Makefile.am b/app/Makefile.am
index 530973f..7ac7233 100644
--- a/app/Makefile.am
+++ b/app/Makefile.am
@@ -3,7 +3,7 @@ AM_MAKEFLAGS = --no-print-directory
3AM_DISTCHECK_CONFIGURE_FLAGS = \ 3AM_DISTCHECK_CONFIGURE_FLAGS = \
4 --with-tests=regular 4 --with-tests=regular
5 5
6SUBDIRS = src data 6SUBDIRS = src data doc
7 7
8MAINTAINERCLEANFILES = \ 8MAINTAINERCLEANFILES = \
9 Makefile.in \ 9 Makefile.in \
@@ -45,6 +45,13 @@ EXTRA_DIST = \
45pkgconfigdir = $(libdir)/pkgconfig 45pkgconfigdir = $(libdir)/pkgconfig
46pkgconfig_DATA = my_app.pc 46pkgconfig_DATA = my_app.pc
47 47
48.PHONY: doc
49
50# Documentation
51doc:
52 @echo "entering doc/"
53 $(MAKE) $(AM_MAKEFLAGS) -C doc doc
54
48 55
49# Unit tests 56# Unit tests
50 57
diff --git a/app/configure.ac b/app/configure.ac
index 6444762..e16c9ae 100644
--- a/app/configure.ac
+++ b/app/configure.ac
@@ -125,6 +125,11 @@ AC_SUBST(MY_APP_COV_LIBS)
125AC_SUBST(MY_APP_COV_CFLAGS) 125AC_SUBST(MY_APP_COV_CFLAGS)
126AM_CONDITIONAL([MY_APP_ENABLE_COVERAGE], [test "${want_coverage}" = "yes"]) 126AM_CONDITIONAL([MY_APP_ENABLE_COVERAGE], [test "${want_coverage}" = "yes"])
127 127
128# lout
129
130AC_CHECK_PROG([have_lout], [lout], [yes], [no])
131AM_CONDITIONAL(MY_APP_HAVE_DOC, test "x${have_lout}" = "xyes")
132
128### Checks for libraries 133### Checks for libraries
129 134
130# check unit testing library 135# check unit testing library
@@ -230,6 +235,7 @@ AC_OUTPUT([
230 data/desktop/my_app.desktop 235 data/desktop/my_app.desktop
231 data/themes/Makefile 236 data/themes/Makefile
232 data/themes/default/Makefile 237 data/themes/default/Makefile
238 doc/Makefile
233]) 239])
234 240
235AC_OUTPUT 241AC_OUTPUT
@@ -264,4 +270,7 @@ else
264echo "Tests...........: no" 270echo "Tests...........: no"
265fi 271fi
266fi 272fi
273if test "x${have_lout}" = "xyes"; then
274echo "Tests...........: make doc"
275fi
267echo 276echo
diff --git a/app/doc/Makefile.am b/app/doc/Makefile.am
new file mode 100644
index 0000000..8609d3a
--- /dev/null
+++ b/app/doc/Makefile.am
@@ -0,0 +1,34 @@
1MAINTAINERCLEANFILES = Makefile.in
2
3.PHONY: doc
4SUFFIXES: .lou .ps .pdf
5
6
7if MY_APP_HAVE_DOC
8
9.ps.pdf :
10 ps2pdf $<
11
12.lou.ps :
13 lout -r3 -o $@ $<
14
15doc-clean:
16 -rm *.ps *.pdf *.li *.ld
17
18doc: all
19
20main.pdf: main.lou
21
22all: main.pdf
23
24clean-local: doc-clean
25
26else
27
28doc:
29 @echo "Documentation not built. Run ./configure --help"
30
31endif
32
33EXTRA_DIST = \
34main.lou
diff --git a/app/doc/main.lou b/app/doc/main.lou
new file mode 100644
index 0000000..3fe83b5
--- /dev/null
+++ b/app/doc/main.lou
@@ -0,0 +1,11 @@
1# encoding : iso-8859-1
2
3@SysInclude{ doc }
4
5@Document
6//
7@Text @Begin
8
9@CentredDisplay { Hello World }
10
11@End @Text