Fossil SCM
If fossil is configured with --disable-internal-sqlite, disable the "sqlite3" command: It doesn't work anyway, and there is no reason to support it; Any system which has an sqlite dll/so should have the sqlite3 utility as well, which can do almost the same as "fossil sqlite3"
Commit
77d37d910be6a35920604a894dd8fedc3113dc50
Parent
bd1151126a1b615…
3 files changed
+2
-2
+1
-2
+3
+2
-2
| --- src/main.mk | ||
| +++ src/main.mk | ||
| @@ -393,21 +393,21 @@ | ||
| 393 | 393 | # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set |
| 394 | 394 | # to 1. If it is set to 1, then there is no need to build or link |
| 395 | 395 | # the sqlite3.o object. Instead, the system sqlite will be linked |
| 396 | 396 | # using -lsqlite3. |
| 397 | 397 | SQLITE3_OBJ.1 = |
| 398 | -SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o | |
| 398 | +SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o $(OBJDIR)/shell.o | |
| 399 | 399 | SQLITE3_OBJ. = $(SQLITE3_OBJ.0) |
| 400 | 400 | |
| 401 | 401 | # The FOSSIL_ENABLE_TCL variable may be undefined, set to 0, or set to 1. |
| 402 | 402 | # If it is set to 1, then we need to build the Tcl integration code and |
| 403 | 403 | # link to the Tcl library. |
| 404 | 404 | TCL_OBJ.0 = |
| 405 | 405 | TCL_OBJ.1 = $(OBJDIR)/th_tcl.o |
| 406 | 406 | TCL_OBJ. = $(TCL_OBJ.0) |
| 407 | 407 | |
| 408 | -EXTRAOBJ = $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) $(OBJDIR)/shell.o $(OBJDIR)/th.o $(OBJDIR)/th_lang.o $(TCL_OBJ.$(FOSSIL_ENABLE_TCL)) $(OBJDIR)/cson_amalgamation.o | |
| 408 | +EXTRAOBJ = $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) $(OBJDIR)/th.o $(OBJDIR)/th_lang.o $(TCL_OBJ.$(FOSSIL_ENABLE_TCL)) $(OBJDIR)/cson_amalgamation.o | |
| 409 | 409 | |
| 410 | 410 | $(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) |
| 411 | 411 | $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) |
| 412 | 412 | |
| 413 | 413 | # This rule prevents make from using its default rules to try build |
| 414 | 414 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -393,21 +393,21 @@ | |
| 393 | # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set |
| 394 | # to 1. If it is set to 1, then there is no need to build or link |
| 395 | # the sqlite3.o object. Instead, the system sqlite will be linked |
| 396 | # using -lsqlite3. |
| 397 | SQLITE3_OBJ.1 = |
| 398 | SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o |
| 399 | SQLITE3_OBJ. = $(SQLITE3_OBJ.0) |
| 400 | |
| 401 | # The FOSSIL_ENABLE_TCL variable may be undefined, set to 0, or set to 1. |
| 402 | # If it is set to 1, then we need to build the Tcl integration code and |
| 403 | # link to the Tcl library. |
| 404 | TCL_OBJ.0 = |
| 405 | TCL_OBJ.1 = $(OBJDIR)/th_tcl.o |
| 406 | TCL_OBJ. = $(TCL_OBJ.0) |
| 407 | |
| 408 | EXTRAOBJ = $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) $(OBJDIR)/shell.o $(OBJDIR)/th.o $(OBJDIR)/th_lang.o $(TCL_OBJ.$(FOSSIL_ENABLE_TCL)) $(OBJDIR)/cson_amalgamation.o |
| 409 | |
| 410 | $(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) |
| 411 | $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) |
| 412 | |
| 413 | # This rule prevents make from using its default rules to try build |
| 414 |
| --- src/main.mk | |
| +++ src/main.mk | |
| @@ -393,21 +393,21 @@ | |
| 393 | # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set |
| 394 | # to 1. If it is set to 1, then there is no need to build or link |
| 395 | # the sqlite3.o object. Instead, the system sqlite will be linked |
| 396 | # using -lsqlite3. |
| 397 | SQLITE3_OBJ.1 = |
| 398 | SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o $(OBJDIR)/shell.o |
| 399 | SQLITE3_OBJ. = $(SQLITE3_OBJ.0) |
| 400 | |
| 401 | # The FOSSIL_ENABLE_TCL variable may be undefined, set to 0, or set to 1. |
| 402 | # If it is set to 1, then we need to build the Tcl integration code and |
| 403 | # link to the Tcl library. |
| 404 | TCL_OBJ.0 = |
| 405 | TCL_OBJ.1 = $(OBJDIR)/th_tcl.o |
| 406 | TCL_OBJ. = $(TCL_OBJ.0) |
| 407 | |
| 408 | EXTRAOBJ = $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) $(OBJDIR)/th.o $(OBJDIR)/th_lang.o $(TCL_OBJ.$(FOSSIL_ENABLE_TCL)) $(OBJDIR)/cson_amalgamation.o |
| 409 | |
| 410 | $(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ) |
| 411 | $(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB) |
| 412 | |
| 413 | # This rule prevents make from using its default rules to try build |
| 414 |
+1
-2
| --- src/makemake.tcl | ||
| +++ src/makemake.tcl | ||
| @@ -262,11 +262,11 @@ | ||
| 262 | 262 | # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set |
| 263 | 263 | # to 1. If it is set to 1, then there is no need to build or link |
| 264 | 264 | # the sqlite3.o object. Instead, the system sqlite will be linked |
| 265 | 265 | # using -lsqlite3. |
| 266 | 266 | SQLITE3_OBJ.1 = |
| 267 | -SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o | |
| 267 | +SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o $(OBJDIR)/shell.o | |
| 268 | 268 | SQLITE3_OBJ. = $(SQLITE3_OBJ.0) |
| 269 | 269 | |
| 270 | 270 | # The FOSSIL_ENABLE_TCL variable may be undefined, set to 0, or set to 1. |
| 271 | 271 | # If it is set to 1, then we need to build the Tcl integration code and |
| 272 | 272 | # link to the Tcl library. |
| @@ -274,11 +274,10 @@ | ||
| 274 | 274 | TCL_OBJ.1 = $(OBJDIR)/th_tcl.o |
| 275 | 275 | TCL_OBJ. = $(TCL_OBJ.0) |
| 276 | 276 | |
| 277 | 277 | EXTRAOBJ = \ |
| 278 | 278 | $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) \ |
| 279 | - $(OBJDIR)/shell.o \ | |
| 280 | 279 | $(OBJDIR)/th.o \ |
| 281 | 280 | $(OBJDIR)/th_lang.o \ |
| 282 | 281 | $(TCL_OBJ.$(FOSSIL_ENABLE_TCL)) \ |
| 283 | 282 | $(OBJDIR)/cson_amalgamation.o |
| 284 | 283 | |
| 285 | 284 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -262,11 +262,11 @@ | |
| 262 | # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set |
| 263 | # to 1. If it is set to 1, then there is no need to build or link |
| 264 | # the sqlite3.o object. Instead, the system sqlite will be linked |
| 265 | # using -lsqlite3. |
| 266 | SQLITE3_OBJ.1 = |
| 267 | SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o |
| 268 | SQLITE3_OBJ. = $(SQLITE3_OBJ.0) |
| 269 | |
| 270 | # The FOSSIL_ENABLE_TCL variable may be undefined, set to 0, or set to 1. |
| 271 | # If it is set to 1, then we need to build the Tcl integration code and |
| 272 | # link to the Tcl library. |
| @@ -274,11 +274,10 @@ | |
| 274 | TCL_OBJ.1 = $(OBJDIR)/th_tcl.o |
| 275 | TCL_OBJ. = $(TCL_OBJ.0) |
| 276 | |
| 277 | EXTRAOBJ = \ |
| 278 | $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) \ |
| 279 | $(OBJDIR)/shell.o \ |
| 280 | $(OBJDIR)/th.o \ |
| 281 | $(OBJDIR)/th_lang.o \ |
| 282 | $(TCL_OBJ.$(FOSSIL_ENABLE_TCL)) \ |
| 283 | $(OBJDIR)/cson_amalgamation.o |
| 284 | |
| 285 |
| --- src/makemake.tcl | |
| +++ src/makemake.tcl | |
| @@ -262,11 +262,11 @@ | |
| 262 | # The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set |
| 263 | # to 1. If it is set to 1, then there is no need to build or link |
| 264 | # the sqlite3.o object. Instead, the system sqlite will be linked |
| 265 | # using -lsqlite3. |
| 266 | SQLITE3_OBJ.1 = |
| 267 | SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o $(OBJDIR)/shell.o |
| 268 | SQLITE3_OBJ. = $(SQLITE3_OBJ.0) |
| 269 | |
| 270 | # The FOSSIL_ENABLE_TCL variable may be undefined, set to 0, or set to 1. |
| 271 | # If it is set to 1, then we need to build the Tcl integration code and |
| 272 | # link to the Tcl library. |
| @@ -274,11 +274,10 @@ | |
| 274 | TCL_OBJ.1 = $(OBJDIR)/th_tcl.o |
| 275 | TCL_OBJ. = $(TCL_OBJ.0) |
| 276 | |
| 277 | EXTRAOBJ = \ |
| 278 | $(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) \ |
| 279 | $(OBJDIR)/th.o \ |
| 280 | $(OBJDIR)/th_lang.o \ |
| 281 | $(TCL_OBJ.$(FOSSIL_ENABLE_TCL)) \ |
| 282 | $(OBJDIR)/cson_amalgamation.o |
| 283 | |
| 284 |
+3
| --- src/sqlcmd.c | ||
| +++ src/sqlcmd.c | ||
| @@ -19,10 +19,11 @@ | ||
| 19 | 19 | ** shell against the repository database. The command-line shell itself |
| 20 | 20 | ** is a copy of the "shell.c" code from SQLite. This file contains logic |
| 21 | 21 | ** to initialize the code in shell.c. |
| 22 | 22 | */ |
| 23 | 23 | #include "config.h" |
| 24 | +#if !defined(USE_SYSTEM_SQLITE) || !USE_SYSTEM_SQLITE | |
| 24 | 25 | #include "sqlcmd.h" |
| 25 | 26 | #include <zlib.h> |
| 26 | 27 | |
| 27 | 28 | /* |
| 28 | 29 | ** Implementation of the "content(X)" SQL function. Return the complete |
| @@ -154,5 +155,7 @@ | ||
| 154 | 155 | */ |
| 155 | 156 | void fossil_open(const char **pzRepoName){ |
| 156 | 157 | sqlite3_auto_extension((void(*)(void))sqlcmd_autoinit); |
| 157 | 158 | *pzRepoName = g.zRepositoryName; |
| 158 | 159 | } |
| 160 | + | |
| 161 | +#endif /* !USE_SYSTEM_SQLITE */ | |
| 159 | 162 |
| --- src/sqlcmd.c | |
| +++ src/sqlcmd.c | |
| @@ -19,10 +19,11 @@ | |
| 19 | ** shell against the repository database. The command-line shell itself |
| 20 | ** is a copy of the "shell.c" code from SQLite. This file contains logic |
| 21 | ** to initialize the code in shell.c. |
| 22 | */ |
| 23 | #include "config.h" |
| 24 | #include "sqlcmd.h" |
| 25 | #include <zlib.h> |
| 26 | |
| 27 | /* |
| 28 | ** Implementation of the "content(X)" SQL function. Return the complete |
| @@ -154,5 +155,7 @@ | |
| 154 | */ |
| 155 | void fossil_open(const char **pzRepoName){ |
| 156 | sqlite3_auto_extension((void(*)(void))sqlcmd_autoinit); |
| 157 | *pzRepoName = g.zRepositoryName; |
| 158 | } |
| 159 |
| --- src/sqlcmd.c | |
| +++ src/sqlcmd.c | |
| @@ -19,10 +19,11 @@ | |
| 19 | ** shell against the repository database. The command-line shell itself |
| 20 | ** is a copy of the "shell.c" code from SQLite. This file contains logic |
| 21 | ** to initialize the code in shell.c. |
| 22 | */ |
| 23 | #include "config.h" |
| 24 | #if !defined(USE_SYSTEM_SQLITE) || !USE_SYSTEM_SQLITE |
| 25 | #include "sqlcmd.h" |
| 26 | #include <zlib.h> |
| 27 | |
| 28 | /* |
| 29 | ** Implementation of the "content(X)" SQL function. Return the complete |
| @@ -154,5 +155,7 @@ | |
| 155 | */ |
| 156 | void fossil_open(const char **pzRepoName){ |
| 157 | sqlite3_auto_extension((void(*)(void))sqlcmd_autoinit); |
| 158 | *pzRepoName = g.zRepositoryName; |
| 159 | } |
| 160 | |
| 161 | #endif /* !USE_SYSTEM_SQLITE */ |
| 162 |