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"

jan.nijtmans 2014-01-02 22:53 trunk
Commit 77d37d910be6a35920604a894dd8fedc3113dc50
+2 -2
--- src/main.mk
+++ src/main.mk
@@ -393,21 +393,21 @@
393393
# The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set
394394
# to 1. If it is set to 1, then there is no need to build or link
395395
# the sqlite3.o object. Instead, the system sqlite will be linked
396396
# using -lsqlite3.
397397
SQLITE3_OBJ.1 =
398
-SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o
398
+SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o $(OBJDIR)/shell.o
399399
SQLITE3_OBJ. = $(SQLITE3_OBJ.0)
400400
401401
# The FOSSIL_ENABLE_TCL variable may be undefined, set to 0, or set to 1.
402402
# If it is set to 1, then we need to build the Tcl integration code and
403403
# link to the Tcl library.
404404
TCL_OBJ.0 =
405405
TCL_OBJ.1 = $(OBJDIR)/th_tcl.o
406406
TCL_OBJ. = $(TCL_OBJ.0)
407407
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
409409
410410
$(APPNAME): $(OBJDIR)/headers $(OBJ) $(EXTRAOBJ)
411411
$(TCC) -o $(APPNAME) $(OBJ) $(EXTRAOBJ) $(LIB)
412412
413413
# This rule prevents make from using its default rules to try build
414414
--- 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
--- src/makemake.tcl
+++ src/makemake.tcl
@@ -262,11 +262,11 @@
262262
# The USE_SYSTEM_SQLITE variable may be undefined, set to 0, or set
263263
# to 1. If it is set to 1, then there is no need to build or link
264264
# the sqlite3.o object. Instead, the system sqlite will be linked
265265
# using -lsqlite3.
266266
SQLITE3_OBJ.1 =
267
-SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o
267
+SQLITE3_OBJ.0 = $(OBJDIR)/sqlite3.o $(OBJDIR)/shell.o
268268
SQLITE3_OBJ. = $(SQLITE3_OBJ.0)
269269
270270
# The FOSSIL_ENABLE_TCL variable may be undefined, set to 0, or set to 1.
271271
# If it is set to 1, then we need to build the Tcl integration code and
272272
# link to the Tcl library.
@@ -274,11 +274,10 @@
274274
TCL_OBJ.1 = $(OBJDIR)/th_tcl.o
275275
TCL_OBJ. = $(TCL_OBJ.0)
276276
277277
EXTRAOBJ = \
278278
$(SQLITE3_OBJ.$(USE_SYSTEM_SQLITE)) \
279
- $(OBJDIR)/shell.o \
280279
$(OBJDIR)/th.o \
281280
$(OBJDIR)/th_lang.o \
282281
$(TCL_OBJ.$(FOSSIL_ENABLE_TCL)) \
283282
$(OBJDIR)/cson_amalgamation.o
284283
285284
--- 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
--- src/sqlcmd.c
+++ src/sqlcmd.c
@@ -19,10 +19,11 @@
1919
** shell against the repository database. The command-line shell itself
2020
** is a copy of the "shell.c" code from SQLite. This file contains logic
2121
** to initialize the code in shell.c.
2222
*/
2323
#include "config.h"
24
+#if !defined(USE_SYSTEM_SQLITE) || !USE_SYSTEM_SQLITE
2425
#include "sqlcmd.h"
2526
#include <zlib.h>
2627
2728
/*
2829
** Implementation of the "content(X)" SQL function. Return the complete
@@ -154,5 +155,7 @@
154155
*/
155156
void fossil_open(const char **pzRepoName){
156157
sqlite3_auto_extension((void(*)(void))sqlcmd_autoinit);
157158
*pzRepoName = g.zRepositoryName;
158159
}
160
+
161
+#endif /* !USE_SYSTEM_SQLITE */
159162
--- 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

Keyboard Shortcuts

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