@@ -7,7 +7,7 @@ AUTOMAKE_OPTIONS = gnu 1.6
7
7
.DELETE_ON_ERROR :
8
8
9
9
# make sure we pass the correct jimtcl flags to distcheck
10
- DISTCHECK_CONFIGURE_FLAGS = --disable-install-jim
10
+ AM_DISTCHECK_CONFIGURE_FLAGS = --disable-install-jim
11
11
12
12
# do not run Jim Tcl tests (esp. during distcheck)
13
13
check-recursive : SUBDIRS :=
38
38
39
39
# common flags used in openocd build
40
40
AM_CFLAGS = $(GCC_WARNINGS )
41
+ AM_LDFLAGS =
41
42
42
43
AM_CPPFLAGS = $(HOST_CPPFLAGS ) \
43
44
-I$(top_srcdir ) /src \
@@ -51,6 +52,12 @@ AM_CPPFLAGS += -I$(top_srcdir)/jimtcl \
51
52
else
52
53
AM_CPPFLAGS += $(JIMTCL_CFLAGS )
53
54
endif
55
+
56
+ if USE_GCOV
57
+ AM_CFLAGS += --coverage
58
+ AM_LDFLAGS += --coverage
59
+ endif
60
+
54
61
EXTRA_DIST += \
55
62
BUGS \
56
63
HACKING \
@@ -116,14 +123,13 @@ TCL_PATH = tcl
116
123
TCL_FILES = find $(srcdir ) /$(TCL_PATH ) -name '*.cfg' -o -name '*.tcl' -o -name '*.txt' | \
117
124
sed -e 's,^$(srcdir ) /$(TCL_PATH ) ,,'
118
125
119
- # Without the PERL_UNICODE="IO" workaround below when running git2cl, you get several
120
- # "Wide character" warnings and you also risk an invalid character encoding in
121
- # the generated ChangeLog file. For more information, see this bug report:
122
- # Warning "Wide character in print"
123
- # https://savannah.nongnu.org/bugs/?65689
126
+ # The git log command below generates many empty text lines with only some space characters
127
+ # for indentation purposes, so use sed to trim all trailing whitespace.
124
128
dist-hook :
125
129
if test -d $( srcdir) /.git -a \( ! -e $( distdir) /ChangeLog -o -w $( distdir) /ChangeLog \) ; then \
126
- git --git-dir $(srcdir ) /.git log | PERL_UNICODE=" IO" $(srcdir ) /tools/git2cl/git2cl > $(distdir ) /ChangeLog ; \
130
+ git --git-dir $(srcdir ) /.git log --date=short --pretty=" format:%ad %aN <%aE>%n%n%w(0,4,6)* %B" \
131
+ | sed ' s/[[:space:]]*$$//' > $(distdir ) /ChangeLog.tmp && \
132
+ mv $(distdir ) /ChangeLog.tmp $(distdir ) /ChangeLog; \
127
133
fi
128
134
for i in $$ ($( TCL_FILES) ); do \
129
135
j=" $( distdir) /$( TCL_PATH) /$$ i" && \
0 commit comments