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).
Commit
31d431e358b3b8571cfa6c8eaa244e7bdd2c1576a9ff9f8800c3aadb309a0b6e
Parent
dfa758b016a90cf…
5 files changed
+10
+51
-15
+18
-12
+36
-23
+18
-11
+10
| --- Makefile.in | ||
| +++ Makefile.in | ||
| @@ -37,15 +37,25 @@ | ||
| 37 | 37 | # care about testing the end result, this can be blank. |
| 38 | 38 | # |
| 39 | 39 | TCLSH = @TCLSH@ |
| 40 | 40 | |
| 41 | 41 | CFLAGS = @CFLAGS@ |
| 42 | +CFLAGS_INCLUDE = @CFLAGS_INCLUDE@ | |
| 42 | 43 | LIB = @LDFLAGS@ @EXTRA_LDFLAGS@ @LIBS@ |
| 43 | 44 | BCCFLAGS = @CPPFLAGS@ $(CFLAGS) |
| 44 | 45 | TCCFLAGS = @EXTRA_CFLAGS@ @CPPFLAGS@ $(CFLAGS) -DHAVE_AUTOCONFIG_H -D_HAVE_SQLITE_CONFIG_H |
| 45 | 46 | INSTALLDIR = $(DESTDIR)@prefix@/bin |
| 46 | 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) | |
| 47 | 57 | USE_LINENOISE = @USE_LINENOISE@ |
| 48 | 58 | USE_MMAN_H = @USE_MMAN_H@ |
| 49 | 59 | USE_SEE = @USE_SEE@ |
| 50 | 60 | FOSSIL_ENABLE_MINIZ = @FOSSIL_ENABLE_MINIZ@ |
| 51 | 61 | APPNAME = fossil |
| 52 | 62 |
| --- 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 |
M
auto.def
+51
-15
| --- auto.def | ||
| +++ auto.def | ||
| @@ -9,11 +9,11 @@ | ||
| 9 | 9 | => {Look for OpenSSL in the given path, automatically, in the source tree, or none} |
| 10 | 10 | with-miniz=0 => {Use miniz from the source tree} |
| 11 | 11 | with-zlib:path|auto|tree |
| 12 | 12 | => {Look for zlib in the given path, automatically, or in the source tree} |
| 13 | 13 | 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.} | |
| 15 | 15 | with-exec-rel-paths=0 |
| 16 | 16 | => {Enable relative paths for external diff/gdiff} |
| 17 | 17 | with-sanitizer: => {Build with C compiler's -fsanitize=LIST; e.g. address,enum,null,undefined} |
| 18 | 18 | with-th1-docs=0 => {Enable TH1 for embedded documentation pages} |
| 19 | 19 | with-th1-hooks=0 => {Enable TH1 hooks for commands and web pages} |
| @@ -103,11 +103,12 @@ | ||
| 103 | 103 | define USE_SYSTEM_SQLITE 0 |
| 104 | 104 | define USE_LINENOISE 0 |
| 105 | 105 | define FOSSIL_ENABLE_MINIZ 0 |
| 106 | 106 | define USE_MMAN_H 0 |
| 107 | 107 | define USE_SEE 0 |
| 108 | - | |
| 108 | +define SQLITE3_ORIGIN 0 | |
| 109 | +# SQLITE3_ORIGIN 0 = src/sqlite3, 1=src/sqlite3-see.c, 2=client-provided | |
| 109 | 110 | |
| 110 | 111 | # Maintain the C89/C90-style order of variable declarations before statements. |
| 111 | 112 | # Check if the compiler supports the respective warning flag. |
| 112 | 113 | if {[cctest -cflags -Wdeclaration-after-statement]} { |
| 113 | 114 | define-append EXTRA_CFLAGS -Wdeclaration-after-statement |
| @@ -259,10 +260,11 @@ | ||
| 259 | 260 | } |
| 260 | 261 | |
| 261 | 262 | if {[opt-bool with-see]} { |
| 262 | 263 | define-append EXTRA_CFLAGS -DUSE_SEE |
| 263 | 264 | define USE_SEE 1 |
| 265 | + define SQLITE3_ORIGIN 1 | |
| 264 | 266 | msg-result "Enabling encryption support" |
| 265 | 267 | } |
| 266 | 268 | |
| 267 | 269 | if {[opt-bool json]} { |
| 268 | 270 | # Reminder/FIXME (stephan): FOSSIL_ENABLE_JSON |
| @@ -451,45 +453,79 @@ | ||
| 451 | 453 | if {[info exists ::zlib_lib]} { |
| 452 | 454 | define-append LIBS $::zlib_lib |
| 453 | 455 | } |
| 454 | 456 | } |
| 455 | 457 | |
| 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. | |
| 457 | 471 | set sq3path [opt-val with-sqlite] |
| 458 | 472 | if {$sq3path in {tree ""}} { |
| 459 | 473 | msg-result "Using sqlite3.c from this source tree." |
| 460 | 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 | |
| 461 | 484 | 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 | |
| 468 | 504 | # ^^^ additional -lXXX flags are conservative estimates |
| 469 | 505 | msg-result "Using sqlite3.o from $sq3path" |
| 470 | 506 | } elseif { ([llength [glob -directory $sq3path/lib libsqlite3*]] != 0) \ |
| 471 | 507 | && ([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* | |
| 473 | 509 | # 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 | |
| 476 | 512 | # ^^^ additional -lXXX flags are conservative estimates |
| 477 | 513 | msg-result "Using -lsqlite3 from $sq3path" |
| 478 | 514 | } else { |
| 479 | 515 | # Assume $sq3path holds both the lib and header |
| 480 | 516 | 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 | |
| 483 | 519 | # ^^^ additional -lXXX flags are conservative estimates |
| 484 | 520 | msg-result "Using -lsqlite3 from $sq3path" |
| 485 | 521 | } |
| 486 | 522 | } elseif {![cc-check-includes sqlite3.h] || ![check-function-in-lib sqlite3_open_v2 sqlite3]} { |
| 487 | 523 | user-error "libsqlite3 not found please install it or specify the location with --with-sqlite" |
| 488 | 524 | } |
| 489 | - define USE_SYSTEM_SQLITE 1 | |
| 490 | 525 | } |
| 526 | +define-append CFLAGS_INCLUDE {-I. -I$(SRCDIR)} | |
| 491 | 527 | |
| 492 | 528 | set tclpath [opt-val with-tcl] |
| 493 | 529 | if {$tclpath ne ""} { |
| 494 | 530 | set tclprivatestubs [opt-bool with-tcl-private-stubs] |
| 495 | 531 | # Note parse-tclconfig-sh is in autosetup/local.tcl |
| 496 | 532 |
| --- 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 @@ | ||
| 9 | 9 | # |
| 10 | 10 | # This file is included by primary Makefile. |
| 11 | 11 | # |
| 12 | 12 | |
| 13 | 13 | XBCC = $(BCC) $(BCCFLAGS) |
| 14 | -XTCC = $(TCC) -I. -I$(SRCDIR) -I$(OBJDIR) $(TCCFLAGS) | |
| 14 | +XTCC = $(TCC) $(CFLAGS_INCLUDE) -I$(OBJDIR) $(TCCFLAGS) | |
| 15 | 15 | |
| 16 | 16 | TESTFLAGS := -quiet |
| 17 | 17 | |
| 18 | 18 | SRC = \ |
| 19 | 19 | $(SRCDIR)/add.c \ |
| @@ -688,16 +688,20 @@ | ||
| 688 | 688 | # Setup the options used to compile the included miniz library. |
| 689 | 689 | MINIZ_OPTIONS = -DMINIZ_NO_STDIO \ |
| 690 | 690 | -DMINIZ_NO_TIME \ |
| 691 | 691 | -DMINIZ_NO_ARCHIVE_APIS |
| 692 | 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 | |
| 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 | 695 | # the sqlite3.o object. Instead, the system SQLite will be linked |
| 696 | 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. | |
| 697 | 700 | SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o |
| 698 | 701 | SQLITE3_OBJ.1 = |
| 702 | +# SQLITE3_OBJ.2 is set by the configure process | |
| 699 | 703 | SQLITE3_OBJ. = $(SQLITE3_OBJ.0) |
| 700 | 704 | |
| 701 | 705 | # The FOSSIL_ENABLE_MINIZ variable may be undefined, set to 0, or |
| 702 | 706 | # set to 1. If it is set to 1, the miniz library included in the |
| 703 | 707 | # source tree should be used; otherwise, it should not. |
| @@ -717,26 +721,28 @@ | ||
| 717 | 721 | |
| 718 | 722 | # The USE_SEE variable may be undefined, 0 or 1. If undefined or |
| 719 | 723 | # 0, ordinary SQLite is used. If 1, then sqlite3-see.c (not part of |
| 720 | 724 | # the source tree) is used and extra flags are provided to enable |
| 721 | 725 | # 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)) | |
| 730 | 736 | SEE_FLAGS.0 = |
| 731 | 737 | SEE_FLAGS.1 = -DSQLITE_HAS_CODEC -DSQLITE_SHELL_DBKEY_PROC=fossil_key |
| 732 | 738 | SEE_FLAGS. = |
| 733 | 739 | SEE_FLAGS = $(SEE_FLAGS.$(USE_SEE)) |
| 734 | 740 | |
| 735 | 741 | |
| 736 | 742 | EXTRAOBJ = \ |
| 737 | - $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) \ | |
| 743 | + $(SQLITE3_OBJ.$(SQLITE3_ORIGIN)) \ | |
| 738 | 744 | $(MINIZ_OBJ.$(FOSSIL_ENABLE_MINIZ)) \ |
| 739 | 745 | $(LINENOISE_OBJ.$(USE_LINENOISE)) \ |
| 740 | 746 | $(OBJDIR)/shell.o \ |
| 741 | 747 | $(OBJDIR)/th.o \ |
| 742 | 748 | $(OBJDIR)/th_lang.o \ |
| 743 | 749 |
| --- 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 @@ | ||
| 312 | 312 | # |
| 313 | 313 | # This file is included by primary Makefile. |
| 314 | 314 | # |
| 315 | 315 | |
| 316 | 316 | XBCC = $(BCC) $(BCCFLAGS) |
| 317 | -XTCC = $(TCC) -I. -I$(SRCDIR) -I$(OBJDIR) $(TCCFLAGS) | |
| 317 | +XTCC = $(TCC) $(CFLAGS_INCLUDE) -I$(OBJDIR) $(TCCFLAGS) | |
| 318 | 318 | |
| 319 | 319 | TESTFLAGS := -quiet |
| 320 | 320 | } |
| 321 | 321 | writeln -nonewline "SRC =" |
| 322 | 322 | foreach s [lsort $src] { |
| @@ -403,16 +403,20 @@ | ||
| 403 | 403 | SHELL_OPTIONS = <<<SHELL_OPTIONS>>> |
| 404 | 404 | |
| 405 | 405 | # Setup the options used to compile the included miniz library. |
| 406 | 406 | MINIZ_OPTIONS = <<<MINIZ_OPTIONS>>> |
| 407 | 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 | |
| 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 | 410 | # the sqlite3.o object. Instead, the system SQLite will be linked |
| 411 | 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. | |
| 412 | 415 | SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o |
| 413 | 416 | SQLITE3_OBJ.1 = |
| 417 | +# SQLITE3_OBJ.2 is set by the configure process | |
| 414 | 418 | SQLITE3_OBJ. = $(SQLITE3_OBJ.0) |
| 415 | 419 | |
| 416 | 420 | # The FOSSIL_ENABLE_MINIZ variable may be undefined, set to 0, or |
| 417 | 421 | # set to 1. If it is set to 1, the miniz library included in the |
| 418 | 422 | # source tree should be used; otherwise, it should not. |
| @@ -432,27 +436,29 @@ | ||
| 432 | 436 | |
| 433 | 437 | # The USE_SEE variable may be undefined, 0 or 1. If undefined or |
| 434 | 438 | # 0, ordinary SQLite is used. If 1, then sqlite3-see.c (not part of |
| 435 | 439 | # the source tree) is used and extra flags are provided to enable |
| 436 | 440 | # 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)) | |
| 445 | 451 | SEE_FLAGS.0 = |
| 446 | 452 | SEE_FLAGS.1 = -DSQLITE_HAS_CODEC -DSQLITE_SHELL_DBKEY_PROC=fossil_key |
| 447 | 453 | SEE_FLAGS. = |
| 448 | 454 | SEE_FLAGS = $(SEE_FLAGS.$(USE_SEE)) |
| 449 | 455 | }] |
| 450 | 456 | |
| 451 | 457 | writeln [string map [list <<<NEXT_LINE>>> \\] { |
| 452 | 458 | EXTRAOBJ = <<<NEXT_LINE>>> |
| 453 | - $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) <<<NEXT_LINE>>> | |
| 459 | + $(SQLITE3_OBJ.$(SQLITE3_ORIGIN)) <<<NEXT_LINE>>> | |
| 454 | 460 | $(MINIZ_OBJ.$(FOSSIL_ENABLE_MINIZ)) <<<NEXT_LINE>>> |
| 455 | 461 | $(LINENOISE_OBJ.$(USE_LINENOISE)) <<<NEXT_LINE>>> |
| 456 | 462 | $(OBJDIR)/shell.o <<<NEXT_LINE>>> |
| 457 | 463 | $(OBJDIR)/th.o <<<NEXT_LINE>>> |
| 458 | 464 | $(OBJDIR)/th_lang.o <<<NEXT_LINE>>> |
| @@ -1103,16 +1109,21 @@ | ||
| 1103 | 1109 | $(MKVERSION) $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$@ |
| 1104 | 1110 | |
| 1105 | 1111 | $(OBJDIR)/phony.h: |
| 1106 | 1112 | # Force rebuild of VERSION.h every time "make" is run |
| 1107 | 1113 | |
| 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 | |
| 1110 | 1116 | # the sqlite3.o object. Instead, the system SQLite will be linked |
| 1111 | 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. | |
| 1112 | 1122 | SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o |
| 1113 | 1123 | SQLITE3_OBJ.1 = |
| 1124 | +# SQLITE3_OBJ.2 is set by the configure process | |
| 1114 | 1125 | SQLITE3_OBJ. = $(SQLITE3_OBJ.0) |
| 1115 | 1126 | |
| 1116 | 1127 | # The FOSSIL_ENABLE_MINIZ variable may be undefined, set to 0, or |
| 1117 | 1128 | # set to 1. If it is set to 1, the miniz library included in the |
| 1118 | 1129 | # source tree should be used; otherwise, it should not. |
| @@ -1122,27 +1133,29 @@ | ||
| 1122 | 1133 | |
| 1123 | 1134 | # The USE_SEE variable may be undefined, 0 or 1. If undefined or |
| 1124 | 1135 | # 0, ordinary SQLite is used. If 1, then sqlite3-see.c (not part of |
| 1125 | 1136 | # the source tree) is used and extra flags are provided to enable |
| 1126 | 1137 | # 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)) | |
| 1135 | 1148 | SEE_FLAGS.0 = |
| 1136 | 1149 | SEE_FLAGS.1 = -DSQLITE_HAS_CODEC -DSQLITE_SHELL_DBKEY_PROC=fossil_key |
| 1137 | 1150 | SEE_FLAGS. = |
| 1138 | 1151 | SEE_FLAGS = $(SEE_FLAGS.$(USE_SEE)) |
| 1139 | 1152 | } |
| 1140 | 1153 | |
| 1141 | 1154 | writeln [string map [list <<<NEXT_LINE>>> \\] { |
| 1142 | 1155 | EXTRAOBJ = <<<NEXT_LINE>>> |
| 1143 | - $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) <<<NEXT_LINE>>> | |
| 1156 | + $(SQLITE3_OBJ.$(SQLITE3_ORIGIN)) <<<NEXT_LINE>>> | |
| 1144 | 1157 | $(MINIZ_OBJ.$(FOSSIL_ENABLE_MINIZ)) <<<NEXT_LINE>>> |
| 1145 | 1158 | $(OBJDIR)/shell.o <<<NEXT_LINE>>> |
| 1146 | 1159 | $(OBJDIR)/th.o <<<NEXT_LINE>>> |
| 1147 | 1160 | $(OBJDIR)/th_lang.o <<<NEXT_LINE>>> |
| 1148 | 1161 | $(OBJDIR)/th_tcl.o <<<NEXT_LINE>>> |
| 1149 | 1162 |
| --- 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 @@ | ||
| 1083 | 1083 | $(MKVERSION) $(SRCDIR)/../manifest.uuid $(SRCDIR)/../manifest $(SRCDIR)/../VERSION >$@ |
| 1084 | 1084 | |
| 1085 | 1085 | $(OBJDIR)/phony.h: |
| 1086 | 1086 | # Force rebuild of VERSION.h every time "make" is run |
| 1087 | 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 | |
| 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 | 1090 | # the sqlite3.o object. Instead, the system SQLite will be linked |
| 1091 | 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. | |
| 1092 | 1096 | SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o |
| 1093 | 1097 | SQLITE3_OBJ.1 = |
| 1098 | +# SQLITE3_OBJ.2 is set by the configure process | |
| 1094 | 1099 | SQLITE3_OBJ. = $(SQLITE3_OBJ.0) |
| 1095 | 1100 | |
| 1096 | 1101 | # The FOSSIL_ENABLE_MINIZ variable may be undefined, set to 0, or |
| 1097 | 1102 | # set to 1. If it is set to 1, the miniz library included in the |
| 1098 | 1103 | # source tree should be used; otherwise, it should not. |
| @@ -1102,26 +1107,28 @@ | ||
| 1102 | 1107 | |
| 1103 | 1108 | # The USE_SEE variable may be undefined, 0 or 1. If undefined or |
| 1104 | 1109 | # 0, ordinary SQLite is used. If 1, then sqlite3-see.c (not part of |
| 1105 | 1110 | # the source tree) is used and extra flags are provided to enable |
| 1106 | 1111 | # 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)) | |
| 1115 | 1122 | SEE_FLAGS.0 = |
| 1116 | 1123 | SEE_FLAGS.1 = -DSQLITE_HAS_CODEC -DSQLITE_SHELL_DBKEY_PROC=fossil_key |
| 1117 | 1124 | SEE_FLAGS. = |
| 1118 | 1125 | SEE_FLAGS = $(SEE_FLAGS.$(USE_SEE)) |
| 1119 | 1126 | |
| 1120 | 1127 | |
| 1121 | 1128 | EXTRAOBJ = \ |
| 1122 | - $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) \ | |
| 1129 | + $(SQLITE3_OBJ.$(SQLITE3_ORIGIN)) \ | |
| 1123 | 1130 | $(MINIZ_OBJ.$(FOSSIL_ENABLE_MINIZ)) \ |
| 1124 | 1131 | $(OBJDIR)/shell.o \ |
| 1125 | 1132 | $(OBJDIR)/th.o \ |
| 1126 | 1133 | $(OBJDIR)/th_lang.o \ |
| 1127 | 1134 | $(OBJDIR)/th_tcl.o \ |
| 1128 | 1135 |
| --- 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 |