1 # SPDX-License-Identifier: GPL-2.0-or-later
3 # not a GNU package. You can remove this line, if
4 # have all needed files, that a GNU package needs
5 AUTOMAKE_OPTIONS = gnu 1.6
9 # make sure we pass the correct jimtcl flags to distcheck
10 DISTCHECK_CONFIGURE_FLAGS = --disable-install-jim
12 # do not run Jim Tcl tests (esp. during distcheck)
13 check-recursive: SUBDIRS :=
15 nobase_dist_pkgdata_DATA = \
16 contrib/libdcc/dcc_stdio.c \
17 contrib/libdcc/dcc_stdio.h \
18 contrib/libdcc/example.c \
19 contrib/libdcc/README \
20 contrib/60-openocd.rules
33 DIST_SUBDIRS += jimtcl
34 EXTRA_DIST += jimtcl/configure.gnu
35 # jimtcl from 0.79 to 0.82 miss cleaning jsmn.o
36 DISTCLEANFILES += jimtcl/jsmn/jsmn.o
39 # common flags used in openocd build
40 AM_CFLAGS = $(GCC_WARNINGS)
42 AM_CPPFLAGS = $(HOST_CPPFLAGS)\
44 -I$(top_builddir)/src \
45 -DPKGDATADIR=\"$(pkgdatadir)\" \
46 -DBINDIR=\"$(bindir)\"
49 AM_CPPFLAGS += -I$(top_srcdir)/jimtcl \
50 -I$(top_builddir)/jimtcl
60 LICENSES/license-rules.txt \
61 LICENSES/exceptions/eCos-exception-2.0 \
62 LICENSES/preferred/BSD-1-Clause \
63 LICENSES/preferred/BSD-2-Clause \
64 LICENSES/preferred/BSD-2-Clause-Views \
65 LICENSES/preferred/BSD-3-Clause \
66 LICENSES/preferred/BSD-Source-Code \
67 LICENSES/preferred/GFDL-1.2 \
68 LICENSES/preferred/gfdl-1.2.texi.readme \
69 LICENSES/preferred/GPL-2.0 \
70 LICENSES/preferred/MIT \
71 LICENSES/stand-alone/GPL-3.0 \
73 tools/rlink_make_speed_table \
77 libtool: $(LIBTOOL_DEPS)
78 $(SHELL) ./config.status --recheck
80 docs: pdf html doxygen
82 Doxyfile: $(srcdir)/Doxyfile.in
83 @echo "Creating $@ from $<..."
85 echo "### @@@ -= DO NOT EDIT THIS FILE =- @@@ ###" && \
86 echo "### @@@ Make changes to Doxyfile.in @@@ ###" && \
87 sed -e 's,@srcdir\@,$(srcdir),' \
88 -e 's,@builddir\@,$(builddir),' \
89 -e 's,@doxygen_as_html\@,$(doxygen_as_html),' \
90 -e 's,@doxygen_as_pdf\@,$(doxygen_as_pdf),' $< \
93 THE_MANUAL = doxygen/latex/refman.pdf
97 doxygen Doxyfile 2>&1 | perl $(srcdir)/tools/logger.pl > doxygen.log
98 @if [ -f doxygen/latex/refman.tex ]; then \
99 echo "Creating $(THE_MANUAL)..."; \
100 $(MAKE) $(THE_MANUAL); \
102 echo "Skipping Doxygen PDF..."; \
105 $(THE_MANUAL): %.pdf: %.tex
106 -cd $$(dirname $*) && pdflatex $$(basename $*)
107 -cd $$(dirname $*) && pdflatex $$(basename $*)
110 # command to find paths of script files, relative to TCL_PATH
111 TCL_FILES = find $(srcdir)/$(TCL_PATH) -name '*.cfg' -o -name '*.tcl' -o -name '*.txt' | \
112 sed -e 's,^$(srcdir)/$(TCL_PATH),,'
115 if test -d $(srcdir)/.git -a \( ! -e $(distdir)/ChangeLog -o -w $(distdir)/ChangeLog \) ; then \
116 git --git-dir $(srcdir)/.git log | $(srcdir)/tools/git2cl/git2cl > $(distdir)/ChangeLog ; \
118 for i in $$($(TCL_FILES)); do \
119 j="$(distdir)/$(TCL_PATH)/$$i" && \
120 mkdir -p "$$(dirname $$j)" && \
121 $(INSTALL_DATA) $(srcdir)/$(TCL_PATH)/$$i $$j; \
125 for i in $$($(TCL_FILES)); do \
126 j="$(DESTDIR)$(pkgdatadir)/scripts/$$i" && \
127 mkdir -p "$$(dirname $$j)" && \
128 $(INSTALL_DATA) $(srcdir)/$(TCL_PATH)/$$i $$j; \
132 rm -rf $(DESTDIR)$(pkgdatadir)/scripts
135 rm -rf Doxyfile doxygen
136 -rm -f $(srcdir)/jimtcl/configure.gnu
138 DISTCLEANFILES += doxygen.log
145 MAINTAINERCLEANFILES = \
161 include src/Makefile.am
162 include doc/Makefile.am