Fossil SCM

Get vanilla configure and make, via autosetup, working on Win32.

mistachkin 2016-01-16 21:18 UTC trunk
Commit 75a0abacacf7710a6c4e11a892a30a314d6afef2
2 files changed +94 -56 +11 -2
+94 -56
--- auto.def
+++ auto.def
@@ -1,15 +1,15 @@
11
# System autoconfiguration. Try: ./configure --help
22
33
use cc cc-lib
44
55
options {
6
- with-openssl:path|auto|none
7
- => {Look for OpenSSL in the given path, or auto or none}
6
+ with-openssl:path|auto|tree|none
7
+ => {Look for OpenSSL in the given path, automatically, in the source tree, or none}
88
with-miniz=0 => {Use miniz from the source tree}
99
with-zlib:path|auto|tree
10
- => {Look for zlib in the given path, or auto or in the source tree}
10
+ => {Look for zlib in the given path, automatically, in the source tree, or none}
1111
with-exec-rel-paths=0
1212
=> {Enable relative paths for external diff/gdiff}
1313
with-legacy-mv-rm=0 => {Enable legacy behavior for mv/rm (skip checkout files)}
1414
with-th1-docs=0 => {Enable TH1 for embedded documentation pages}
1515
with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages}
@@ -36,10 +36,11 @@
3636
cc-check-progs tclsh
3737
3838
define EXTRA_CFLAGS ""
3939
define EXTRA_LDFLAGS ""
4040
define USE_SYSTEM_SQLITE 0
41
+define USE_LINENOISE 0
4142
4243
if {![opt-bool internal-sqlite]} {
4344
proc find_internal_sqlite {} {
4445
4546
# On some systems (slackware), libsqlite3 requires -ldl to link. So
@@ -69,10 +70,25 @@
6970
user-error "system sqlite3 not found"
7071
}
7172
7273
find_internal_sqlite
7374
}
75
+
76
+proc is_mingw {} {
77
+ return [string match *mingw* [get-define host]]
78
+}
79
+
80
+if {[is_mingw]} {
81
+ define-append EXTRA_CFLAGS -DBROKEN_MINGW_CMDLINE
82
+ define-append LIBS -lkernel32 -lws2_32 -lmingw32
83
+} else {
84
+ #
85
+ # NOTE: All platforms except MinGW should use the linenoise
86
+ # package. It is currently unsupported on Win32.
87
+ #
88
+ define USE_LINENOISE 1
89
+}
7490
7591
if {[string match *-solaris* [get-define host]]} {
7692
define-append EXTRA_CFLAGS {-D_XOPEN_SOURCE=500 -D__EXTENSIONS__}
7793
}
7894
@@ -217,11 +233,18 @@
217233
218234
# Helper for OpenSSL checking
219235
proc check-for-openssl {msg {cflags {}}} {
220236
msg-checking "Checking for $msg..."
221237
set rc 0
222
- msg-quiet cc-with [list -cflags $cflags -libs {-lssl -lcrypto}] {
238
+ set libs {-lssl -lcrypto}
239
+ if {[is_mingw]} {
240
+ lappend libs -lgdi32 -lwsock32
241
+ }
242
+ if {[info exists ::zlib_for_ssl]} then {
243
+ lappend libs $::zlib_for_ssl
244
+ }
245
+ msg-quiet cc-with [list -cflags $cflags -libs $libs] {
223246
if {[cc-check-includes openssl/ssl.h] && [cc-check-functions SSL_new]} {
224247
incr rc
225248
}
226249
}
227250
if {$rc} {
@@ -230,47 +253,87 @@
230253
} else {
231254
msg-result "no"
232255
return 0
233256
}
234257
}
258
+
259
+if {[opt-bool with-miniz]} {
260
+ define FOSSIL_ENABLE_MINIZ 1
261
+ msg-result "Using miniz for compression"
262
+} else {
263
+ # Check for zlib, using the given location if specified
264
+ set zlibpath [opt-val with-zlib]
265
+ if {$zlibpath eq "tree"} {
266
+ set zlibdir [file dirname $autosetup(dir)]/compat/zlib
267
+ cc-with [list -cflags "-I$zlibdir -L$zlibdir"]
268
+ define-append EXTRA_CFLAGS -I$zlibdir
269
+ define-append LIBS $zlibdir/libz.a
270
+ set ::zlib_for_ssl $zlibdir/libz.a
271
+ msg-result "Using zlib in source tree"
272
+ } else {
273
+ if {$zlibpath ni {auto ""}} {
274
+ cc-with [list -cflags "-I$zlibpath -L$zlibpath"]
275
+ define-append EXTRA_CFLAGS -I$zlibpath
276
+ define-append EXTRA_LDFLAGS -L$zlibpath
277
+ msg-result "Using zlib from $zlibpath"
278
+ }
279
+ if {![cc-check-includes zlib.h] || ![cc-check-function-in-lib inflateEnd z]} {
280
+ user-error "zlib not found please install it or specify the location with --with-zlib"
281
+ }
282
+ set ::zlib_for_ssl -lz
283
+ }
284
+}
235285
236286
set ssldirs [opt-val with-openssl]
237287
if {$ssldirs ne "none"} {
238
- set found 0
239
- if {$ssldirs in {auto ""}} {
240
- catch {
241
- set cflags [exec pkg-config openssl --cflags-only-I]
242
- set ldflags [exec pkg-config openssl --libs-only-L]
243
-
244
- set found [check-for-openssl "ssl via pkg-config" "$cflags $ldflags"]
245
- } msg
246
- if {!$found} {
247
- set ssldirs "{} /usr/sfw /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
248
- }
249
- }
250
- if {!$found} {
251
- foreach dir $ssldirs {
252
- if {$dir eq ""} {
253
- set msg "system ssl"
254
- set cflags ""
255
- set ldflags ""
256
- } else {
257
- set msg "ssl in $dir"
258
- set cflags "-I$dir/include"
259
- set ldflags "-L$dir/lib"
260
- }
261
- if {[check-for-openssl $msg "$cflags $ldflags"]} {
262
- incr found
263
- break
288
+ if {[opt-bool with-miniz]} {
289
+ user-error "The --with-miniz option is incompatible with OpenSSL"
290
+ }
291
+ set found 0
292
+ if {$ssldirs eq "tree"} {
293
+ set ssldir [file dirname $autosetup(dir)]/compat/openssl
294
+ set msg "ssl in $ssldir"
295
+ set cflags "-I$ssldir/include"
296
+ set ldflags "-L$ssldir"
297
+ set found [check-for-openssl "ssl in source tree" "$cflags $ldflags"]
298
+ } else {
299
+ if {$ssldirs in {auto ""}} {
300
+ catch {
301
+ set cflags [exec pkg-config openssl --cflags-only-I]
302
+ set ldflags [exec pkg-config openssl --libs-only-L]
303
+ set found [check-for-openssl "ssl via pkg-config" "$cflags $ldflags"]
304
+ } msg
305
+ if {!$found} {
306
+ set ssldirs "{} /usr/sfw /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
307
+ }
308
+ }
309
+ if {!$found} {
310
+ foreach dir $ssldirs {
311
+ if {$dir eq ""} {
312
+ set msg "system ssl"
313
+ set cflags ""
314
+ set ldflags ""
315
+ } else {
316
+ set msg "ssl in $dir"
317
+ set cflags "-I$dir/include"
318
+ set ldflags "-L$dir/lib"
319
+ }
320
+ if {[check-for-openssl $msg "$cflags $ldflags"]} {
321
+ incr found
322
+ break
323
+ }
264324
}
265325
}
266326
}
267327
if {$found} {
268328
define FOSSIL_ENABLE_SSL
269329
define-append EXTRA_CFLAGS $cflags
270330
define-append EXTRA_LDFLAGS $ldflags
271331
define-append LIBS -lssl -lcrypto
332
+ if {[is_mingw]} {
333
+ define-append LIBS -lgdi32 -lwsock32
334
+ }
272335
msg-result "HTTPS support enabled"
273336
274337
# Silence OpenSSL deprecation warnings on Mac OS X 10.7.
275338
if {[string match *-darwin* [get-define host]]} {
276339
if {[cctest -cflags {-Wdeprecated-declarations}]} {
@@ -280,40 +343,15 @@
280343
} else {
281344
user-error "OpenSSL not found. Consider --with-openssl=none to disable HTTPS support"
282345
}
283346
}
284347
285
-if {[opt-bool with-miniz]} {
286
- define FOSSIL_ENABLE_MINIZ 1
287
- msg-result "Using miniz for compression"
288
-} else {
289
- # Check for zlib, using the given location if specified
290
- set zlibpath [opt-val with-zlib]
291
- if {$zlibpath eq "tree"} {
292
- set zlibdir [file dirname $autosetup(dir)]/compat/zlib
293
- cc-with [list -cflags "-I$zlibdir"]
294
- define-append EXTRA_CFLAGS -I$zlibdir
295
- define-append LIBS $zlibdir/libz.a
296
- msg-result "Using zlib in source tree"
297
- } else {
298
- if {$zlibpath ni {auto ""}} {
299
- cc-with [list -cflags "-I$zlibpath -L$zlibpath"]
300
- define-append EXTRA_CFLAGS -I$zlibpath
301
- define-append EXTRA_LDFLAGS -L$zlibpath
302
- msg-result "Using zlib from $zlibpath"
303
- }
304
- if {![cc-check-includes zlib.h] || ![cc-check-function-in-lib inflateEnd z]} {
305
- user-error "zlib not found please install it or specify the location with --with-zlib"
306
- }
307
- }
308
-}
309
-
310348
# Network functions require libraries on some systems
311349
cc-check-function-in-lib gethostbyname nsl
312350
if {![cc-check-function-in-lib socket {socket network}]} {
313351
# Last resort, may be Windows
314
- if {[string match *mingw* [get-define host]]} {
352
+ if {[is_mingw]} {
315353
define-append LIBS -lwsock32
316354
}
317355
}
318356
cc-check-function-in-lib iconv iconv
319357
cc-check-functions utime
320358
--- auto.def
+++ auto.def
@@ -1,15 +1,15 @@
1 # System autoconfiguration. Try: ./configure --help
2
3 use cc cc-lib
4
5 options {
6 with-openssl:path|auto|none
7 => {Look for OpenSSL in the given path, or auto or none}
8 with-miniz=0 => {Use miniz from the source tree}
9 with-zlib:path|auto|tree
10 => {Look for zlib in the given path, or auto or in the source tree}
11 with-exec-rel-paths=0
12 => {Enable relative paths for external diff/gdiff}
13 with-legacy-mv-rm=0 => {Enable legacy behavior for mv/rm (skip checkout files)}
14 with-th1-docs=0 => {Enable TH1 for embedded documentation pages}
15 with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages}
@@ -36,10 +36,11 @@
36 cc-check-progs tclsh
37
38 define EXTRA_CFLAGS ""
39 define EXTRA_LDFLAGS ""
40 define USE_SYSTEM_SQLITE 0
 
41
42 if {![opt-bool internal-sqlite]} {
43 proc find_internal_sqlite {} {
44
45 # On some systems (slackware), libsqlite3 requires -ldl to link. So
@@ -69,10 +70,25 @@
69 user-error "system sqlite3 not found"
70 }
71
72 find_internal_sqlite
73 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
75 if {[string match *-solaris* [get-define host]]} {
76 define-append EXTRA_CFLAGS {-D_XOPEN_SOURCE=500 -D__EXTENSIONS__}
77 }
78
@@ -217,11 +233,18 @@
217
218 # Helper for OpenSSL checking
219 proc check-for-openssl {msg {cflags {}}} {
220 msg-checking "Checking for $msg..."
221 set rc 0
222 msg-quiet cc-with [list -cflags $cflags -libs {-lssl -lcrypto}] {
 
 
 
 
 
 
 
223 if {[cc-check-includes openssl/ssl.h] && [cc-check-functions SSL_new]} {
224 incr rc
225 }
226 }
227 if {$rc} {
@@ -230,47 +253,87 @@
230 } else {
231 msg-result "no"
232 return 0
233 }
234 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
235
236 set ssldirs [opt-val with-openssl]
237 if {$ssldirs ne "none"} {
238 set found 0
239 if {$ssldirs in {auto ""}} {
240 catch {
241 set cflags [exec pkg-config openssl --cflags-only-I]
242 set ldflags [exec pkg-config openssl --libs-only-L]
243
244 set found [check-for-openssl "ssl via pkg-config" "$cflags $ldflags"]
245 } msg
246 if {!$found} {
247 set ssldirs "{} /usr/sfw /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
248 }
249 }
250 if {!$found} {
251 foreach dir $ssldirs {
252 if {$dir eq ""} {
253 set msg "system ssl"
254 set cflags ""
255 set ldflags ""
256 } else {
257 set msg "ssl in $dir"
258 set cflags "-I$dir/include"
259 set ldflags "-L$dir/lib"
260 }
261 if {[check-for-openssl $msg "$cflags $ldflags"]} {
262 incr found
263 break
 
 
 
 
 
 
 
 
 
 
264 }
265 }
266 }
267 if {$found} {
268 define FOSSIL_ENABLE_SSL
269 define-append EXTRA_CFLAGS $cflags
270 define-append EXTRA_LDFLAGS $ldflags
271 define-append LIBS -lssl -lcrypto
 
 
 
272 msg-result "HTTPS support enabled"
273
274 # Silence OpenSSL deprecation warnings on Mac OS X 10.7.
275 if {[string match *-darwin* [get-define host]]} {
276 if {[cctest -cflags {-Wdeprecated-declarations}]} {
@@ -280,40 +343,15 @@
280 } else {
281 user-error "OpenSSL not found. Consider --with-openssl=none to disable HTTPS support"
282 }
283 }
284
285 if {[opt-bool with-miniz]} {
286 define FOSSIL_ENABLE_MINIZ 1
287 msg-result "Using miniz for compression"
288 } else {
289 # Check for zlib, using the given location if specified
290 set zlibpath [opt-val with-zlib]
291 if {$zlibpath eq "tree"} {
292 set zlibdir [file dirname $autosetup(dir)]/compat/zlib
293 cc-with [list -cflags "-I$zlibdir"]
294 define-append EXTRA_CFLAGS -I$zlibdir
295 define-append LIBS $zlibdir/libz.a
296 msg-result "Using zlib in source tree"
297 } else {
298 if {$zlibpath ni {auto ""}} {
299 cc-with [list -cflags "-I$zlibpath -L$zlibpath"]
300 define-append EXTRA_CFLAGS -I$zlibpath
301 define-append EXTRA_LDFLAGS -L$zlibpath
302 msg-result "Using zlib from $zlibpath"
303 }
304 if {![cc-check-includes zlib.h] || ![cc-check-function-in-lib inflateEnd z]} {
305 user-error "zlib not found please install it or specify the location with --with-zlib"
306 }
307 }
308 }
309
310 # Network functions require libraries on some systems
311 cc-check-function-in-lib gethostbyname nsl
312 if {![cc-check-function-in-lib socket {socket network}]} {
313 # Last resort, may be Windows
314 if {[string match *mingw* [get-define host]]} {
315 define-append LIBS -lwsock32
316 }
317 }
318 cc-check-function-in-lib iconv iconv
319 cc-check-functions utime
320
--- auto.def
+++ auto.def
@@ -1,15 +1,15 @@
1 # System autoconfiguration. Try: ./configure --help
2
3 use cc cc-lib
4
5 options {
6 with-openssl:path|auto|tree|none
7 => {Look for OpenSSL in the given path, automatically, in the source tree, or none}
8 with-miniz=0 => {Use miniz from the source tree}
9 with-zlib:path|auto|tree
10 => {Look for zlib in the given path, automatically, in the source tree, or none}
11 with-exec-rel-paths=0
12 => {Enable relative paths for external diff/gdiff}
13 with-legacy-mv-rm=0 => {Enable legacy behavior for mv/rm (skip checkout files)}
14 with-th1-docs=0 => {Enable TH1 for embedded documentation pages}
15 with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages}
@@ -36,10 +36,11 @@
36 cc-check-progs tclsh
37
38 define EXTRA_CFLAGS ""
39 define EXTRA_LDFLAGS ""
40 define USE_SYSTEM_SQLITE 0
41 define USE_LINENOISE 0
42
43 if {![opt-bool internal-sqlite]} {
44 proc find_internal_sqlite {} {
45
46 # On some systems (slackware), libsqlite3 requires -ldl to link. So
@@ -69,10 +70,25 @@
70 user-error "system sqlite3 not found"
71 }
72
73 find_internal_sqlite
74 }
75
76 proc is_mingw {} {
77 return [string match *mingw* [get-define host]]
78 }
79
80 if {[is_mingw]} {
81 define-append EXTRA_CFLAGS -DBROKEN_MINGW_CMDLINE
82 define-append LIBS -lkernel32 -lws2_32 -lmingw32
83 } else {
84 #
85 # NOTE: All platforms except MinGW should use the linenoise
86 # package. It is currently unsupported on Win32.
87 #
88 define USE_LINENOISE 1
89 }
90
91 if {[string match *-solaris* [get-define host]]} {
92 define-append EXTRA_CFLAGS {-D_XOPEN_SOURCE=500 -D__EXTENSIONS__}
93 }
94
@@ -217,11 +233,18 @@
233
234 # Helper for OpenSSL checking
235 proc check-for-openssl {msg {cflags {}}} {
236 msg-checking "Checking for $msg..."
237 set rc 0
238 set libs {-lssl -lcrypto}
239 if {[is_mingw]} {
240 lappend libs -lgdi32 -lwsock32
241 }
242 if {[info exists ::zlib_for_ssl]} then {
243 lappend libs $::zlib_for_ssl
244 }
245 msg-quiet cc-with [list -cflags $cflags -libs $libs] {
246 if {[cc-check-includes openssl/ssl.h] && [cc-check-functions SSL_new]} {
247 incr rc
248 }
249 }
250 if {$rc} {
@@ -230,47 +253,87 @@
253 } else {
254 msg-result "no"
255 return 0
256 }
257 }
258
259 if {[opt-bool with-miniz]} {
260 define FOSSIL_ENABLE_MINIZ 1
261 msg-result "Using miniz for compression"
262 } else {
263 # Check for zlib, using the given location if specified
264 set zlibpath [opt-val with-zlib]
265 if {$zlibpath eq "tree"} {
266 set zlibdir [file dirname $autosetup(dir)]/compat/zlib
267 cc-with [list -cflags "-I$zlibdir -L$zlibdir"]
268 define-append EXTRA_CFLAGS -I$zlibdir
269 define-append LIBS $zlibdir/libz.a
270 set ::zlib_for_ssl $zlibdir/libz.a
271 msg-result "Using zlib in source tree"
272 } else {
273 if {$zlibpath ni {auto ""}} {
274 cc-with [list -cflags "-I$zlibpath -L$zlibpath"]
275 define-append EXTRA_CFLAGS -I$zlibpath
276 define-append EXTRA_LDFLAGS -L$zlibpath
277 msg-result "Using zlib from $zlibpath"
278 }
279 if {![cc-check-includes zlib.h] || ![cc-check-function-in-lib inflateEnd z]} {
280 user-error "zlib not found please install it or specify the location with --with-zlib"
281 }
282 set ::zlib_for_ssl -lz
283 }
284 }
285
286 set ssldirs [opt-val with-openssl]
287 if {$ssldirs ne "none"} {
288 if {[opt-bool with-miniz]} {
289 user-error "The --with-miniz option is incompatible with OpenSSL"
290 }
291 set found 0
292 if {$ssldirs eq "tree"} {
293 set ssldir [file dirname $autosetup(dir)]/compat/openssl
294 set msg "ssl in $ssldir"
295 set cflags "-I$ssldir/include"
296 set ldflags "-L$ssldir"
297 set found [check-for-openssl "ssl in source tree" "$cflags $ldflags"]
298 } else {
299 if {$ssldirs in {auto ""}} {
300 catch {
301 set cflags [exec pkg-config openssl --cflags-only-I]
302 set ldflags [exec pkg-config openssl --libs-only-L]
303 set found [check-for-openssl "ssl via pkg-config" "$cflags $ldflags"]
304 } msg
305 if {!$found} {
306 set ssldirs "{} /usr/sfw /usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
307 }
308 }
309 if {!$found} {
310 foreach dir $ssldirs {
311 if {$dir eq ""} {
312 set msg "system ssl"
313 set cflags ""
314 set ldflags ""
315 } else {
316 set msg "ssl in $dir"
317 set cflags "-I$dir/include"
318 set ldflags "-L$dir/lib"
319 }
320 if {[check-for-openssl $msg "$cflags $ldflags"]} {
321 incr found
322 break
323 }
324 }
325 }
326 }
327 if {$found} {
328 define FOSSIL_ENABLE_SSL
329 define-append EXTRA_CFLAGS $cflags
330 define-append EXTRA_LDFLAGS $ldflags
331 define-append LIBS -lssl -lcrypto
332 if {[is_mingw]} {
333 define-append LIBS -lgdi32 -lwsock32
334 }
335 msg-result "HTTPS support enabled"
336
337 # Silence OpenSSL deprecation warnings on Mac OS X 10.7.
338 if {[string match *-darwin* [get-define host]]} {
339 if {[cctest -cflags {-Wdeprecated-declarations}]} {
@@ -280,40 +343,15 @@
343 } else {
344 user-error "OpenSSL not found. Consider --with-openssl=none to disable HTTPS support"
345 }
346 }
347
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
348 # Network functions require libraries on some systems
349 cc-check-function-in-lib gethostbyname nsl
350 if {![cc-check-function-in-lib socket {socket network}]} {
351 # Last resort, may be Windows
352 if {[is_mingw]} {
353 define-append LIBS -lwsock32
354 }
355 }
356 cc-check-function-in-lib iconv iconv
357 cc-check-functions utime
358
+11 -2
--- src/main.mk
+++ src/main.mk
@@ -508,15 +508,24 @@
508508
# source tree should be used; otherwise, it should not.
509509
MINIZ_OBJ.0 =
510510
MINIZ_OBJ.1 = $(OBJDIR)/miniz.o
511511
MINIZ_OBJ. = $(MINIZ_OBJ.0)
512512
513
+# The USE_LINENOISE variable may be undefined, set to 0, or set
514
+# to 1. If it is set to 0, then there is no need to build or link
515
+# the linenoise.o object.
516
+LINENOISE_DEF.0 =
517
+LINENOISE_DEF.1 = -DHAVE_LINENOISE
518
+LINENOISE_DEF. = $(LINENOISE_DEF.0)
519
+LINENOISE_OBJ.0 =
520
+LINENOISE_OBJ.1 = $(OBJDIR)/linenoise.o
521
+LINENOISE_OBJ. = $(LINENOISE_OBJ.0)
513522
514523
EXTRAOBJ = \
515524
$(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) \
516525
$(MINIZ_OBJ.$(FOSSIL_ENABLE_MINIZ)) \
517
- $(OBJDIR)/linenoise.o \
526
+ $(LINENOISE_OBJ.$(USE_LINENOISE)) \
518527
$(OBJDIR)/shell.o \
519528
$(OBJDIR)/th.o \
520529
$(OBJDIR)/th_lang.o \
521530
$(OBJDIR)/th_tcl.o \
522531
$(OBJDIR)/cson_amalgamation.o
@@ -1623,11 +1632,11 @@
16231632
16241633
$(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c
16251634
$(XTCC) $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) -c $(SRCDIR)/sqlite3.c -o $@
16261635
16271636
$(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h
1628
- $(XTCC) $(SHELL_OPTIONS) $(SHELL_CFLAGS) -DHAVE_LINENOISE -c $(SRCDIR)/shell.c -o $@
1637
+ $(XTCC) $(SHELL_OPTIONS) $(SHELL_CFLAGS) $(LINENOISE_DEF.$(USE_LINENOISE)) -c $(SRCDIR)/shell.c -o $@
16291638
16301639
$(OBJDIR)/linenoise.o: $(SRCDIR)/linenoise.c $(SRCDIR)/linenoise.h
16311640
$(XTCC) -c $(SRCDIR)/linenoise.c -o $@
16321641
16331642
$(OBJDIR)/th.o: $(SRCDIR)/th.c
16341643
--- src/main.mk
+++ src/main.mk
@@ -508,15 +508,24 @@
508 # source tree should be used; otherwise, it should not.
509 MINIZ_OBJ.0 =
510 MINIZ_OBJ.1 = $(OBJDIR)/miniz.o
511 MINIZ_OBJ. = $(MINIZ_OBJ.0)
512
 
 
 
 
 
 
 
 
 
513
514 EXTRAOBJ = \
515 $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) \
516 $(MINIZ_OBJ.$(FOSSIL_ENABLE_MINIZ)) \
517 $(OBJDIR)/linenoise.o \
518 $(OBJDIR)/shell.o \
519 $(OBJDIR)/th.o \
520 $(OBJDIR)/th_lang.o \
521 $(OBJDIR)/th_tcl.o \
522 $(OBJDIR)/cson_amalgamation.o
@@ -1623,11 +1632,11 @@
1623
1624 $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c
1625 $(XTCC) $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) -c $(SRCDIR)/sqlite3.c -o $@
1626
1627 $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h
1628 $(XTCC) $(SHELL_OPTIONS) $(SHELL_CFLAGS) -DHAVE_LINENOISE -c $(SRCDIR)/shell.c -o $@
1629
1630 $(OBJDIR)/linenoise.o: $(SRCDIR)/linenoise.c $(SRCDIR)/linenoise.h
1631 $(XTCC) -c $(SRCDIR)/linenoise.c -o $@
1632
1633 $(OBJDIR)/th.o: $(SRCDIR)/th.c
1634
--- src/main.mk
+++ src/main.mk
@@ -508,15 +508,24 @@
508 # source tree should be used; otherwise, it should not.
509 MINIZ_OBJ.0 =
510 MINIZ_OBJ.1 = $(OBJDIR)/miniz.o
511 MINIZ_OBJ. = $(MINIZ_OBJ.0)
512
513 # The USE_LINENOISE variable may be undefined, set to 0, or set
514 # to 1. If it is set to 0, then there is no need to build or link
515 # the linenoise.o object.
516 LINENOISE_DEF.0 =
517 LINENOISE_DEF.1 = -DHAVE_LINENOISE
518 LINENOISE_DEF. = $(LINENOISE_DEF.0)
519 LINENOISE_OBJ.0 =
520 LINENOISE_OBJ.1 = $(OBJDIR)/linenoise.o
521 LINENOISE_OBJ. = $(LINENOISE_OBJ.0)
522
523 EXTRAOBJ = \
524 $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) \
525 $(MINIZ_OBJ.$(FOSSIL_ENABLE_MINIZ)) \
526 $(LINENOISE_OBJ.$(USE_LINENOISE)) \
527 $(OBJDIR)/shell.o \
528 $(OBJDIR)/th.o \
529 $(OBJDIR)/th_lang.o \
530 $(OBJDIR)/th_tcl.o \
531 $(OBJDIR)/cson_amalgamation.o
@@ -1623,11 +1632,11 @@
1632
1633 $(OBJDIR)/sqlite3.o: $(SRCDIR)/sqlite3.c
1634 $(XTCC) $(SQLITE_OPTIONS) $(SQLITE_CFLAGS) -c $(SRCDIR)/sqlite3.c -o $@
1635
1636 $(OBJDIR)/shell.o: $(SRCDIR)/shell.c $(SRCDIR)/sqlite3.h
1637 $(XTCC) $(SHELL_OPTIONS) $(SHELL_CFLAGS) $(LINENOISE_DEF.$(USE_LINENOISE)) -c $(SRCDIR)/shell.c -o $@
1638
1639 $(OBJDIR)/linenoise.o: $(SRCDIR)/linenoise.c $(SRCDIR)/linenoise.h
1640 $(XTCC) -c $(SRCDIR)/linenoise.c -o $@
1641
1642 $(OBJDIR)/th.o: $(SRCDIR)/th.c
1643

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button