fix warnings merge
[openocd/dsp568013.git] / Makefile.am
blob54528606669ddf2c1aded1d1a885ba3c38c09b79
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 =
13 if INTERNAL_JIMTCL
14 SUBDIRS += jimtcl
15 endif
16 if INTERNAL_LIBSWD
17 SUBDIRS += submodules/libswd
18 endif
20 SUBDIRS += src doc
22 EXTRA_DIST = \
23         Doxyfile.in \
24         tools/logger.pl
26 libtool: $(LIBTOOL_DEPS)
27         $(SHELL) ./config.status --recheck
29 docs: pdf html doxygen
31 Doxyfile: $(srcdir)/Doxyfile.in
32         @echo "Creating $@ from $<..."
33         @( \
34           echo "### @@@ -= DO NOT EDIT THIS FILE =- @@@ ###" && \
35           echo "### @@@ Make changes to Doxyfile.in @@@ ###" && \
36           sed -e 's,@srcdir\@,$(srcdir),' \
37             -e 's,@builddir\@,$(builddir),' \
38             -e 's,@doxygen_as_html\@,$(doxygen_as_html),' \
39             -e 's,@doxygen_as_pdf\@,$(doxygen_as_pdf),' $< \
40         ) > $@
42 THE_MANUAL = doxygen/latex/refman.pdf
44 doxygen::
45         $(MAKE) Doxyfile
46         doxygen Doxyfile 2>&1 | perl $(srcdir)/tools/logger.pl > doxygen.log
47         @if [ -f doxygen/latex/refman.tex ]; then \
48                 echo "Creating $(THE_MANUAL)..."; \
49                 $(MAKE) $(THE_MANUAL); \
50         else \
51                 echo "Skipping Doxygen PDF..."; \
52         fi
54 $(THE_MANUAL): %.pdf: %.tex
55         -cd $$(dirname $*) && pdflatex $$(basename $*)
56         -cd $$(dirname $*) && pdflatex $$(basename $*)
58 TCL_PATH = tcl
59 # command to find paths of script files, relative to TCL_PATH
60 TCL_FILES = find $(srcdir)/$(TCL_PATH) -name '*.cfg' -o -name '*.tcl' | \
61                 sed -e 's,^$(srcdir)/$(TCL_PATH),,'
63 dist-hook:
64         for i in $$($(TCL_FILES)); do \
65                 j="$(distdir)/$(TCL_PATH)/$$i" && \
66                 mkdir -p "$$(dirname $$j)" && \
67                 $(INSTALL_DATA) $(srcdir)/$(TCL_PATH)/$$i $$j; \
68         done
70 install-data-hook:
71         for i in $$($(TCL_FILES)); do \
72                 j="$(DESTDIR)$(pkgdatadir)/scripts/$$i" && \
73                 mkdir -p "$$(dirname $$j)" && \
74                 $(INSTALL_DATA) $(srcdir)/$(TCL_PATH)/$$i $$j; \
75         done
77 uninstall-hook:
78         rm -rf $(DESTDIR)$(pkgdatadir)/scripts
81 distclean-local:
82         rm -rf Doxyfile doxygen
84 DISTCLEANFILES = doxygen.log
86 MAINTAINERCLEANFILES = \
87         $(srcdir)/INSTALL \
88         $(srcdir)/configure \
89         $(srcdir)/Makefile.in \
90         $(srcdir)/depcomp \
91         $(srcdir)/config.guess \
92         $(srcdir)/config.sub \
93         $(srcdir)/config.h.in \
94         $(srcdir)/config.h.in~ \
95         $(srcdir)/compile \
96         $(srcdir)/ltmain.sh \
97         $(srcdir)/missing \
98         $(srcdir)/aclocal.m4 \
99         $(srcdir)/install-sh