Jim Tcl
Check-in [87eb66b790]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:build: Support --silent-rules

And enable silent rules by default if using GNU make.

Signed-off-by: Steve Bennett <steveb@workware.net.au>

Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:87eb66b790b864f73737197ef733859176635603
User & Date: steveb@workware.net.au 2017-11-26 07:43:41
Context
2017-11-26
11:19
tests: Make the failing SIGPIPE tests go away on AppVeyor

Work around the problem by skipping the test

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: a1fd64bbcc user: steveb@workware.net.au tags: trunk

07:43
build: Support --silent-rules

And enable silent rules by default if using GNU make.

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: 87eb66b790 user: steveb@workware.net.au tags: trunk

07:43
Update autosetup to v0.6.7-17-gb5a0e85

Mostly for --{enable,disable}-silent-rules

Use new opt-str where appropriate

Signed-off-by: Steve Bennett <steveb@workware.net.au> check-in: cf03b3c80d user: steveb@workware.net.au tags: trunk

Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Makefile.in.
















1
2
3
4
5
6
7
..
63
64
65
66
67
68
69

70

71
72




73

74
75
76
77
78
79
80
81
...
110
111
112
113
114
115
116

117
118
119
120

121
122
123
124


125
126
127
128

129
130
131
132
133

134

135
136
137

138

139
140
141

142

143
144
145

146

147
148
149

150

151
152
153

154

155
156
157

158

159
160
161

162

163
164
165

166

167
168
169

170

171
172
173

174

175
176
177

178

179
180
181

182

183
184
185

186

187
188
189

190

191
192
193

194

195
196
197
198
199
200
201
202















# Tools
CC = @CCACHE@ @CC@
CXX = @CCACHE@ @CXX@
RANLIB = @RANLIB@
AR = @AR@
STRIP = @STRIP@

................................................................................
@endif

all: $(JIMSH) @C_EXT_SHOBJS@

# Create C extensions from pure Tcl extensions
.SUFFIXES: .tcl
.tcl.o:

	@tclsh@ @srcdir@/make-c-ext.tcl $< >_$*.c

	$(CC) $(CFLAGS) -c -o $@ _$*.c





$(JIMSH): $(LIBJIM) jimsh.o initjimsh.o

	$(JIMSH_CC) @SH_LINKFLAGS@ $(LDFLAGS) -o $@ jimsh.o initjimsh.o $(LIBJIM) $(LDLIBS) $(LIBS)

@if JIM_INSTALL
install: all @TCL_EXTS@ install-exec install-docs
	$(INSTALL_DATA_DIR) $(DESTDIR)@libdir@/jim
	$(INSTALL_DATA) $(LIBJIM) $(DESTDIR)@libdir@
	$(INSTALL_DATA) @srcdir@/README.extensions @C_EXT_SHOBJS@ $(DESTDIR)@libdir@/jim
	for i in tcltest.tcl @TCL_EXTS@; do $(INSTALL_DATA) @srcdir@/$$i $(DESTDIR)@libdir@/jim; done
................................................................................
$(OBJS) jimsh.o initjimsh.o: Makefile $(wildcard *.h)

@if JIM_UTF8
# Generate the unicode case mapping
utf8.o: _unicode_mapping.c

_unicode_mapping.c: @srcdir@/UnicodeData.txt @srcdir@/parse-unidata.tcl

	@tclsh@ @srcdir@/parse-unidata.tcl @PARSE_UNIDATA_FLAGS@ @srcdir@/UnicodeData.txt @srcdir@/EastAsianWidth.txt >$@ || ( rm $@; exit 1)
@endif

_load-static-exts.c: @srcdir@/make-load-static-exts.tcl Makefile

	@tclsh@ @srcdir@/make-load-static-exts.tcl @STATIC_EXTS@ >$@ || ( rm $@; exit 1)

@if JIM_STATICLIB
$(LIBJIM): $(OBJS)


	$(AR) cr $@ $(OBJS)
	$(RANLIB) $@
@else
$(LIBJIM): $(OBJS)

	$(CC) $(CFLAGS) $(LDFLAGS) $(SH_LDFLAGS) -o $@ $(OBJS) $(LDLIBS) $(LIBS)
@endif

# Note that $> $^ is for compatibility with both GNU make and BSD make
readdir.so: jim-readdir.c

	$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-readdir.o $> $^

	$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-readdir.o $(SH_LIBJIM)

