Fossil SCM

Extended configure --with-sqlite=PATH to support pointing to a directory which contains sqlite3.c and sqlite3.h. It's not yet tested with out-of-tree SEE distributions (TODO).

stephan 2021-12-23 23:35 trunk
Commit 31d431e358b3b8571cfa6c8eaa244e7bdd2c1576a9ff9f8800c3aadb309a0b6e
+10
--- Makefile.in
+++ Makefile.in
@@ -37,15 +37,25 @@
3737
# care about testing the end result, this can be blank.
3838
#
3939
TCLSH = @TCLSH@
4040
4141
CFLAGS = @CFLAGS@
42
+CFLAGS_INCLUDE = @CFLAGS_INCLUDE@
4243
LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@
4344
BCCFLAGS = @CPPFLAGS@ $(CFLAGS)
4445
TCCFLAGS = @EXTRA_CFLAGS@ @CPPFLAGS@ $(CFLAGS) -DHAVE_AUTOCONFIG_H -D_HAVE_SQLITE_CONFIG_H
4546
INSTALLDIR = $(DESTDIR)@prefix@/bin
4647
USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@
48
+SQLITE3_SRC.2 = @SQLITE3_SRC.2@
49
+SQLITE3_OBJ.2 = @SQLITE3_OBJ.2@
50
+SQLITE3_SHELL_SRC.2 = @SQLITE3_SHELL_SRC.2@
51
+SQLITE3_ORIGIN = @SQLITE3_ORIGIN@
52
+# SQLITE3_ORIGIN changes...
53
+# SQLITE3_SRC:
54
+# 0=src/sqlite3.c, 1=src/sqlite3-see.c, 2=$(SQLITE3_SRC.2)
55
+# SQLITE3_SHELL_SRC:
56
+# 0=src/shell.c, 1=src/shell-see.c, 2=$(SQLITE3_SHELL_SRC.2)
4757
USE_LINENOISE = @USE_LINENOISE@
4858
USE_MMAN_H = @USE_MMAN_H@
4959
USE_SEE = @USE_SEE@
5060
FOSSIL_ENABLE_MINIZ = @FOSSIL_ENABLE_MINIZ@
5161
APPNAME = fossil
5262
--- Makefile.in
+++ Makefile.in
@@ -37,15 +37,25 @@
37 # care about testing the end result, this can be blank.
38 #
39 TCLSH = @TCLSH@
40
41 CFLAGS = @CFLAGS@
 
42 LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@
43 BCCFLAGS = @CPPFLAGS@ $(CFLAGS)
44 TCCFLAGS = @EXTRA_CFLAGS@ @CPPFLAGS@ $(CFLAGS) -DHAVE_AUTOCONFIG_H -D_HAVE_SQLITE_CONFIG_H
45 INSTALLDIR = $(DESTDIR)@prefix@/bin
46 USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@
 
 
 
 
 
 
 
 
 
