streamline and document helptext mode displays
[openocd.git] / Makefile.am
blobfab470466631b80ee1748d74a8b5a794f45e1939
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
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
12 SUBDIRS = src doc
14 EXTRA_DIST = \
15         Doxyfile.in \
16         tools/logger.pl
18 libtool: $(LIBTOOL_DEPS)
19         $(SHELL) ./config.status --recheck
21 docs: pdf html doxygen
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             -e 's,@doxygen_as_html\@,$(doxygen_as_html),' \
30             -e 's,@doxygen_as_pdf\@,$(doxygen_as_pdf),' $< \
31         ) > $@
33 THE_MANUAL = doxygen/latex/refman.pdf
35 doxygen::
36         $(MAKE) Doxyfile
37         doxygen Doxyfile 2>&1 | perl $(srcdir)/tools/logger.pl > doxygen.log
38         @if [ -f doxygen/latex/refman.tex ]; then \
39                 echo "Creating $(THE_MANUAL)..."; \
40                 $(MAKE) $(THE_MANUAL); \
41         else \
42                 echo "Skipping Doxygen PDF..."; \
43         fi
45 $(THE_MANUAL): %.pdf: %.tex
46         -cd $$(dirname $*) && pdflatex $$(basename $*)
47         -cd $$(dirname $*) && pdflatex $$(basename $*)
49 TCL_PATH = tcl
50 # command to find paths of script files, relative to TCL_PATH
51 TCL_FILES = find $(srcdir)/$(TCL_PATH) -name '*.cfg' -o -name '*.tcl' | \
52                 sed -e 's,^$(srcdir)/$(TCL_PATH),,'
54 dist-hook:
55         for i in $$($(TCL_FILES)); do \
56                 j="$(distdir)/$(TCL_PATH)/$$i" && \
57                 mkdir -p "$$(dirname $$j)" && \
58                 $(INSTALL_DATA) $(srcdir)/$(TCL_PATH)/$$i $$j; \
59         done
61 install-data-hook:
62         for i in $$($(TCL_FILES)); do \
63                 j="$(DESTDIR)$(pkgdatadir)/scripts/$$i" && \
64                 mkdir -p "$$(dirname $$j)" && \
65                 $(INSTALL_DATA) $(srcdir)/$(TCL_PATH)/$$i $$j; \
66         done
68 uninstall-hook:
69         rm -rf $(DESTDIR)$(pkgdatadir)/scripts
72 distclean-local:
73         rm -rf Doxyfile doxygen
75 DISTCLEANFILES = doxygen.log
77 MAINTAINERCLEANFILES = \
78         $(srcdir)/INSTALL \
79         $(srcdir)/configure \
80         $(srcdir)/Makefile.in \
81         $(srcdir)/depcomp \
82         $(srcdir)/config.guess \
83         $(srcdir)/config.sub \
84         $(srcdir)/config.h.in \
85         $(srcdir)/config.h.in~ \
86         $(srcdir)/compile \
87         $(srcdir)/ltmain.sh \
88         $(srcdir)/missing \
89         $(srcdir)/aclocal.m4 \
90         $(srcdir)/install-sh