mirror of
https://github.com/sqlite/sqlite.git
synced 2025-12-24 14:17:58 +03:00
New makefile target "sqlite3-debug.c" builds an amalgamation that include
appropriate "#line" macros relating the code back to the original source files. FossilOrigin-Name: 26f2da24b080bf89e3574bd1a162eb1fead51456
This commit is contained in:
8
main.mk
8
main.mk
@@ -384,6 +384,14 @@ sqlite3.c: target_source $(TOP)/tool/mksqlite3c.tcl
|
||||
echo '#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c
|
||||
cat $(TOP)/src/tclsqlite.c >>tclsqlite3.c
|
||||
|
||||
sqlite3-debug.c: target_source $(TOP)/tool/mksqlite3c.tcl
|
||||
tclsh $(TOP)/tool/mksqlite3c.tcl --linemacros
|
||||
echo '#ifndef USE_SYSTEM_SQLITE' >tclsqlite3.c
|
||||
cat sqlite3.c >>tclsqlite3.c
|
||||
echo '#endif /* USE_SYSTEM_SQLITE */' >>tclsqlite3.c
|
||||
echo '#line 1 "tclsqlite.c"' >>tclsqlite3.c
|
||||
cat $(TOP)/src/tclsqlite.c >>tclsqlite3.c
|
||||
|
||||
sqlite3-all.c: sqlite3.c $(TOP)/tool/split-sqlite3c.tcl
|
||||
tclsh $(TOP)/tool/split-sqlite3c.tcl
|
||||
|
||||
|
||||
16
manifest
16
manifest
@@ -1,5 +1,5 @@
|
||||
C When\sopening\sa\stemporary\sfile\sto\suse\sin\sa\smerge-sort,\spass\sSQLITE_OPEN_TEMP_JOURNAL\sinstead\sof\sSQLITE_OPEN_TEMP_DB.\sThis\sis\sa\sbetter\sfit,\sas\smerge-sort\sfiles\sare\swritten\sand\sread\ssequentially\slike\sjournal\sfiles.
|
||||
D 2011-08-15T14:41:01.304
|
||||
C New\smakefile\starget\s"sqlite3-debug.c"\sbuilds\san\samalgamation\sthat\sinclude\nappropriate\s"#line"\smacros\srelating\sthe\scode\sback\sto\sthe\soriginal\ssource\nfiles.
|
||||
D 2011-08-15T15:27:20.505
|
||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||
F Makefile.in 8c930e7b493d59099ea1304bd0f2aed152eb3315
|
||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||
@@ -104,7 +104,7 @@ F ext/rtree/tkt3363.test 142ab96eded44a3615ec79fba98c7bde7d0f96de
|
||||
F ext/rtree/viewrtree.tcl eea6224b3553599ae665b239bd827e182b466024
|
||||
F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x
|
||||
F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8
|
||||
F main.mk a812efc287a904c3e04098f090de036b264ba779
|
||||
F main.mk 269e7bb626997b42a7d6989ec60451492d599ec7
|
||||
F mkdll.sh 7d09b23c05d56532e9d44a50868eb4b12ff4f74a
|
||||
F mkextu.sh 416f9b7089d80e5590a29692c9d9280a10dbad9f
|
||||
F mkextw.sh 4123480947681d9b434a5e7b1ee08135abe409ac
|
||||
@@ -931,7 +931,7 @@ F tool/lempar.c 01ca97f87610d1dac6d8cd96ab109ab1130e76dc
|
||||
F tool/mkkeywordhash.c d2e6b4a5965e23afb80fbe74bb54648cd371f309
|
||||
F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e
|
||||
F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97
|
||||
F tool/mksqlite3c.tcl d8c0d3065bc23fd9e27d59bfebd34df203fe6b08
|
||||
F tool/mksqlite3c.tcl 9fbac513cd9d5ac95ad55630f49bb16c5347ab75
|
||||
F tool/mksqlite3h.tcl 78013ad79a5e492e5f764f3c7a8ef834255061f8
|
||||
F tool/mksqlite3internalh.tcl 7b43894e21bcb1bb39e11547ce7e38a063357e87
|
||||
F tool/offsets.c fe4262fdfa378e8f5499a42136d17bf3b98f6091
|
||||
@@ -960,7 +960,7 @@ F tool/symbols.sh caaf6ccc7300fd43353318b44524853e222557d5
|
||||
F tool/tostr.awk 11760e1b94a5d3dcd42378f3cc18544c06cfa576
|
||||
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
|
||||
F tool/warnings.sh 2ebae31e1eb352696f3c2f7706a34c084b28c262
|
||||
P 309198085f255fc1fcc7bf28fd38d016d5a536ab
|
||||
R f4a558ac5b07c7ee47bc6d83b48fab6c
|
||||
U dan
|
||||
Z 08dca85211394f3ea3660d49e9f91d6b
|
||||
P bd04756b66e343a7bc6c8bbed9e5cff7b9658d01
|
||||
R 3e390b4e6712a64b736c2b0c9c3fb839
|
||||
U drh
|
||||
Z e6b5de92686bece5cc2f1b4147f8ff82
|
||||
|
||||
@@ -1 +1 @@
|
||||
bd04756b66e343a7bc6c8bbed9e5cff7b9658d01
|
||||
26f2da24b080bf89e3574bd1a162eb1fead51456
|
||||
@@ -31,6 +31,11 @@ if {[lsearch $argv --nostatic]>=0} {
|
||||
} else {
|
||||
set addstatic 1
|
||||
}
|
||||
if {[lsearch $argv --linemacros]>=0} {
|
||||
set linemacros 1
|
||||
} else {
|
||||
set linemacros 0
|
||||
}
|
||||
set in [open tsrc/sqlite3.h]
|
||||
set cnt 0
|
||||
set VERSION ?????
|
||||
@@ -136,9 +141,11 @@ proc section_comment {text} {
|
||||
# process them approprately.
|
||||
#
|
||||
proc copy_file {filename} {
|
||||
global seen_hdr available_hdr out addstatic
|
||||
global seen_hdr available_hdr out addstatic linemacros
|
||||
set ln 0
|
||||
set tail [file tail $filename]
|
||||
section_comment "Begin file $tail"
|
||||
if {$linemacros} {puts $out "#line 1 \"$filename\""}
|
||||
set in [open $filename r]
|
||||
set varpattern {^[a-zA-Z][a-zA-Z_0-9 *]+(sqlite3[_a-zA-Z0-9]+)(\[|;| =)}
|
||||
set declpattern {[a-zA-Z][a-zA-Z_0-9 ]+ \**(sqlite3[_a-zA-Z0-9]+)\(}
|
||||
@@ -148,6 +155,7 @@ proc copy_file {filename} {
|
||||
set declpattern ^$declpattern
|
||||
while {![eof $in]} {
|
||||
set line [gets $in]
|
||||
incr ln
|
||||
if {[regexp {^\s*#\s*include\s+["<]([^">]+)[">]} $line all hdr]} {
|
||||
if {[info exists available_hdr($hdr)]} {
|
||||
if {$available_hdr($hdr)} {
|
||||
@@ -157,14 +165,17 @@ proc copy_file {filename} {
|
||||
section_comment "Include $hdr in the middle of $tail"
|
||||
copy_file tsrc/$hdr
|
||||
section_comment "Continuing where we left off in $tail"
|
||||
if {$linemacros} {puts $out "#line [expr {$ln+1}] \"$filename\""}
|
||||
}
|
||||
} elseif {![info exists seen_hdr($hdr)]} {
|
||||
set seen_hdr($hdr) 1
|
||||
puts $out $line
|
||||
} else {
|
||||
puts $out "/* $line */"
|
||||
}
|
||||
} elseif {[regexp {^#ifdef __cplusplus} $line]} {
|
||||
puts $out "#if 0"
|
||||
} elseif {[regexp {^#line} $line]} {
|
||||
} elseif {!$linemacros && [regexp {^#line} $line]} {
|
||||
# Skip #line directives.
|
||||
} elseif {$addstatic && ![regexp {^(static|typedef)} $line]} {
|
||||
regsub {^SQLITE_API } $line {} line
|
||||
|
||||
Reference in New Issue
Block a user