Updated submodules/libswd to use new git.code.sf.net host and v0.5 release branch.
[openocd/libswd.git] / Makefile.am
blobb3cd1135a14b6d86ec4702b9939a74eb693ff8b7
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 # make sure we pass the correct jimtcl flags to distcheck
6 DISTCHECK_CONFIGURE_FLAGS = --disable-install-jim
8 nobase_dist_pkgdata_DATA = \
9         contrib/libdcc/dcc_stdio.c \
10         contrib/libdcc/dcc_stdio.h \
11         contrib/libdcc/example.c \
12         contrib/libdcc/README \
13         contrib/openocd.udev
15 SUBDIRS =
16 if INTERNAL_JIMTCL
17 SUBDIRS += jimtcl
18 endif
20 if INTERNAL_LIBSWD
21 SUBDIRS += submodules/libswd
22 endif
24 SUBDIRS += src doc
26 EXTRA_DIST = \
27         BUGS \
28         HACKING \
29         NEWTAPS \
30         README.Win32 \
31         Doxyfile.in \
32         tools/logger.pl \
33         contrib/loaders
35 libtool: $(LIBTOOL_DEPS)
36         $(SHELL) ./config.status --recheck
38 docs: pdf html doxygen
40 Doxyfile: $(srcdir)/Doxyfile.in
41         @echo "Creating $@ from $<..."
42         @( \
43           echo "### @@@ -= DO NOT EDIT THIS FILE =- @@@ ###" && \
44           echo "### @@@ Make changes to Doxyfile.in @@@ ###" && \
45           sed -e 's,@srcdir\@,$(srcdir),' \
46             -e 's,@builddir\@,$(builddir),' \
47             -e 's,@doxygen_as_html\@,$(doxygen_as_html),' \
48             -e 's,@doxygen_as_pdf\@,$(doxygen_as_pdf),' $< \
49         ) > $@
51 THE_MANUAL = doxygen/latex/refman.pdf
53 doxygen::
54         $(MAKE) Doxyfile
55         doxygen Doxyfile 2>&1 | perl $(srcdir)/tools/logger.pl > doxygen.log
56         @if [ -f doxygen/latex/refman.tex ]; then \
57                 echo "Creating $(THE_MANUAL)..."; \
58                 $(MAKE) $(THE_MANUAL); \
59         else \
60                 echo "Skipping Doxygen PDF..."; \
61         fi
63 $(THE_MANUAL): %.pdf: %.tex
64         -cd $$(dirname $*) && pdflatex $$(basename $*)
65         -cd $$(dirname $*) && pdflatex $$(basename $*)
67 TCL_PATH = tcl
68 # command to find paths of script files, relative to TCL_PATH
69 TCL_FILES = find $(srcdir)/$(TCL_PATH) -name '*.cfg' -o -name '*.tcl' -o -name '*.txt' | \
70                 sed -e 's,^$(srcdir)/$(TCL_PATH),,'
72 dist-hook:
73         if test -d $(srcdir)/.git -a \( ! -e $(distdir)/ChangeLog -o -w $(distdir)/ChangeLog \) ; then \
74                 git --git-dir $(srcdir)/.git log | $(srcdir)/tools/git2cl/git2cl > $(distdir)/ChangeLog ; \
75         fi
76         for i in $$($(TCL_FILES)); do \
77                 j="$(distdir)/$(TCL_PATH)/$$i" && \
78                 mkdir -p "$$(dirname $$j)" && \
79                 $(INSTALL_DATA) $(srcdir)/$(TCL_PATH)/$$i $$j; \
80         done
82 install-data-hook:
83         for i in $$($(TCL_FILES)); do \
84                 j="$(DESTDIR)$(pkgdatadir)/scripts/$$i" && \
85                 mkdir -p "$$(dirname $$j)" && \
86                 $(INSTALL_DATA) $(srcdir)/$(TCL_PATH)/$$i $$j; \
87         done
89 uninstall-hook:
90         rm -rf $(DESTDIR)$(pkgdatadir)/scripts
92 distclean-local:
93         rm -rf Doxyfile doxygen
94         rm -f $(srcdir)/jimtcl/configure.gnu
95         
96 DISTCLEANFILES = doxygen.log
98 MAINTAINERCLEANFILES = \
99         $(srcdir)/INSTALL \
100         $(srcdir)/configure \
101         $(srcdir)/Makefile.in \
102         $(srcdir)/depcomp \
103         $(srcdir)/config.guess \
104         $(srcdir)/config.sub \
105         $(srcdir)/config.h.in \
106         $(srcdir)/config.h.in~ \
107         $(srcdir)/compile \
108         $(srcdir)/ltmain.sh \
109         $(srcdir)/missing \
110         $(srcdir)/aclocal.m4 \
111         $(srcdir)/install-sh