47 USE_LINENOISE = @USE_LINENOISE@
48 USE_MMAN_H = @USE_MMAN_H@
49 USE_SEE = @USE_SEE@
50 FOSSIL_ENABLE_MINIZ = @FOSSIL_ENABLE_MINIZ@
51 APPNAME = fossil
52
--- Makefile.in
+++ Makefile.in
@@ -37,15 +37,25 @@
37 # care about testing the end result, this can be blank.
38 #
39 TCLSH = @TCLSH@
40
41 CFLAGS = @CFLAGS@
42 CFLAGS_INCLUDE = @CFLAGS_INCLUDE@
43 LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@
44 BCCFLAGS = @CPPFLAGS@ $(CFLAGS)
45 TCCFLAGS = @EXTRA_CFLAGS@ @CPPFLAGS@ $(CFLAGS) -DHAVE_AUTOCONFIG_H -D_HAVE_SQLITE_CONFIG_H
46 INSTALLDIR = $(DESTDIR)@prefix@/bin
47 USE_SYSTEM_SQLITE = @USE_SYSTEM_SQLITE@
48 SQLITE3_SRC.2 = @SQLITE3_SRC.2@
49 SQLITE3_OBJ.2 = @SQLITE3_OBJ.2@
50 SQLITE3_SHELL_SRC.2 = @SQLITE3_SHELL_SRC.2@
51 SQLITE3_ORIGIN = @SQLITE3_ORIGIN@
52 # SQLITE3_ORIGIN changes...
53 # SQLITE3_SRC:
54 # 0=src/sqlite3.c, 1=src/sqlite3-see.c, 2=$(SQLITE3_SRC.2)
55 # SQLITE3_SHELL_SRC:
56 # 0=src/shell.c, 1=src/shell-see.c, 2=$(SQLITE3_SHELL_SRC.2)
57 USE_LINENOISE = @USE_LINENOISE@
58 USE_MMAN_H = @USE_MMAN_H@
59 USE_SEE = @USE_SEE@
60 FOSSIL_ENABLE_MINIZ = @FOSSIL_ENABLE_MINIZ@
61 APPNAME = fossil
62
+51 -15
--- auto.def
+++ auto.def
@@ -9,11 +9,11 @@
99
=> {Look for OpenSSL in the given path, automatically, in the source tree, or none}
1010
with-miniz=0 => {Use miniz from the source tree}
1111
with-zlib:path|auto|tree
1212
=> {Look for zlib in the given path, automatically, or in the source tree}
1313
with-sqlite:path|auto|tree
14
- => {Look for sqlite in the given path, automatically, or in the source tree}
14
+ => {Look for sqlite in the given path, automatically, or in the source tree.}
1515
with-exec-rel-paths=0
1616
=> {Enable relative paths for external diff/gdiff}
1717
with-sanitizer: => {Build with C compiler's -fsanitize=LIST; e.g. address,enum,null,undefined}
1818
with-th1-docs=0 => {Enable TH1 for embedded documentation pages}
1919
with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages}
@@ -103,11 +103,12 @@
103103
define USE_SYSTEM_SQLITE 0
104104
define USE_LINENOISE 0
105105
define FOSSIL_ENABLE_MINIZ 0
106106
define USE_MMAN_H 0
107107
define USE_SEE 0
108
-
108
+define SQLITE3_ORIGIN 0
109
+# SQLITE3_ORIGIN 0 = src/sqlite3, 1=src/sqlite3-see.c, 2=client-provided
109110
110111
# Maintain the C89/C90-style order of variable declarations before statements.
111112
# Check if the compiler supports the respective warning flag.
112113
if {[cctest -cflags -Wdeclaration-after-statement]} {
113114
define-append EXTRA_CFLAGS -Wdeclaration-after-statement
@@ -259,10 +260,11 @@
259260
}
260261
261262
if {[opt-bool with-see]} {
262263
define-append EXTRA_CFLAGS -DUSE_SEE
263264
define USE_SEE 1
265
+ define SQLITE3_ORIGIN 1
264266
msg-result "Enabling encryption support"
265267
}
266268
267269
if {[opt-bool json]} {
268270
# Reminder/FIXME (stephan): FOSSIL_ENABLE_JSON
@@ -451,45 +453,79 @@
451453
if {[info exists ::zlib_lib]} {
452454
define-append LIBS $::zlib_lib
453455
}
454456
}
455457
456
-# Check for sqlite3, using the given location if specified
458
+
459
+
460
+########################################################################
461
+# --with-sqlite=PATH checks for the first it finds of the following...
462
+# - PATH/sqlite3.c and PATH/sqlite3.h
463
+# - PATH/sqlite3.o (and assumes sqlite3.h is with it)
464
+# - PATH/lib/libsqlite3* and PATH/include/sqlite3.h
465
+define CFLAGS_INCLUDE {}
466
+# ^^^ CFLAGS_INCLUDE is ONLY for -I... flags and their order is
467
+# significant so that --with-sqlite=PATH's header can shadow our
468
+# own. One caveat with this is that we cannot point --with-sqlite=PATH
469
+# to the root of sqlite3's own build tree because that dir has a
470
+# config.h which ends up shadowing src/config.h, breaking our build.
457471
set sq3path [opt-val with-sqlite]
458472
if {$sq3path in {tree ""}} {
459473
msg-result "Using sqlite3.c from this source tree."
460474
} else {
475
+ # SQLITE3_ORIGIN:
476
+ # 0 = (local source tree)
477
+ # 1 = use external lib or sqlite3.o
478
+ # 2 = use external sqlite3.c and (if found) shell.c
479
+ define USE_SYSTEM_SQLITE 1
480
+ define SQLITE3_SRC.2 {}
481
+ define SQLITE3_OBJ.2 {}
482
+ define SQLITE3_SHELL_SRC.2 {$(SQLITE3_SHELL_SRC.0)}
483
+ define SQLITE3_ORIGIN 2
461484
if {$sq3path != "auto"} {
462
- # Look for sqlite3.o or libsqlite3.*
463
- if {[file exists $sq3path/sqlite3.o]} {
464
- # Prefer sqlite3.o if found. TODO: if we find sqlite3.c,
465
- # include it in our build process.
466
- define-append EXTRA_CFLAGS -I$sq3path
467
- define-append EXTRA_LDFLAGS $sq3path/sqlite3.o -lpthread -lm
485
+ if {([file exists $sq3path/sqlite3.c]) && \
486
+ ([file exists $sq3path/sqlite3.h]) } {
487
+ # Prefer sqlite3.[ch] if found.
488
+ define SQLITE3_SRC.2 $sq3path/sqlite3.c
489
+ define SQLITE3_OBJ.2 {$(SQLITE3_OBJ.0)}
490
+ define USE_SYSTEM_SQLITE 2
491
+ define SQLITE3_ORIGIN 2
492
+ if {[file exists $sq3path/shell.c]} {
493
+ define SQLITE3_SHELL_SRC.2 $sq3path/shell.c
494
+ }
495
+ define-append CFLAGS_INCLUDE -I$sq3path
496
+ define-append EXTRA_LDFLAGS -lpthread
497
+ # ^^^ additional -lXXX flags are conservative estimates
498
+ msg-result "Using sqlite3.c and sqlite3.h from $sq3path"
499
+ } elseif {[file exists $sq3path/sqlite3.o]} {
500
+ # Use sqlite3.o if found.
501
+ define SQLITE3_OBJ.2 $sq3path/sqlite3.o
502
+ define-append CFLAGS_INCLUDE -I$sq3path
503
+ define-append EXTRA_LDFLAGS $sq3path/sqlite3.o -lpthread
468504
# ^^^ additional -lXXX flags are conservative estimates
469505
msg-result "Using sqlite3.o from $sq3path"
470506
} elseif { ([llength [glob -directory $sq3path/lib libsqlite3*]] != 0) \
471507
&& ([file exists $sq3path/include/sqlite3.h]) } {
472
- # e.g. --with-sqlite=/usr/local. Try $sq3path/lib
508
+ # e.g. --with-sqlite=/usr/local. Try $sq3path/lib/libsqlite3*
473509
# and $sq3path/include/sqlite3.h
474
- define-append EXTRA_CFLAGS -I$sq3path/include
475
- define-append EXTRA_LDFLAGS -L$sq3path/lib -lsqlite3 -lpthread -lm
510
+ define-append CFLAGS_INCLUDE -I$sq3path/include
511
+ define-append EXTRA_LDFLAGS -L$sq3path/lib -lsqlite3 -lpthread
476512
# ^^^ additional -lXXX flags are conservative estimates
477513
msg-result "Using -lsqlite3 from $sq3path"
478514
} else {
479515
# Assume $sq3path holds both the lib and header
480516
cc-with [list -cflags "-I$sq3path -L$sq3path"]
481
- define-append EXTRA_CFLAGS -I$sq3path
482
- define-append EXTRA_LDFLAGS -L$sq3path -lsqlite3 -lpthread -lm
517
+ define-append CFLAGS_INCLUDE -I$sq3path
518
+ define-append EXTRA_LDFLAGS -L$sq3path -lsqlite3 -lpthread
483519
# ^^^ additional -lXXX flags are conservative estimates
484520
msg-result "Using -lsqlite3 from $sq3path"
485521
}
486522
} elseif {![cc-check-includes sqlite3.h] || ![check-function-in-lib sqlite3_open_v2 sqlite3]} {
487523
user-error "libsqlite3 not found please install it or specify the location with --with-sqlite"
488524
}
489
- define USE_SYSTEM_SQLITE 1
490525
}
526
+define-append CFLAGS_INCLUDE {-I. -I$(SRCDIR)}
491527
492528
set tclpath [opt-val with-tcl]
493529
if {$tclpath ne ""} {
494530
set tclprivatestubs [opt-bool with-tcl-private-stubs]
495531
# Note parse-tclconfig-sh is in autosetup/local.tcl
496532
--- auto.def
+++ auto.def
@@ -9,11 +9,11 @@
9 => {Look for OpenSSL in the given path, automatically, in the source tree, or none}
10 with-miniz=0 => {Use miniz from the source tree}
11 with-zlib:path|auto|tree
12 => {Look for zlib in the given path, automatically, or in the source tree}
13 with-sqlite:path|auto|tree
14 => {Look for sqlite in the given path, automatically, or in the source tree}
15 with-exec-rel-paths=0
16 => {Enable relative paths for external diff/gdiff}
17 with-sanitizer: => {Build with C compiler's -fsanitize=LIST; e.g. address,enum,null,undefined}
18 with-th1-docs=0 => {Enable TH1 for embedded documentation pages}
19 with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages}
@@ -103,11 +103,12 @@
103 define USE_SYSTEM_SQLITE 0
104 define USE_LINENOISE 0
105 define FOSSIL_ENABLE_MINIZ 0
106 define USE_MMAN_H 0
107 define USE_SEE 0
108
 
109
110 # Maintain the C89/C90-style order of variable declarations before statements.
111 # Check if the compiler supports the respective warning flag.
112 if {[cctest -cflags -Wdeclaration-after-statement]} {
113 define-append EXTRA_CFLAGS -Wdeclaration-after-statement
@@ -259,10 +260,11 @@
259 }
260
261 if {[opt-bool with-see]} {
262 define-append EXTRA_CFLAGS -DUSE_SEE
263 define USE_SEE 1
 
264 msg-result "Enabling encryption support"
265 }
266
267 if {[opt-bool json]} {
268 # Reminder/FIXME (stephan): FOSSIL_ENABLE_JSON
@@ -451,45 +453,79 @@
451 if {[info exists ::zlib_lib]} {
452 define-append LIBS $::zlib_lib
453 }
454 }
455
456 # Check for sqlite3, using the given location if specified
 
 
 
 
 
 
 
 
 
 
 
 
457 set sq3path [opt-val with-sqlite]
458 if {$sq3path in {tree ""}} {
459 msg-result "Using sqlite3.c from this source tree."
460 } else {
 
 
 
 
 
 
 
 
 
461 if {$sq3path != "auto"} {
462 # Look for sqlite3.o or libsqlite3.*
463 if {[file exists $sq3path/sqlite3.o]} {
464 # Prefer sqlite3.o if found. TODO: if we find sqlite3.c,
465 # include it in our build process.
466 define-append EXTRA_CFLAGS -I$sq3path
467 define-append EXTRA_LDFLAGS $sq3path/sqlite3.o -lpthread -lm
 
 
 
 
 
 
 
 
 
 
 
 
 
468 # ^^^ additional -lXXX flags are conservative estimates
469 msg-result "Using sqlite3.o from $sq3path"
470 } elseif { ([llength [glob -directory $sq3path/lib libsqlite3*]] != 0) \
471 && ([file exists $sq3path/include/sqlite3.h]) } {
472 # e.g. --with-sqlite=/usr/local. Try $sq3path/lib
473 # and $sq3path/include/sqlite3.h
474 define-append EXTRA_CFLAGS -I$sq3path/include
475 define-append EXTRA_LDFLAGS -L$sq3path/lib -lsqlite3 -lpthread -lm
476 # ^^^ additional -lXXX flags are conservative estimates
477 msg-result "Using -lsqlite3 from $sq3path"
478 } else {
479 # Assume $sq3path holds both the lib and header
480 cc-with [list -cflags "-I$sq3path -L$sq3path"]
481 define-append EXTRA_CFLAGS -I$sq3path
482 define-append EXTRA_LDFLAGS -L$sq3path -lsqlite3 -lpthread -lm
483 # ^^^ additional -lXXX flags are conservative estimates
484 msg-result "Using -lsqlite3 from $sq3path"
485 }
486 } elseif {![cc-check-includes sqlite3.h] || ![check-function-in-lib sqlite3_open_v2 sqlite3]} {
487 user-error "libsqlite3 not found please install it or specify the location with --with-sqlite"
488 }
489 define USE_SYSTEM_SQLITE 1
490 }
 
491
492 set tclpath [opt-val with-tcl]
493 if {$tclpath ne ""} {
494 set tclprivatestubs [opt-bool with-tcl-private-stubs]
495 # Note parse-tclconfig-sh is in autosetup/local.tcl
496
--- auto.def
+++ auto.def
@@ -9,11 +9,11 @@
9 => {Look for OpenSSL in the given path, automatically, in the source tree, or none}
10 with-miniz=0 => {Use miniz from the source tree}
11 with-zlib:path|auto|tree
12 => {Look for zlib in the given path, automatically, or in the source tree}
13 with-sqlite:path|auto|tree
14 => {Look for sqlite in the given path, automatically, or in the source tree.}
15 with-exec-rel-paths=0
16 => {Enable relative paths for external diff/gdiff}
17 with-sanitizer: => {Build with C compiler's -fsanitize=LIST; e.g. address,enum,null,undefined}
18 with-th1-docs=0 => {Enable TH1 for embedded documentation pages}
19 with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages}
@@ -103,11 +103,12 @@
103 define USE_SYSTEM_SQLITE 0
104 define USE_LINENOISE 0
105 define FOSSIL_ENABLE_MINIZ 0
106 define USE_MMAN_H 0
107 define USE_SEE 0
108 define SQLITE3_ORIGIN 0
109 # SQLITE3_ORIGIN 0 = src/sqlite3, 1=src/sqlite3-see.c, 2=client-provided
110
111 # Maintain the C89/C90-style order of variable declarations before statements.
112 # Check if the compiler supports the respective warning flag.
113 if {[cctest -cflags -Wdeclaration-after-statement]} {
114 define-append EXTRA_CFLAGS -Wdeclaration-after-statement
@@ -259,10 +260,11 @@
260 }
261
262 if {[opt-bool with-see]} {
263 define-append EXTRA_CFLAGS -DUSE_SEE
264 define USE_SEE 1
265 define SQLITE3_ORIGIN 1
266 msg-result "Enabling encryption support"
267 }
268
269 if {[opt-bool json]} {
270 # Reminder/FIXME (stephan): FOSSIL_ENABLE_JSON
@@ -451,45 +453,79 @@
453 if {[info exists ::zlib_lib]} {
454 define-append LIBS $::zlib_lib
455 }
456 }
457
458
459
460 ########################################################################
461 # --with-sqlite=PATH checks for the first it finds of the following...
462 # - PATH/sqlite3.c and PATH/sqlite3.h
463 # - PATH/sqlite3.o (and assumes sqlite3.h is with it)
464 # - PATH/lib/libsqlite3* and PATH/include/sqlite3.h
465 define CFLAGS_INCLUDE {}
466 # ^^^ CFLAGS_INCLUDE is ONLY for -I... flags and their order is
467 # significant so that --with-sqlite=PATH's header can shadow our
468 # own. One caveat with this is that we cannot point --with-sqlite=PATH
469 # to the root of sqlite3's own build tree because that dir has a
470 # config.h which ends up shadowing src/config.h, breaking our build.
471 set sq3path [opt-val with-sqlite]
472 if {$sq3path in {tree ""}} {
473 msg-result "Using sqlite3.c from this source tree."
474 } else {
475 # SQLITE3_ORIGIN:
476 # 0 = (local source tree)
477 # 1 = use external lib or sqlite3.o
478 # 2 = use external sqlite3.c and (if found) shell.c
479 define USE_SYSTEM_SQLITE 1
480 define SQLITE3_SRC.2 {}
481 define SQLITE3_OBJ.2 {}
482 define SQLITE3_SHELL_SRC.2 {$(SQLITE3_SHELL_SRC.0)}
483 define SQLITE3_ORIGIN 2
484 if {$sq3path != "auto"} {
485 if {([file exists $sq3path/sqlite3.c]) && \
486 ([file exists $sq3path/sqlite3.h]) } {
487 # Prefer sqlite3.[ch] if found.
488 define SQLITE3_SRC.2 $sq3path/sqlite3.c
489 define SQLITE3_OBJ.2 {$(SQLITE3_OBJ.0)}
490 define USE_SYSTEM_SQLITE 2
491 define SQLITE3_ORIGIN 2
492 if {[file exists $sq3path/shell.c]} {
493 define SQLITE3_SHELL_SRC.2 $sq3path/shell.c
494 }
495 define-append CFLAGS_INCLUDE -I$sq3path
496 define-append EXTRA_LDFLAGS -lpthread
497 # ^^^ additional -lXXX flags are conservative estimates
498 msg-result "Using sqlite3.c and sqlite3.h from $sq3path"
499 } elseif {[file exists $sq3path/sqlite3.o]} {
500 # Use sqlite3.o if found.
501 define SQLITE3_OBJ.2 $sq3path/sqlite3.o
502 define-append CFLAGS_INCLUDE -I$sq3path
503 define-append EXTRA_LDFLAGS $sq3path/sqlite3.o -lpthread
504 # ^^^ additional -lXXX flags are conservative estimates
505 msg-result "Using sqlite3.o from $sq3path"
506 } elseif { ([llength [glob -directory $sq3path/lib libsqlite3*]] != 0) \
507 && ([file exists $sq3path/include/sqlite3.h]) } {
508 # e.g. --with-sqlite=/usr/local. Try $sq3path/lib/libsqlite3*
509 # and $sq3path/include/sqlite3.h
510 define-append CFLAGS_INCLUDE -I$sq3path/include
511 define-append EXTRA_LDFLAGS -L$sq3path/lib -lsqlite3 -lpthread
512 # ^^^ additional -lXXX flags are conservative estimates
513 msg-result "Using -lsqlite3 from $sq3path"
514 } else {
515 # Assume $sq3path holds both the lib and header
516 cc-with [list -cflags "-I$sq3path -L$sq3path"]
517 define-append CFLAGS_INCLUDE -I$sq3path
518 define-append EXTRA_LDFLAGS -L$sq3path -lsqlite3 -lpthread
519 # ^^^ additional -lXXX flags are conservative estimates
520 msg-result "Using -lsqlite3 from $sq3path"
521 }
522 } elseif {![cc-check-includes sqlite3.h] || ![check-function-in-lib sqlite3_open_v2 sqlite3]} {
523 user-error "libsqlite3 not found please install it or specify the location with --with-sqlite"
524 }
 
525 }
526 define-append CFLAGS_INCLUDE {-I. -I$(SRCDIR)}
527
528 set tclpath [opt-val with-tcl]
529 if {$tclpath ne ""} {
530 set tclprivatestubs [opt-bool with-tcl-private-stubs]
531 # Note parse-tclconfig-sh is in autosetup/local.tcl
532
+18 -12
--- src/main.mk
+++ src/main.mk
@@ -9,11 +9,11 @@
99
#
1010
# This file is included by primary Makefile.
1111
#
1212
1313
XBCC = $(BCC) $(BCCFLAGS)
14
-XTCC = $(TCC) -I. -I$(SRCDIR) -I$(OBJDIR) $(TCCFLAGS)
14
+XTCC = $(TCC) $(CFLAGS_INCLUDE) -I$(OBJDIR) $(TCCFLAGS)
1515
1616
TESTFLAGS := -quiet
1717
1818
SRC = \
1919
$(SRCDIR)/add.c \
@@ -688,16 +688,20 @@
688688
# Setup the options used to compile the included miniz library.
689689
MINIZ_OPTIONS = -DMINIZ_NO_STDIO \
690690
-DMINIZ_NO_TIME \
691691
-DMINIZ_NO_ARCHIVE_APIS
692692
693
-# The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set
694
-# to 1. If it is set to 1, then there is no need to build or link
693
+# The USE_SYSTEM_SQLITE variable may be undefined, set to 0 or 1.
694
+# If it is set to 1, then there is no need to build or link
695695
# the sqlite3.o object. Instead, the system SQLite will be linked
696696
# using -lsqlite3.
697
+#
698
+# Closely related is SQLITE3_ORIGIN, with the same numeric mapping plus
699
+# a value of 2 means that we are building a client-provided sqlite3.c.
697700
SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o
698701
SQLITE3_OBJ.1 =
702
+# SQLITE3_OBJ.2 is set by the configure process
699703
SQLITE3_OBJ. = $(SQLITE3_OBJ.0)
700704
701705
# The FOSSIL_ENABLE_MINIZ variable may be undefined, set to 0, or
702706
# set to 1. If it is set to 1, the miniz library included in the
703707
# source tree should be used; otherwise, it should not.
@@ -717,26 +721,28 @@
717721
718722
# The USE_SEE variable may be undefined, 0 or 1. If undefined or
719723
# 0, ordinary SQLite is used. If 1, then sqlite3-see.c (not part of
720724
# the source tree) is used and extra flags are provided to enable
721725
# the SQLite Encryption Extension.
722
-SQLITE3_SRC.0 = sqlite3.c
723
-SQLITE3_SRC.1 = sqlite3-see.c
724
-SQLITE3_SRC. = sqlite3.c
725
-SQLITE3_SRC = $(SRCDIR)/$(SQLITE3_SRC.$(USE_SEE))
726
-SQLITE3_SHELL_SRC.0 = shell.c
727
-SQLITE3_SHELL_SRC.1 = shell-see.c
728
-SQLITE3_SHELL_SRC. = shell.c
729
-SQLITE3_SHELL_SRC = $(SRCDIR)/$(SQLITE3_SHELL_SRC.$(USE_SEE))
726
+SQLITE3_SRC.0 = $(SRCDIR)/sqlite3.c
727
+SQLITE3_SRC.1 = $(SRCDIR)/sqlite3-see.c
728
+# SQLITE3_SRC.2 is set by top-level configure/makefile process.
729
+SQLITE3_SRC. = $(SRCDIR)/sqlite3.c
730
+SQLITE3_SRC = $(SQLITE3_SRC.$(SQLITE3_ORIGIN))
731
+SQLITE3_SHELL_SRC.0 = $(SRCDIR)/shell.c
732
+SQLITE3_SHELL_SRC.1 = $(SRCDIR)/shell-see.c
733
+# SQLITE3_SHELL_SRC.2 comes from the configure process
734
+SQLITE3_SHELL_SRC. = $(SRCDIR)/shell.c
735
+SQLITE3_SHELL_SRC = $(SQLITE3_SHELL_SRC.$(SQLITE3_ORIGIN))
730736
SEE_FLAGS.0 =
731737
SEE_FLAGS.1 = -DSQLITE_HAS_CODEC -DSQLITE_SHELL_DBKEY_PROC=fossil_key
732738
SEE_FLAGS. =
733739
SEE_FLAGS = $(SEE_FLAGS.$(USE_SEE))
734740
735741
736742
EXTRAOBJ = \
737
- $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) \
743
+ $(SQLITE3_OBJ.$(SQLITE3_ORIGIN)) \
738744
$(MINIZ_OBJ.$(FOSSIL_ENABLE_MINIZ)) \
739745
$(LINENOISE_OBJ.$(USE_LINENOISE)) \
740746
$(OBJDIR)/shell.o \
741747
$(OBJDIR)/th.o \
742748
$(OBJDIR)/th_lang.o \
743749
--- src/main.mk
+++ src/main.mk
@@ -9,11 +9,11 @@
9 #
10 # This file is included by primary Makefile.
11 #
12
13 XBCC = $(BCC) $(BCCFLAGS)
14 XTCC = $(TCC) -I. -I$(SRCDIR) -I$(OBJDIR) $(TCCFLAGS)
15
16 TESTFLAGS := -quiet
17
18 SRC = \
19 $(SRCDIR)/add.c \
@@ -688,16 +688,20 @@
688 # Setup the options used to compile the included miniz library.
689 MINIZ_OPTIONS = -DMINIZ_NO_STDIO \
690 -DMINIZ_NO_TIME \
691 -DMINIZ_NO_ARCHIVE_APIS
692
693 # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set
694 # to 1. If it is set to 1, then there is no need to build or link
695 # the sqlite3.o object. Instead, the system SQLite will be linked
696 # using -lsqlite3.
 
 
 
697 SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o
698 SQLITE3_OBJ.1 =
 
699 SQLITE3_OBJ. = $(SQLITE3_OBJ.0)
700
701 # The FOSSIL_ENABLE_MINIZ variable may be undefined, set to 0, or
702 # set to 1. If it is set to 1, the miniz library included in the
703 # source tree should be used; otherwise, it should not.
@@ -717,26 +721,28 @@
717
718 # The USE_SEE variable may be undefined, 0 or 1. If undefined or
719 # 0, ordinary SQLite is used. If 1, then sqlite3-see.c (not part of
720 # the source tree) is used and extra flags are provided to enable
721 # the SQLite Encryption Extension.
722 SQLITE3_SRC.0 = sqlite3.c
723 SQLITE3_SRC.1 = sqlite3-see.c
724 SQLITE3_SRC. = sqlite3.c
725 SQLITE3_SRC = $(SRCDIR)/$(SQLITE3_SRC.$(USE_SEE))
726 SQLITE3_SHELL_SRC.0 = shell.c
727 SQLITE3_SHELL_SRC.1 = shell-see.c
728 SQLITE3_SHELL_SRC. = shell.c
729 SQLITE3_SHELL_SRC = $(SRCDIR)/$(SQLITE3_SHELL_SRC.$(USE_SEE))
 
 
730 SEE_FLAGS.0 =
731 SEE_FLAGS.1 = -DSQLITE_HAS_CODEC -DSQLITE_SHELL_DBKEY_PROC=fossil_key
732 SEE_FLAGS. =
733 SEE_FLAGS = $(SEE_FLAGS.$(USE_SEE))
734
735
736 EXTRAOBJ = \
737 $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) \
738 $(MINIZ_OBJ.$(FOSSIL_ENABLE_MINIZ)) \
739 $(LINENOISE_OBJ.$(USE_LINENOISE)) \
740 $(OBJDIR)/shell.o \
741 $(OBJDIR)/th.o \
742 $(OBJDIR)/th_lang.o \
743
--- src/main.mk
+++ src/main.mk
@@ -9,11 +9,11 @@
9 #
10 # This file is included by primary Makefile.
11 #
12
13 XBCC = $(BCC) $(BCCFLAGS)
14 XTCC = $(TCC) $(CFLAGS_INCLUDE) -I$(OBJDIR) $(TCCFLAGS)
15
16 TESTFLAGS := -quiet
17
18 SRC = \
19 $(SRCDIR)/add.c \
@@ -688,16 +688,20 @@
688 # Setup the options used to compile the included miniz library.
689 MINIZ_OPTIONS = -DMINIZ_NO_STDIO \
690 -DMINIZ_NO_TIME \
691 -DMINIZ_NO_ARCHIVE_APIS
692
693 # The USE_SYSTEM_SQLITE variable may be undefined, set to 0 or 1.
694 # If it is set to 1, then there is no need to build or link
695 # the sqlite3.o object. Instead, the system SQLite will be linked
696 # using -lsqlite3.
697 #
698 # Closely related is SQLITE3_ORIGIN, with the same numeric mapping plus
699 # a value of 2 means that we are building a client-provided sqlite3.c.
700 SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o
701 SQLITE3_OBJ.1 =
702 # SQLITE3_OBJ.2 is set by the configure process
703 SQLITE3_OBJ. = $(SQLITE3_OBJ.0)
704
705 # The FOSSIL_ENABLE_MINIZ variable may be undefined, set to 0, or
706 # set to 1. If it is set to 1, the miniz library included in the
707 # source tree should be used; otherwise, it should not.
@@ -717,26 +721,28 @@
721
722 # The USE_SEE variable may be undefined, 0 or 1. If undefined or
723 # 0, ordinary SQLite is used. If 1, then sqlite3-see.c (not part of
724 # the source tree) is used and extra flags are provided to enable
725 # the SQLite Encryption Extension.
726 SQLITE3_SRC.0 = $(SRCDIR)/sqlite3.c
727 SQLITE3_SRC.1 = $(SRCDIR)/sqlite3-see.c
728 # SQLITE3_SRC.2 is set by top-level configure/makefile process.
729 SQLITE3_SRC. = $(SRCDIR)/sqlite3.c
730 SQLITE3_SRC = $(SQLITE3_SRC.$(SQLITE3_ORIGIN))
731 SQLITE3_SHELL_SRC.0 = $(SRCDIR)/shell.c
732 SQLITE3_SHELL_SRC.1 = $(SRCDIR)/shell-see.c
733 # SQLITE3_SHELL_SRC.2 comes from the configure process
734 SQLITE3_SHELL_SRC. = $(SRCDIR)/shell.c
735 SQLITE3_SHELL_SRC = $(SQLITE3_SHELL_SRC.$(SQLITE3_ORIGIN))
736 SEE_FLAGS.0 =
737 SEE_FLAGS.1 = -DSQLITE_HAS_CODEC -DSQLITE_SHELL_DBKEY_PROC=fossil_key
738 SEE_FLAGS. =
739 SEE_FLAGS = $(SEE_FLAGS.$(USE_SEE))
740
741
742 EXTRAOBJ = \
743 $(SQLITE3_OBJ.$(SQLITE3_ORIGIN)) \
744 $(MINIZ_OBJ.$(FOSSIL_ENABLE_MINIZ)) \
745 $(LINENOISE_OBJ.$(USE_LINENOISE)) \
746 $(OBJDIR)/shell.o \
747 $(OBJDIR)/th.o \
748 $(OBJDIR)/th_lang.o \
749
+36 -23
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -312,11 +312,11 @@
312312
#
313313
# This file is included by primary Makefile.
314314
#
315315
316316
XBCC = $(BCC) $(BCCFLAGS)
317
-XTCC = $(TCC) -I. -I$(SRCDIR) -I$(OBJDIR) $(TCCFLAGS)
317
+XTCC = $(TCC) $(CFLAGS_INCLUDE) -I$(OBJDIR) $(TCCFLAGS)
318318
319319
TESTFLAGS := -quiet
320320
}
321321
writeln -nonewline "SRC ="
322322
foreach s [lsort $src] {
@@ -403,16 +403,20 @@
403403
SHELL_OPTIONS = <<<SHELL_OPTIONS>>>
404404
405405
# Setup the options used to compile the included miniz library.
406406
MINIZ_OPTIONS = <<<MINIZ_OPTIONS>>>
407407
408
-# The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set
409
-# to 1. If it is set to 1, then there is no need to build or link
408
+# The USE_SYSTEM_SQLITE variable may be undefined, set to 0 or 1.
409
+# If it is set to 1, then there is no need to build or link
410410
# the sqlite3.o object. Instead, the system SQLite will be linked
411411
# using -lsqlite3.
412
+#
413
+# Closely related is SQLITE3_ORIGIN, with the same numeric mapping plus
414
+# a value of 2 means that we are building a client-provided sqlite3.c.
412415
SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o
413416
SQLITE3_OBJ.1 =
417
+# SQLITE3_OBJ.2 is set by the configure process
414418
SQLITE3_OBJ. = $(SQLITE3_OBJ.0)
415419
416420
# The FOSSIL_ENABLE_MINIZ variable may be undefined, set to 0, or
417421
# set to 1. If it is set to 1, the miniz library included in the
418422
# source tree should be used; otherwise, it should not.
@@ -432,27 +436,29 @@
432436
433437
# The USE_SEE variable may be undefined, 0 or 1. If undefined or
434438
# 0, ordinary SQLite is used. If 1, then sqlite3-see.c (not part of
435439
# the source tree) is used and extra flags are provided to enable
436440
# the SQLite Encryption Extension.
437
-SQLITE3_SRC.0 = sqlite3.c
438
-SQLITE3_SRC.1 = sqlite3-see.c
439
-SQLITE3_SRC. = sqlite3.c
440
-SQLITE3_SRC = $(SRCDIR)/$(SQLITE3_SRC.$(USE_SEE))
441
-SQLITE3_SHELL_SRC.0 = shell.c
442
-SQLITE3_SHELL_SRC.1 = shell-see.c
443
-SQLITE3_SHELL_SRC. = shell.c
444
-SQLITE3_SHELL_SRC = $(SRCDIR)/$(SQLITE3_SHELL_SRC.$(USE_SEE))
441
+SQLITE3_SRC.0 = $(SRCDIR)/sqlite3.c
442
+SQLITE3_SRC.1 = $(SRCDIR)/sqlite3-see.c
443
+# SQLITE3_SRC.2 is set by top-level configure/makefile process.
444
+SQLITE3_SRC. = $(SRCDIR)/sqlite3.c
445
+SQLITE3_SRC = $(SQLITE3_SRC.$(SQLITE3_ORIGIN))
446
+SQLITE3_SHELL_SRC.0 = $(SRCDIR)/shell.c
447
+SQLITE3_SHELL_SRC.1 = $(SRCDIR)/shell-see.c
448
+# SQLITE3_SHELL_SRC.2 comes from the configure process
449
+SQLITE3_SHELL_SRC. = $(SRCDIR)/shell.c
450
+SQLITE3_SHELL_SRC = $(SQLITE3_SHELL_SRC.$(SQLITE3_ORIGIN))
445451
SEE_FLAGS.0 =
446452
SEE_FLAGS.1 = -DSQLITE_HAS_CODEC -DSQLITE_SHELL_DBKEY_PROC=fossil_key
447453
SEE_FLAGS. =
448454
SEE_FLAGS = $(SEE_FLAGS.$(USE_SEE))
449455
}]
450456
451457
writeln [string map [list <<<NEXT_LINE>>> \\] {
452458
EXTRAOBJ = <<<NEXT_LINE>>>
453
- $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) <<<NEXT_LINE>>>
459
+ $(SQLITE3_OBJ.$(SQLITE3_ORIGIN)) <<<NEXT_LINE>>>
454460
$(MINIZ_OBJ.$(FOSSIL_ENABLE_MINIZ)) <<<NEXT_LINE>>>
455461
$(LINENOISE_OBJ.$(USE_LINENOISE)) <<<NEXT_LINE>>>
456462
$(OBJDIR)/shell.o <<<NEXT_LINE>>>
457463
$(OBJDIR)/th.o <<<NEXT_LINE>>>
458464
$(OBJDIR)/th_lang.o <<<NEXT_LINE>>>
@@ -1103,16 +1109,21 @@
11031109
$(MKVERSION) $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$@
11041110
11051111
$(OBJDIR)/phony.h:
11061112
# Force rebuild of VERSION.h every time "make" is run
11071113
1108
-# The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set
1109
-# to 1. If it is set to 1, then there is no need to build or link
1114
+# The USE_SYSTEM_SQLITE variable may be undefined, set to 0 or 1.
1115
+# If it is set to 1, then there is no need to build or link
11101116
# the sqlite3.o object. Instead, the system SQLite will be linked
11111117
# using -lsqlite3.
1118
+#
1119
+# Closely related is SQLITE3_ORIGIN, with the same 0/1 mapping,
1120
+# plus a value of 2 means that we are building a client-provided
1121
+# sqlite3.c.
11121122
SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o
11131123
SQLITE3_OBJ.1 =
1124
+# SQLITE3_OBJ.2 is set by the configure process
11141125
SQLITE3_OBJ. = $(SQLITE3_OBJ.0)
11151126
11161127
# The FOSSIL_ENABLE_MINIZ variable may be undefined, set to 0, or
11171128
# set to 1. If it is set to 1, the miniz library included in the
11181129
# source tree should be used; otherwise, it should not.
@@ -1122,27 +1133,29 @@
11221133
11231134
# The USE_SEE variable may be undefined, 0 or 1. If undefined or
11241135
# 0, ordinary SQLite is used. If 1, then sqlite3-see.c (not part of
11251136
# the source tree) is used and extra flags are provided to enable
11261137
# the SQLite Encryption Extension.
1127
-SQLITE3_SRC.0 = sqlite3.c
1128
-SQLITE3_SRC.1 = sqlite3-see.c
1129
-SQLITE3_SRC. = sqlite3.c
1130
-SQLITE3_SRC = $(SRCDIR)/$(SQLITE3_SRC.$(USE_SEE))
1131
-SQLITE3_SHELL_SRC.0 = shell.c
1132
-SQLITE3_SHELL_SRC.1 = shell-see.c
1133
-SQLITE3_SHELL_SRC. = shell.c
1134
-SQLITE3_SHELL_SRC = $(SRCDIR)/$(SQLITE3_SHELL_SRC.$(USE_SEE))
1138
+SQLITE3_SRC.0 = $(SRCDIR)/sqlite3.c
1139
+SQLITE3_SRC.1 = $(SRCDIR)/sqlite3-see.c
1140
+# SQLITE3_SRC.2 is set by top-level configure/makefile process.
1141
+SQLITE3_SRC. = $(SRCDIR)/sqlite3.c
1142
+SQLITE3_SRC = $(SRCDIR)/$(SQLITE3_SRC.$(SQLITE3_ORIGIN))
1143
+SQLITE3_SHELL_SRC.0 = $(SRCDIR)/shell.c
1144
+SQLITE3_SHELL_SRC.1 = $(SRCDIR)/shell-see.c
1145
+# SQLITE3_SHELL_SRC.2 comes from the configure process
1146
+SQLITE3_SHELL_SRC. = $(SRCDIR)/shell.c
1147
+SQLITE3_SHELL_SRC = $(SQLITE3_SHELL_SRC.$(SQLITE3_ORIGIN))
11351148
SEE_FLAGS.0 =
11361149
SEE_FLAGS.1 = -DSQLITE_HAS_CODEC -DSQLITE_SHELL_DBKEY_PROC=fossil_key
11371150
SEE_FLAGS. =
11381151
SEE_FLAGS = $(SEE_FLAGS.$(USE_SEE))
11391152
}
11401153
11411154
writeln [string map [list <<<NEXT_LINE>>> \\] {
11421155
EXTRAOBJ = <<<NEXT_LINE>>>
1143
- $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) <<<NEXT_LINE>>>
1156
+ $(SQLITE3_OBJ.$(SQLITE3_ORIGIN)) <<<NEXT_LINE>>>
11441157
$(MINIZ_OBJ.$(FOSSIL_ENABLE_MINIZ)) <<<NEXT_LINE>>>
11451158
$(OBJDIR)/shell.o <<<NEXT_LINE>>>
11461159
$(OBJDIR)/th.o <<<NEXT_LINE>>>
11471160
$(OBJDIR)/th_lang.o <<<NEXT_LINE>>>
11481161
$(OBJDIR)/th_tcl.o <<<NEXT_LINE>>>
11491162
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -312,11 +312,11 @@
312 #
313 # This file is included by primary Makefile.
314 #
315
316 XBCC = $(BCC) $(BCCFLAGS)
317 XTCC = $(TCC) -I. -I$(SRCDIR) -I$(OBJDIR) $(TCCFLAGS)
318
319 TESTFLAGS := -quiet
320 }
321 writeln -nonewline "SRC ="
322 foreach s [lsort $src] {
@@ -403,16 +403,20 @@
403 SHELL_OPTIONS = <<<SHELL_OPTIONS>>>
404
405 # Setup the options used to compile the included miniz library.
406 MINIZ_OPTIONS = <<<MINIZ_OPTIONS>>>
407
408 # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set
409 # to 1. If it is set to 1, then there is no need to build or link
410 # the sqlite3.o object. Instead, the system SQLite will be linked
411 # using -lsqlite3.
 
 
 
412 SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o
413 SQLITE3_OBJ.1 =
 
414 SQLITE3_OBJ. = $(SQLITE3_OBJ.0)
415
416 # The FOSSIL_ENABLE_MINIZ variable may be undefined, set to 0, or
417 # set to 1. If it is set to 1, the miniz library included in the
418 # source tree should be used; otherwise, it should not.
@@ -432,27 +436,29 @@
432
433 # The USE_SEE variable may be undefined, 0 or 1. If undefined or
434 # 0, ordinary SQLite is used. If 1, then sqlite3-see.c (not part of
435 # the source tree) is used and extra flags are provided to enable
436 # the SQLite Encryption Extension.
437 SQLITE3_SRC.0 = sqlite3.c
438 SQLITE3_SRC.1 = sqlite3-see.c
439 SQLITE3_SRC. = sqlite3.c
440 SQLITE3_SRC = $(SRCDIR)/$(SQLITE3_SRC.$(USE_SEE))
441 SQLITE3_SHELL_SRC.0 = shell.c
442 SQLITE3_SHELL_SRC.1 = shell-see.c
443 SQLITE3_SHELL_SRC. = shell.c
444 SQLITE3_SHELL_SRC = $(SRCDIR)/$(SQLITE3_SHELL_SRC.$(USE_SEE))
 
 
445 SEE_FLAGS.0 =
446 SEE_FLAGS.1 = -DSQLITE_HAS_CODEC -DSQLITE_SHELL_DBKEY_PROC=fossil_key
447 SEE_FLAGS. =
448 SEE_FLAGS = $(SEE_FLAGS.$(USE_SEE))
449 }]
450
451 writeln [string map [list <<<NEXT_LINE>>> \\] {
452 EXTRAOBJ = <<<NEXT_LINE>>>
453 $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) <<<NEXT_LINE>>>
454 $(MINIZ_OBJ.$(FOSSIL_ENABLE_MINIZ)) <<<NEXT_LINE>>>
455 $(LINENOISE_OBJ.$(USE_LINENOISE)) <<<NEXT_LINE>>>
456 $(OBJDIR)/shell.o <<<NEXT_LINE>>>
457 $(OBJDIR)/th.o <<<NEXT_LINE>>>
458 $(OBJDIR)/th_lang.o <<<NEXT_LINE>>>
@@ -1103,16 +1109,21 @@
1103 $(MKVERSION) $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$@
1104
1105 $(OBJDIR)/phony.h:
1106 # Force rebuild of VERSION.h every time "make" is run
1107
1108 # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set
1109 # to 1. If it is set to 1, then there is no need to build or link
1110 # the sqlite3.o object. Instead, the system SQLite will be linked
1111 # using -lsqlite3.
 
 
 
 
1112 SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o
1113 SQLITE3_OBJ.1 =
 
1114 SQLITE3_OBJ. = $(SQLITE3_OBJ.0)
1115
1116 # The FOSSIL_ENABLE_MINIZ variable may be undefined, set to 0, or
1117 # set to 1. If it is set to 1, the miniz library included in the
1118 # source tree should be used; otherwise, it should not.
@@ -1122,27 +1133,29 @@
1122
1123 # The USE_SEE variable may be undefined, 0 or 1. If undefined or
1124 # 0, ordinary SQLite is used. If 1, then sqlite3-see.c (not part of
1125 # the source tree) is used and extra flags are provided to enable
1126 # the SQLite Encryption Extension.
1127 SQLITE3_SRC.0 = sqlite3.c
1128 SQLITE3_SRC.1 = sqlite3-see.c
1129 SQLITE3_SRC. = sqlite3.c
1130 SQLITE3_SRC = $(SRCDIR)/$(SQLITE3_SRC.$(USE_SEE))
1131 SQLITE3_SHELL_SRC.0 = shell.c
1132 SQLITE3_SHELL_SRC.1 = shell-see.c
1133 SQLITE3_SHELL_SRC. = shell.c
1134 SQLITE3_SHELL_SRC = $(SRCDIR)/$(SQLITE3_SHELL_SRC.$(USE_SEE))
 
 
1135 SEE_FLAGS.0 =
1136 SEE_FLAGS.1 = -DSQLITE_HAS_CODEC -DSQLITE_SHELL_DBKEY_PROC=fossil_key
1137 SEE_FLAGS. =
1138 SEE_FLAGS = $(SEE_FLAGS.$(USE_SEE))
1139 }
1140
1141 writeln [string map [list <<<NEXT_LINE>>> \\] {
1142 EXTRAOBJ = <<<NEXT_LINE>>>
1143 $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) <<<NEXT_LINE>>>
1144 $(MINIZ_OBJ.$(FOSSIL_ENABLE_MINIZ)) <<<NEXT_LINE>>>
1145 $(OBJDIR)/shell.o <<<NEXT_LINE>>>
1146 $(OBJDIR)/th.o <<<NEXT_LINE>>>
1147 $(OBJDIR)/th_lang.o <<<NEXT_LINE>>>
1148 $(OBJDIR)/th_tcl.o <<<NEXT_LINE>>>
1149
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -312,11 +312,11 @@
312 #
313 # This file is included by primary Makefile.
314 #
315
316 XBCC = $(BCC) $(BCCFLAGS)
317 XTCC = $(TCC) $(CFLAGS_INCLUDE) -I$(OBJDIR) $(TCCFLAGS)
318
319 TESTFLAGS := -quiet
320 }
321 writeln -nonewline "SRC ="
322 foreach s [lsort $src] {
@@ -403,16 +403,20 @@
403 SHELL_OPTIONS = <<<SHELL_OPTIONS>>>
404
405 # Setup the options used to compile the included miniz library.
406 MINIZ_OPTIONS = <<<MINIZ_OPTIONS>>>
407
408 # The USE_SYSTEM_SQLITE variable may be undefined, set to 0 or 1.
409 # If it is set to 1, then there is no need to build or link
410 # the sqlite3.o object. Instead, the system SQLite will be linked
411 # using -lsqlite3.
412 #
413 # Closely related is SQLITE3_ORIGIN, with the same numeric mapping plus
414 # a value of 2 means that we are building a client-provided sqlite3.c.
415 SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o
416 SQLITE3_OBJ.1 =
417 # SQLITE3_OBJ.2 is set by the configure process
418 SQLITE3_OBJ. = $(SQLITE3_OBJ.0)
419
420 # The FOSSIL_ENABLE_MINIZ variable may be undefined, set to 0, or
421 # set to 1. If it is set to 1, the miniz library included in the
422 # source tree should be used; otherwise, it should not.
@@ -432,27 +436,29 @@
436
437 # The USE_SEE variable may be undefined, 0 or 1. If undefined or
438 # 0, ordinary SQLite is used. If 1, then sqlite3-see.c (not part of
439 # the source tree) is used and extra flags are provided to enable
440 # the SQLite Encryption Extension.
441 SQLITE3_SRC.0 = $(SRCDIR)/sqlite3.c
442 SQLITE3_SRC.1 = $(SRCDIR)/sqlite3-see.c
443 # SQLITE3_SRC.2 is set by top-level configure/makefile process.
444 SQLITE3_SRC. = $(SRCDIR)/sqlite3.c
445 SQLITE3_SRC = $(SQLITE3_SRC.$(SQLITE3_ORIGIN))
446 SQLITE3_SHELL_SRC.0 = $(SRCDIR)/shell.c
447 SQLITE3_SHELL_SRC.1 = $(SRCDIR)/shell-see.c
448 # SQLITE3_SHELL_SRC.2 comes from the configure process
449 SQLITE3_SHELL_SRC. = $(SRCDIR)/shell.c
450 SQLITE3_SHELL_SRC = $(SQLITE3_SHELL_SRC.$(SQLITE3_ORIGIN))
451 SEE_FLAGS.0 =
452 SEE_FLAGS.1 = -DSQLITE_HAS_CODEC -DSQLITE_SHELL_DBKEY_PROC=fossil_key
453 SEE_FLAGS. =
454 SEE_FLAGS = $(SEE_FLAGS.$(USE_SEE))
455 }]
456
457 writeln [string map [list <<<NEXT_LINE>>> \\] {
458 EXTRAOBJ = <<<NEXT_LINE>>>
459 $(SQLITE3_OBJ.$(SQLITE3_ORIGIN)) <<<NEXT_LINE>>>
460 $(MINIZ_OBJ.$(FOSSIL_ENABLE_MINIZ)) <<<NEXT_LINE>>>
461 $(LINENOISE_OBJ.$(USE_LINENOISE)) <<<NEXT_LINE>>>
462 $(OBJDIR)/shell.o <<<NEXT_LINE>>>
463 $(OBJDIR)/th.o <<<NEXT_LINE>>>
464 $(OBJDIR)/th_lang.o <<<NEXT_LINE>>>
@@ -1103,16 +1109,21 @@
1109 $(MKVERSION) $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$@
1110
1111 $(OBJDIR)/phony.h:
1112 # Force rebuild of VERSION.h every time "make" is run
1113
1114 # The USE_SYSTEM_SQLITE variable may be undefined, set to 0 or 1.
1115 # If it is set to 1, then there is no need to build or link
1116 # the sqlite3.o object. Instead, the system SQLite will be linked
1117 # using -lsqlite3.
1118 #
1119 # Closely related is SQLITE3_ORIGIN, with the same 0/1 mapping,
1120 # plus a value of 2 means that we are building a client-provided
1121 # sqlite3.c.
1122 SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o
1123 SQLITE3_OBJ.1 =
1124 # SQLITE3_OBJ.2 is set by the configure process
1125 SQLITE3_OBJ. = $(SQLITE3_OBJ.0)
1126
1127 # The FOSSIL_ENABLE_MINIZ variable may be undefined, set to 0, or
1128 # set to 1. If it is set to 1, the miniz library included in the
1129 # source tree should be used; otherwise, it should not.
@@ -1122,27 +1133,29 @@
1133
1134 # The USE_SEE variable may be undefined, 0 or 1. If undefined or
1135 # 0, ordinary SQLite is used. If 1, then sqlite3-see.c (not part of
1136 # the source tree) is used and extra flags are provided to enable
1137 # the SQLite Encryption Extension.
1138 SQLITE3_SRC.0 = $(SRCDIR)/sqlite3.c
1139 SQLITE3_SRC.1 = $(SRCDIR)/sqlite3-see.c
1140 # SQLITE3_SRC.2 is set by top-level configure/makefile process.
1141 SQLITE3_SRC. = $(SRCDIR)/sqlite3.c
1142 SQLITE3_SRC = $(SRCDIR)/$(SQLITE3_SRC.$(SQLITE3_ORIGIN))
1143 SQLITE3_SHELL_SRC.0 = $(SRCDIR)/shell.c
1144 SQLITE3_SHELL_SRC.1 = $(SRCDIR)/shell-see.c
1145 # SQLITE3_SHELL_SRC.2 comes from the configure process
1146 SQLITE3_SHELL_SRC. = $(SRCDIR)/shell.c
1147 SQLITE3_SHELL_SRC = $(SQLITE3_SHELL_SRC.$(SQLITE3_ORIGIN))
1148 SEE_FLAGS.0 =
1149 SEE_FLAGS.1 = -DSQLITE_HAS_CODEC -DSQLITE_SHELL_DBKEY_PROC=fossil_key
1150 SEE_FLAGS. =
1151 SEE_FLAGS = $(SEE_FLAGS.$(USE_SEE))
1152 }
1153
1154 writeln [string map [list <<<NEXT_LINE>>> \\] {
1155 EXTRAOBJ = <<<NEXT_LINE>>>
1156 $(SQLITE3_OBJ.$(SQLITE3_ORIGIN)) <<<NEXT_LINE>>>
1157 $(MINIZ_OBJ.$(FOSSIL_ENABLE_MINIZ)) <<<NEXT_LINE>>>
1158 $(OBJDIR)/shell.o <<<NEXT_LINE>>>
1159 $(OBJDIR)/th.o <<<NEXT_LINE>>>
1160 $(OBJDIR)/th_lang.o <<<NEXT_LINE>>>
1161 $(OBJDIR)/th_tcl.o <<<NEXT_LINE>>>
1162
+18 -11
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -1083,16 +1083,21 @@
10831083
$(MKVERSION) $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$@
10841084
10851085
$(OBJDIR)/phony.h:
10861086
# Force rebuild of VERSION.h every time "make" is run
10871087
1088
-# The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set
1089
-# to 1. If it is set to 1, then there is no need to build or link
1088
+# The USE_SYSTEM_SQLITE variable may be undefined, set to 0 or 1.
1089
+# If it is set to 1, then there is no need to build or link
10901090
# the sqlite3.o object. Instead, the system SQLite will be linked
10911091
# using -lsqlite3.
1092
+#
1093
+# Closely related is SQLITE3_ORIGIN, with the same 0/1 mapping,
1094
+# plus a value of 2 means that we are building a client-provided
1095
+# sqlite3.c.
10921096
SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o
10931097
SQLITE3_OBJ.1 =
1098
+# SQLITE3_OBJ.2 is set by the configure process
10941099
SQLITE3_OBJ. = $(SQLITE3_OBJ.0)
10951100
10961101
# The FOSSIL_ENABLE_MINIZ variable may be undefined, set to 0, or
10971102
# set to 1. If it is set to 1, the miniz library included in the
10981103
# source tree should be used; otherwise, it should not.
@@ -1102,26 +1107,28 @@
11021107
11031108
# The USE_SEE variable may be undefined, 0 or 1. If undefined or
11041109
# 0, ordinary SQLite is used. If 1, then sqlite3-see.c (not part of
11051110
# the source tree) is used and extra flags are provided to enable
11061111
# the SQLite Encryption Extension.
1107
-SQLITE3_SRC.0 = sqlite3.c
1108
-SQLITE3_SRC.1 = sqlite3-see.c
1109
-SQLITE3_SRC. = sqlite3.c
1110
-SQLITE3_SRC = $(SRCDIR)/$(SQLITE3_SRC.$(USE_SEE))
1111
-SQLITE3_SHELL_SRC.0 = shell.c
1112
-SQLITE3_SHELL_SRC.1 = shell-see.c
1113
-SQLITE3_SHELL_SRC. = shell.c
1114
-SQLITE3_SHELL_SRC = $(SRCDIR)/$(SQLITE3_SHELL_SRC.$(USE_SEE))
1112
+SQLITE3_SRC.0 = $(SRCDIR)/sqlite3.c
1113
+SQLITE3_SRC.1 = $(SRCDIR)/sqlite3-see.c
1114
+# SQLITE3_SRC.2 is set by top-level configure/makefile process.
1115
+SQLITE3_SRC. = $(SRCDIR)/sqlite3.c
1116
+SQLITE3_SRC = $(SRCDIR)/$(SQLITE3_SRC.$(SQLITE3_ORIGIN))
1117
+SQLITE3_SHELL_SRC.0 = $(SRCDIR)/shell.c
1118
+SQLITE3_SHELL_SRC.1 = $(SRCDIR)/shell-see.c
1119
+# SQLITE3_SHELL_SRC.2 comes from the configure process
1120
+SQLITE3_SHELL_SRC. = $(SRCDIR)/shell.c
1121
+SQLITE3_SHELL_SRC = $(SQLITE3_SHELL_SRC.$(SQLITE3_ORIGIN))
11151122
SEE_FLAGS.0 =
11161123
SEE_FLAGS.1 = -DSQLITE_HAS_CODEC -DSQLITE_SHELL_DBKEY_PROC=fossil_key
11171124
SEE_FLAGS. =
11181125
SEE_FLAGS = $(SEE_FLAGS.$(USE_SEE))
11191126
11201127
11211128
EXTRAOBJ = \
1122
- $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) \
1129
+ $(SQLITE3_OBJ.$(SQLITE3_ORIGIN)) \
11231130
$(MINIZ_OBJ.$(FOSSIL_ENABLE_MINIZ)) \
11241131
$(OBJDIR)/shell.o \
11251132
$(OBJDIR)/th.o \
11261133
$(OBJDIR)/th_lang.o \
11271134
$(OBJDIR)/th_tcl.o \
11281135
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -1083,16 +1083,21 @@
1083 $(MKVERSION) $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$@
1084
1085 $(OBJDIR)/phony.h:
1086 # Force rebuild of VERSION.h every time "make" is run
1087
1088 # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set
1089 # to 1. If it is set to 1, then there is no need to build or link
1090 # the sqlite3.o object. Instead, the system SQLite will be linked
1091 # using -lsqlite3.
 
 
 
 
1092 SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o
1093 SQLITE3_OBJ.1 =
 
1094 SQLITE3_OBJ. = $(SQLITE3_OBJ.0)
1095
1096 # The FOSSIL_ENABLE_MINIZ variable may be undefined, set to 0, or
1097 # set to 1. If it is set to 1, the miniz library included in the
1098 # source tree should be used; otherwise, it should not.
@@ -1102,26 +1107,28 @@
1102
1103 # The USE_SEE variable may be undefined, 0 or 1. If undefined or
1104 # 0, ordinary SQLite is used. If 1, then sqlite3-see.c (not part of
1105 # the source tree) is used and extra flags are provided to enable
1106 # the SQLite Encryption Extension.
1107 SQLITE3_SRC.0 = sqlite3.c
1108 SQLITE3_SRC.1 = sqlite3-see.c
1109 SQLITE3_SRC. = sqlite3.c
1110 SQLITE3_SRC = $(SRCDIR)/$(SQLITE3_SRC.$(USE_SEE))
1111 SQLITE3_SHELL_SRC.0 = shell.c
1112 SQLITE3_SHELL_SRC.1 = shell-see.c
1113 SQLITE3_SHELL_SRC. = shell.c
1114 SQLITE3_SHELL_SRC = $(SRCDIR)/$(SQLITE3_SHELL_SRC.$(USE_SEE))
 
 
1115 SEE_FLAGS.0 =
1116 SEE_FLAGS.1 = -DSQLITE_HAS_CODEC -DSQLITE_SHELL_DBKEY_PROC=fossil_key
1117 SEE_FLAGS. =
1118 SEE_FLAGS = $(SEE_FLAGS.$(USE_SEE))
1119
1120
1121 EXTRAOBJ = \
1122 $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) \
1123 $(MINIZ_OBJ.$(FOSSIL_ENABLE_MINIZ)) \
1124 $(OBJDIR)/shell.o \
1125 $(OBJDIR)/th.o \
1126 $(OBJDIR)/th_lang.o \
1127 $(OBJDIR)/th_tcl.o \
1128
--- win/Makefile.mingw
+++ win/Makefile.mingw
@@ -1083,16 +1083,21 @@
1083 $(MKVERSION) $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$@
1084
1085 $(OBJDIR)/phony.h:
1086 # Force rebuild of VERSION.h every time "make" is run
1087
1088 # The USE_SYSTEM_SQLITE variable may be undefined, set to 0 or 1.
1089 # If it is set to 1, then there is no need to build or link
1090 # the sqlite3.o object. Instead, the system SQLite will be linked
1091 # using -lsqlite3.
1092 #
1093 # Closely related is SQLITE3_ORIGIN, with the same 0/1 mapping,
1094 # plus a value of 2 means that we are building a client-provided
1095 # sqlite3.c.
1096 SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o
1097 SQLITE3_OBJ.1 =
1098 # SQLITE3_OBJ.2 is set by the configure process
1099 SQLITE3_OBJ. = $(SQLITE3_OBJ.0)
1100
1101 # The FOSSIL_ENABLE_MINIZ variable may be undefined, set to 0, or
1102 # set to 1. If it is set to 1, the miniz library included in the
1103 # source tree should be used; otherwise, it should not.
@@ -1102,26 +1107,28 @@
1107
1108 # The USE_SEE variable may be undefined, 0 or 1. If undefined or
1109 # 0, ordinary SQLite is used. If 1, then sqlite3-see.c (not part of
1110 # the source tree) is used and extra flags are provided to enable
1111 # the SQLite Encryption Extension.
1112 SQLITE3_SRC.0 = $(SRCDIR)/sqlite3.c
1113 SQLITE3_SRC.1 = $(SRCDIR)/sqlite3-see.c
1114 # SQLITE3_SRC.2 is set by top-level configure/makefile process.
1115 SQLITE3_SRC. = $(SRCDIR)/sqlite3.c
1116 SQLITE3_SRC = $(SRCDIR)/$(SQLITE3_SRC.$(SQLITE3_ORIGIN))
1117 SQLITE3_SHELL_SRC.0 = $(SRCDIR)/shell.c
1118 SQLITE3_SHELL_SRC.1 = $(SRCDIR)/shell-see.c
1119 # SQLITE3_SHELL_SRC.2 comes from the configure process
1120 SQLITE3_SHELL_SRC. = $(SRCDIR)/shell.c
1121 SQLITE3_SHELL_SRC = $(SQLITE3_SHELL_SRC.$(SQLITE3_ORIGIN))
1122 SEE_FLAGS.0 =
1123 SEE_FLAGS.1 = -DSQLITE_HAS_CODEC -DSQLITE_SHELL_DBKEY_PROC=fossil_key
1124 SEE_FLAGS. =
1125 SEE_FLAGS = $(SEE_FLAGS.$(USE_SEE))
1126
1127
1128 EXTRAOBJ = \
1129 $(SQLITE3_OBJ.$(SQLITE3_ORIGIN)) \
1130 $(MINIZ_OBJ.$(FOSSIL_ENABLE_MINIZ)) \
1131 $(OBJDIR)/shell.o \
1132 $(OBJDIR)/th.o \
1133 $(OBJDIR)/th_lang.o \
1134 $(OBJDIR)/th_tcl.o \
1135

Keyboard Shortcuts

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