update doxygen configuration to produce a PDF
[fw/openocd] / Makefile.am
1 # not a GNU package. You can remove this line, if
2 # have all needed files, that a GNU package needs
3 AUTOMAKE_OPTIONS = gnu 1.6
4
5 nobase_dist_pkgdata_DATA = \
6         contrib/libdcc/dcc_stdio.c \
7         contrib/libdcc/dcc_stdio.h \
8         contrib/libdcc/example.c \
9         contrib/libdcc/README \
10         contrib/openocd.udev
11
12 SUBDIRS = src doc
13
14 EXTRA_DIST = \
15         Doxyfile.in \
16         tools/logger.pl
17
18 libtool: $(LIBTOOL_DEPS)
19         $(SHELL) ./config.status --recheck
20
21 docs: pdf html doxygen
22
23 Doxyfile: $(srcdir)/Doxyfile.in
24         @echo "Creating $@ from $<..."
25         @( \
26           echo "### @@@ -= DO NOT EDIT THIS FILE =- @@@ ###" && \
27           echo "### @@@ Make changes to Doxyfile.in @@@ ###" && \
28           sed -e 's,@srcdir\@,$(srcdir),' $< \
29         ) > $@
30
31 THE_MANUAL = doxygen/latex/refman.pdf
32
33 doxygen::
34         $(MAKE) Doxyfile
35         doxygen Doxyfile 2>&1 | perl $(srcdir)/tools/logger.pl > doxygen.log
36         $(MAKE) $(THE_MANUAL)
37
38 %.pdf: %.tex
39         -cd $$(dirname $*) && pdflatex $$(basename $*)
40         -cd $$(dirname $*) && pdflatex $$(basename $*)
41
42 TCL_PATH = tcl
43 # command to find paths of script files, relative to TCL_PATH
44 TCL_FILES = find $(srcdir)/$(TCL_PATH) -name '*.cfg' -o -name '*.tcl' | \
45                 sed -e 's,^$(srcdir)/$(TCL_PATH),,'
46
47 dist-hook:
48         for i in $$($(TCL_FILES)); do \
49                 j="$(distdir)/$(TCL_PATH)/$$i" && \
50                 mkdir -p "$$(dirname $$j)" && \
51                 $(INSTALL_DATA) $(srcdir)/$(TCL_PATH)/$$i $$j; \
52         done
53
54 install-data-hook:
55         for i in $$($(TCL_FILES)); do \
56                 j="$(DESTDIR)$(pkgdatadir)/scripts/$$i" && \
57                 mkdir -p "$$(dirname $$j)" && \
58                 $(INSTALL_DATA) $(srcdir)/$(TCL_PATH)/$$i $$j; \
59         done
60
61 uninstall-hook:
62         rm -rf $(DESTDIR)$(pkgdatadir)/scripts
63
64
65 distclean-local:
66         rm -rf Doxyfile doxygen
67
68 DISTCLEANFILES = doxygen.log
69
70 MAINTAINERCLEANFILES = \
71         $(srcdir)/INSTALL \
72         $(srcdir)/configure \
73         $(srcdir)/Makefile.in \
74         $(srcdir)/depcomp \
75         $(srcdir)/config.guess \
76         $(srcdir)/config.sub \
77         $(srcdir)/config.h.in \
78         $(srcdir)/config.h.in~ \
79         $(srcdir)/compile \
80         $(srcdir)/ltmain.sh \
81         $(srcdir)/missing \
82         $(srcdir)/aclocal.m4 \
83         $(srcdir)/install-sh