Add a rule to main.mk to build the schemalint.tcl script into an executable. Similar to the way the sqlite3_analyzer executable is built.

FossilOrigin-Name: b8251065db9dbe5463490316baa09dc636551377
This commit is contained in:
dan
2015-11-30 19:16:00 +00:00
parent c45bf341af
commit ff3b534b9f
4 changed files with 31 additions and 9 deletions
+14
View File
@@ -715,6 +715,20 @@ sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
sqlite3_analyzer$(EXE): sqlite3_analyzer.c
$(TCCX) $(TCL_FLAGS) sqlite3_analyzer.c -o $@ $(LIBTCL) $(THREADLIB)
sqlite3_schemalint.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/schemalint.tcl
echo "#define TCLSH 2" > $@
echo "#define SQLITE_ENABLE_DBSTAT_VTAB 1" >> $@
cat sqlite3.c $(TOP)/src/tclsqlite.c >> $@
echo "static const char *tclsh_main_loop(void){" >> $@
echo "static const char *zMainloop = " >> $@
tclsh $(TOP)/tool/tostr.tcl $(TOP)/tool/schemalint.tcl >> $@
echo "; return zMainloop; }" >> $@
sqlite3_schemalint$(EXE): $(TESTSRC) sqlite3_schemalint.c
$(TCCX) $(TCL_FLAGS) $(TESTFIXTURE_FLAGS) \
sqlite3_schemalint.c $(TESTSRC) \
-o sqlite3_schemalint$(EXE) $(LIBTCL) $(THREADLIB)
# Rules to build the 'testfixture' application.
#
TESTFIXTURE_FLAGS = -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1