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
32 DIST_SUBDIRS += jimtcl
35 # common flags used in openocd build
36 AM_CFLAGS = $(GCC_WARNINGS)
38 AM_CPPFLAGS = $(HOST_CPPFLAGS)\
40 -I$(top_builddir)/src \
41 -DPKGDATADIR=\"$(pkgdatadir)\" \
42 -DBINDIR=\"$(bindir)\"
45 AM_CPPFLAGS += -I$(top_srcdir)/jimtcl \
46 -I$(top_builddir)/jimtcl
56 LICENSES/license-rules.txt \
57 LICENSES/preferred/BSD-1-Clause \
58 LICENSES/preferred/BSD-2-Clause \
59 LICENSES/preferred/BSD-3-Clause \
60 LICENSES/preferred/GFDL-1.2 \
61 LICENSES/preferred/gfdl-1.2.texi.readme \
62 LICENSES/preferred/GPL-2.0 \
63 LICENSES/preferred/MIT \
64 LICENSES/stand-alone/GPL-3.0 \
66 tools/rlink_make_speed_table \
70 libtool: $(LIBTOOL_DEPS)
71 $(SHELL) ./config.status --recheck
73 docs: pdf html doxygen
75 Doxyfile: $(srcdir)/Doxyfile.in
76 @echo "Creating $@ from $<..."
78 echo "### @@@ -= DO NOT EDIT THIS FILE =- @@@ ###" && \
79 echo "### @@@ Make changes to Doxyfile.in @@@ ###" && \
80 sed -e 's,@srcdir\@,$(srcdir),' \
81 -e 's,@builddir\@,$(builddir),' \
82 -e 's,@doxygen_as_html\@,$(doxygen_as_html),' \
83 -e 's,@doxygen_as_pdf\@,$(doxygen_as_pdf),' $< \
86 THE_MANUAL = doxygen/latex/refman.pdf
90 doxygen Doxyfile 2>&1 | perl $(srcdir)/tools/logger.pl > doxygen.log
91 @if [ -f doxygen/latex/refman.tex ]; then \
92 echo "Creating $(THE_MANUAL)..."; \
93 $(MAKE) $(THE_MANUAL); \
95 echo "Skipping Doxygen PDF..."; \
98 $(THE_MANUAL): %.pdf: %.tex
99 -cd $$(dirname $*) && pdflatex $$(basename $*)
100 -cd $$(dirname $*) && pdflatex $$(basename $*)
103 # command to find paths of script files, relative to TCL_PATH
104 TCL_FILES = find $(srcdir)/$(TCL_PATH) -name '*.cfg' -o -name '*.tcl' -o -name '*.txt' | \
105 sed -e 's,^$(srcdir)/$(TCL_PATH),,'
108 if test -d $(srcdir)/.git -a \( ! -e $(distdir)/ChangeLog -o -w $(distdir)/ChangeLog \) ; then \
109 git --git-dir $(srcdir)/.git log | $(srcdir)/tools/git2cl/git2cl > $(distdir)/ChangeLog ; \
111 for i in $$($(TCL_FILES)); do \
112 j="$(distdir)/$(TCL_PATH)/$$i" && \
113 mkdir -p "$$(dirname $$j)" && \
114 $(INSTALL_DATA) $(srcdir)/$(TCL_PATH)/$$i $$j; \
118 for i in $$($(TCL_FILES)); do \
119 j="$(DESTDIR)$(pkgdatadir)/scripts/$$i" && \
120 mkdir -p "$$(dirname $$j)" && \
121 $(INSTALL_DATA) $(srcdir)/$(TCL_PATH)/$$i $$j; \
125 rm -rf $(DESTDIR)$(pkgdatadir)/scripts
128 rm -rf Doxyfile doxygen
129 rm -f $(srcdir)/jimtcl/configure.gnu
131 DISTCLEANFILES = doxygen.log
138 MAINTAINERCLEANFILES = \
154 include src/Makefile.am
155 include doc/Makefile.am