array.so: jim-array.c

	$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-array.o $> $^

	$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-array.o $(SH_LIBJIM)

clock.so: jim-clock.c

	$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-clock.o $> $^

	$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-clock.o $(SH_LIBJIM)

file.so: jim-file.c

	$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-file.o $> $^

	$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-file.o $(SH_LIBJIM)

interp.so: jim-interp.c

	$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-interp.o jim-interp.c

	$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-interp.o $(SH_LIBJIM) @LDLIBS_interp@

posix.so: jim-posix.c

	$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-posix.o $> $^

	$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-posix.o $(SH_LIBJIM)

regexp.so: jim-regexp.c

	$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-regexp.o $> $^

	$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-regexp.o $(SH_LIBJIM)

syslog.so: jim-syslog.c

	$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-syslog.o $> $^

	$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-syslog.o $(SH_LIBJIM)

readline.so: jim-readline.c

	$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-readline.o $> $^

	$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-readline.o $(SH_LIBJIM) @LDLIBS_readline@

pack.so: jim-pack.c

	$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-pack.o $> $^

	$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-pack.o $(SH_LIBJIM) @LDLIBS_pack@

tclprefix.so: jim-tclprefix.c

	$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-tclprefix.o $> $^

	$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-tclprefix.o $(SH_LIBJIM) @LDLIBS_tclprefix@

sqlite3.so: jim-sqlite3.c

	$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-sqlite3.o $> $^

	$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-sqlite3.o $(SH_LIBJIM) @LDLIBS_sqlite3@

win32.so: jim-win32.c

	$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-win32.o $> $^

	$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-win32.o $(SH_LIBJIM) @LDLIBS_win32@

mk.so: jim-mk.cpp

	$(CXX) $(CXXFLAGS) $(SHOBJ_CFLAGS) -c -o jim-mk.o $> $^

	$(CXX) $(CXXFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-mk.o $(SH_LIBJIM) @LDLIBS_mk@

sdl.so: jim-sdl.c

	$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-sdl.o $> $^

	$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-sdl.o $(SH_LIBJIM) @LDLIBS_sdl@

zlib.so: jim-zlib.c

	$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-zlib.o $> $^

	$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-zlib.o $(SH_LIBJIM) @LDLIBS_zlib@

docs: Tcl.html

@if INSTALL_DOCS == nodocs
install-docs:
@endif

>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







>
|
>
|

>
>
>
>

>
|







 







>
|



>
|

<

>
>
|
|

<
>
|




>
|
>
|


>
|
>
|


>
|
>
|


>
|
>
|


>
|
>
|


>
|
>
|


>
|
>
|


>
|
>
|


>
|
>
|


>
|
>
|


>
|
>
|


>
|
>
|


>
|
>
|


>
|
>
|


>
|
>
|


>
|
>
|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
..
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
...
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146

147
148
149
150
151
152

153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
@if NO_SILENT_RULES
Q :=
ECHO := @:
@else
# make V=1 for verbose make output
Q := @
ECHO := @echo
ifeq ($(V),1)
ifeq ("$(origin V)", "command line")
Q :=
ECHO := @:
endif
endif
@endif

# Tools
CC = @CCACHE@ @CC@
CXX = @CCACHE@ @CXX@
RANLIB = @RANLIB@
AR = @AR@
STRIP = @STRIP@

................................................................................
@endif

all: $(JIMSH) @C_EXT_SHOBJS@

# Create C extensions from pure Tcl extensions
.SUFFIXES: .tcl
.tcl.o:
	$(ECHO) " 	TCLEXT	_$*.c"
	$(Q)@tclsh@ @srcdir@/make-c-ext.tcl $< >_$*.c
	$(ECHO) " 	CC	$@"
	$(Q)$(CC) $(CFLAGS) -c -o $@ _$*.c

.c.o:
	$(ECHO) "	CC	$@"
	$(Q)$(CC) $(CFLAGS) $(CPPFLAGS) $(TARGET_ARCH) -c $*.c -o $@

$(JIMSH): $(LIBJIM) jimsh.o initjimsh.o
	$(ECHO) "	LINK	$@"
	$(Q)$(JIMSH_CC) @SH_LINKFLAGS@ $(LDFLAGS) -o $@ jimsh.o initjimsh.o $(LIBJIM) $(LDLIBS) $(LIBS)

@if JIM_INSTALL
install: all @TCL_EXTS@ install-exec install-docs
	$(INSTALL_DATA_DIR) $(DESTDIR)@libdir@/jim
	$(INSTALL_DATA) $(LIBJIM) $(DESTDIR)@libdir@
	$(INSTALL_DATA) @srcdir@/README.extensions @C_EXT_SHOBJS@ $(DESTDIR)@libdir@/jim
	for i in tcltest.tcl @TCL_EXTS@; do $(INSTALL_DATA) @srcdir@/$$i $(DESTDIR)@libdir@/jim; done
................................................................................
$(OBJS) jimsh.o initjimsh.o: Makefile $(wildcard *.h)

@if JIM_UTF8
# Generate the unicode case mapping
utf8.o: _unicode_mapping.c

_unicode_mapping.c: @srcdir@/UnicodeData.txt @srcdir@/parse-unidata.tcl
	$(ECHO) "	UNIDATA	$@"
	$(Q)@tclsh@ @srcdir@/parse-unidata.tcl @PARSE_UNIDATA_FLAGS@ @srcdir@/UnicodeData.txt @srcdir@/EastAsianWidth.txt >$@ || ( rm $@; exit 1)
@endif

_load-static-exts.c: @srcdir@/make-load-static-exts.tcl Makefile
	$(ECHO) "	MKLDEXT	$@"
	$(Q)@tclsh@ @srcdir@/make-load-static-exts.tcl @STATIC_EXTS@ >$@ || ( rm $@; exit 1)


$(LIBJIM): $(OBJS)
@if JIM_STATICLIB
	$(ECHO) "	AR	$@"
	$(Q)$(AR) cr $@ $(OBJS)
	$(Q)$(RANLIB) $@
@else

	$(ECHO) "	LDSO	$@"
	$(Q)$(CC) $(CFLAGS) $(LDFLAGS) $(SH_LDFLAGS) -o $@ $(OBJS) $(LDLIBS) $(LIBS)
@endif

# Note that $> $^ is for compatibility with both GNU make and BSD make
readdir.so: jim-readdir.c
	$(ECHO)	"	CC	${@:.so=.o}"
	$(Q)$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-readdir.o $> $^
	$(ECHO)	"	LDSO	$@"
	$(Q)$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-readdir.o $(SH_LIBJIM)

array.so: jim-array.c
	$(ECHO)	"	CC	${@:.so=.o}"
	$(Q)$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-array.o $> $^
	$(ECHO)	"	LDSO	$@"
	$(Q)$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-array.o $(SH_LIBJIM)

clock.so: jim-clock.c
	$(ECHO)	"	CC	${@:.so=.o}"
	$(Q)$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-clock.o $> $^
	$(ECHO)	"	LDSO	$@"
	$(Q)$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-clock.o $(SH_LIBJIM)

file.so: jim-file.c
	$(ECHO)	"	CC	${@:.so=.o}"
	$(Q)$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-file.o $> $^
	$(ECHO)	"	LDSO	$@"
	$(Q)$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-file.o $(SH_LIBJIM)

interp.so: jim-interp.c
	$(ECHO)	"	CC	${@:.so=.o}"
	$(Q)$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-interp.o jim-interp.c
	$(ECHO)	"	LDSO	$@"
	$(Q)$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-interp.o $(SH_LIBJIM) @LDLIBS_interp@

posix.so: jim-posix.c
	$(ECHO)	"	CC	${@:.so=.o}"
	$(Q)$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-posix.o $> $^
	$(ECHO)	"	LDSO	$@"
	$(Q)$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-posix.o $(SH_LIBJIM)

regexp.so: jim-regexp.c
	$(ECHO)	"	CC	${@:.so=.o}"
	$(Q)$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-regexp.o $> $^
	$(ECHO)	"	LDSO	$@"
	$(Q)$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-regexp.o $(SH_LIBJIM)

syslog.so: jim-syslog.c
	$(ECHO)	"	CC	${@:.so=.o}"
	$(Q)$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-syslog.o $> $^
	$(ECHO)	"	LDSO	$@"
	$(Q)$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-syslog.o $(SH_LIBJIM)

readline.so: jim-readline.c
	$(ECHO)	"	CC	${@:.so=.o}"
	$(Q)$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-readline.o $> $^
	$(ECHO)	"	LDSO	$@"
	$(Q)$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-readline.o $(SH_LIBJIM) @LDLIBS_readline@

pack.so: jim-pack.c
	$(ECHO)	"	CC	${@:.so=.o}"
	$(Q)$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-pack.o $> $^
	$(ECHO)	"	LDSO	$@"
	$(Q)$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-pack.o $(SH_LIBJIM) @LDLIBS_pack@

tclprefix.so: jim-tclprefix.c
	$(ECHO)	"	CC	${@:.so=.o}"
	$(Q)$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-tclprefix.o $> $^
	$(ECHO)	"	LDSO	$@"
	$(Q)$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-tclprefix.o $(SH_LIBJIM) @LDLIBS_tclprefix@

sqlite3.so: jim-sqlite3.c
	$(ECHO)	"	CC	${@:.so=.o}"
	$(Q)$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-sqlite3.o $> $^
	$(ECHO)	"	LDSO	$@"
	$(Q)$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-sqlite3.o $(SH_LIBJIM) @LDLIBS_sqlite3@

win32.so: jim-win32.c
	$(ECHO)	"	CC	${@:.so=.o}"
	$(Q)$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-win32.o $> $^
	$(ECHO)	"	LDSO	$@"
	$(Q)$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-win32.o $(SH_LIBJIM) @LDLIBS_win32@

mk.so: jim-mk.cpp
	$(ECHO)	"	CC	${@:.so=.o}"
	$(Q)$(CXX) $(CXXFLAGS) $(SHOBJ_CFLAGS) -c -o jim-mk.o $> $^
	$(ECHO)	"	LDSO	$@"
	$(Q)$(CXX) $(CXXFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-mk.o $(SH_LIBJIM) @LDLIBS_mk@

sdl.so: jim-sdl.c
	$(ECHO)	"	CC	${@:.so=.o}"
	$(Q)$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-sdl.o $> $^
	$(ECHO)	"	LDSO	$@"
	$(Q)$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-sdl.o $(SH_LIBJIM) @LDLIBS_sdl@

zlib.so: jim-zlib.c
	$(ECHO)	"	CC	${@:.so=.o}"
	$(Q)$(CC) $(CFLAGS) $(SHOBJ_CFLAGS) -c -o jim-zlib.o $> $^
	$(ECHO)	"	LDSO	$@"
	$(Q)$(CC) $(CFLAGS) $(LDFLAGS) $(SHOBJ_LDFLAGS) -o $@ jim-zlib.o $(SH_LIBJIM) @LDLIBS_zlib@

docs: Tcl.html

@if INSTALL_DOCS == nodocs
install-docs:
@endif

Changes to auto.def.

1
2
3
4




5
6
7
8
9
10
11
...
155
156
157
158
159
160
161












162
163
164
165
166
167
168
# vim:se syn=tcl:
#

define JIM_VERSION 77





# Note: modules which support options *must* be included before 'options'
use cc cc-shared cc-db cc-lib pkg-config util
use local

options {
    utf8            => "include support for utf8-encoded strings"
................................................................................
        define TCL_PLATFORM_PATH_SEPARATOR :
    }
}

# Find some tools
cc-check-tools ar ranlib strip
define tclsh [info nameofexecutable]













if {[opt-bool docs]} {
    if {[cc-check-progs asciidoc sed]} {
        define INSTALL_DOCS docs
        define HAVE_ASCIIDOC
    } else {
        define INSTALL_DOCS shipped




>
>
>
>







 







>
>
>
>
>
>
>
>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
...
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# vim:se syn=tcl:
#

define JIM_VERSION 77

options-defaults {
    silent-rules 1
}

# Note: modules which support options *must* be included before 'options'
use cc cc-shared cc-db cc-lib pkg-config util
use local

options {
    utf8            => "include support for utf8-encoded strings"
................................................................................
        define TCL_PLATFORM_PATH_SEPARATOR :
    }
}

# Find some tools
cc-check-tools ar ranlib strip
define tclsh [info nameofexecutable]

# We only support silent-rules for GNU Make
define NO_SILENT_RULES
if {[get-define AM_SILENT_RULES 0]} {
    if {[cc-check-progs [get-define MAKE make]]} {
        # Are we using GNU make?
        catch {exec [get-define MAKE] --version} makeversion
        if {[string match "GNU Make*" $makeversion]} {
            define NO_SILENT_RULES 0
        }
    }
}

if {[opt-bool docs]} {
    if {[cc-check-progs asciidoc sed]} {
        define INSTALL_DOCS docs
        define HAVE_ASCIIDOC
    } else {
        define INSTALL_DOCS shipped