#
USE_AMALGAMATION=1
- AMALGAMATION_LINE_TAGS=--linemacros=1
+#########
+# By default, amalgamation sqlite3.c will have #line directives.
+# This is a build option not shown by ./configure --help
+# To control it, use configure option: amalgamation_line_tags=?
+# where ? is no to suppress #line directives or yes to create them.
++AMALGAMATION_LINE_TAGS=--line_tags=1
+
#########
# See whether we can run specific tclsh versions known to work well;
# if not, then we fall back to plain tclsh.
USE_AMALGAMATION=0
fi
- AMALGAMATION_LINE_TAGS=--linemacros=1
+########
+# See whether --disable
+if test "${amalgamation_line_tags+set}" = set; then :
+ enableval=$amalgamation_line_tags;
+fi
+
+if test "${amalgamation_line_tags}" = "yes" ; then
- AMALGAMATION_LINE_TAGS=--linemacros=0
++ AMALGAMATION_LINE_TAGS=--line_tags=1
+fi
+if test "${amalgamation_line_tags}" = "no" ; then
++ AMALGAMATION_LINE_TAGS=--line_tags=0
+fi
+
#########
# Look for zlib. Only needed by extensions and by the sqlite3.exe shell
- C Amalgamation\shas\s#line\sdirectives\sby\sdefault.\sMinor\smksqlite3c.tcl\schanges
- D 2021-07-13T01:45:04.109
-C Do\snot\sattempt\sto\srun\sTcl\ssessions\stests\sunless\sboth\sSQLITE_ENABLE_PREUPDATE_HOOK\sand\sSQLITE_ENABLE_SESSIONS\sare\sdefined.
-D 2021-07-13T11:30:46.013
++C Merge\sfrom\strunk,\srename\stool\soption\sfor\sits\seffect
++D 2021-07-13T11:55:07.844
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
F config.guess 883205ddf25b46f10c181818bf42c09da9888884af96f79e1719264345053bd6
F config.h.in 6376abec766e9a0785178b1823b5a587e9f1ccbc
F config.sub c2d0260f17f3e4bc0b6808fccf1b291cb5e9126c14fc5890efc77b9fd0175559
- F configure 0c8ec49c8c57e549748fd3c9df50f997272649fdba3be5b91ebf9f2546856157 x
-F configure 9712ea724ff2a1d48fadcf04b29fa1852f325792462c55f4fc71ab972653b20d x
++F configure 6d4409696c9f91a4a9108123ea52b97d8f2b4f056565e0a4ab62f899944f3acb x
F configure.ac 4e4b58b32f88c8da9914a2f2c3158f80e69907eccc019fcc7e3ba14ffd91c640
F contrib/sqlitecon.tcl 210a913ad63f9f991070821e599d600bd913e0ad
F doc/F2FS.txt c1d4a0ae9711cfe0e1d8b019d154f1c29e0d3abfe820787ba1e9ed7691160fcd
F tool/mksourceid.c 36aa8020014aed0836fd13c51d6dc9219b0df1761d6b5f58ff5b616211b079b9
F tool/mkspeedsql.tcl a1a334d288f7adfe6e996f2e712becf076745c97
F tool/mksqlite3c-noext.tcl 4f7cfef5152b0c91920355cbfc1d608a4ad242cb819f1aea07f6d0274f584a7f
- F tool/mksqlite3c.tcl bfbdf3661d82a9d5913a52dfa8d78b2a069a8af1a4b457162609bd6b55700de0
-F tool/mksqlite3c.tcl b4a930a4c3f8f43273cde45a459eb8881479be3c2845526c92b2513a4995aab8
++F tool/mksqlite3c.tcl e5d1c5b61f530e9307f7dc9c2880ebe5d0578cb3817d8223933f24ca8a74cc2d
F tool/mksqlite3h.tcl 1f5e4a1dbbbc43c83cc6e74fe32c6c620502240b66c7c0f33a51378e78fc4edf
F tool/mksqlite3internalh.tcl eb994013e833359137eb53a55acdad0b5ae1049b
F tool/mkvsix.tcl b9e0777a213c23156b6542842c238479e496ebf5
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
--P 7cb09aef49c0b98c0c5e332d953a2eeb71ae9e243b1e37ab1c8ed4af15d46f50
- R 6df1eb2d72698e3e5d1e65e62fb29077
- T *branch * line_tags
- T *sym-line_tags *
- T -sym-trunk *
-R ffe5fcedbe611fc5d143174623ac9c96
-U dan
-Z 4dfdb08b45660ff4713e22026b265656
++P ba3eff71973064cbc0ddf51aa822a246c162bbb65387e9523692c60e5340acda 385db794477e046b5dde726489375786d7565b113084f6e730efb050b08f9a6e
++R dbca2ff374fa12dc1b7d55e8c48721d1
+U larrybr
- Z 26f306c76e23d1272de3ca395f0d82ae
++Z 5a4e128c525ea79734e95c062a75fb76
- ba3eff71973064cbc0ddf51aa822a246c162bbb65387e9523692c60e5340acda
-385db794477e046b5dde726489375786d7565b113084f6e730efb050b08f9a6e
++9327f73c1b87fb9ca78e261d16b092763f497bb9c6f9784a33eabdc961b06343
# The amalgamated SQLite code will be written into sqlite3.c
#
- --linemacros=? => Insert #line directives into the output or not. (1 or 0)
+set help {Usage: tclsh mksqlite3c.tcl <options>
+ where <options> is zero or more of the following with these effects:
+ --nostatic => Do not generate with compile-time modifiable linkage.
++ --line_tags=? => Emit #line directives into output or not. (? = 1 or 0)
+ --useapicall => Prepend functions with SQLITE_APICALL or SQLITE_CDECL.
+ --srcdir $SRC => Specify the directory containing constituent sources.
+ --help => See this.
++ The value setting options default to --line_tags=1 and '--srcdir tsrc' .
+}
+
# Begin by reading the "sqlite3.h" header file. Extract the version number
# from in this file. The version number is needed to generate the header
# comment of the amalgamation.
#
+
set addstatic 1
- set linemacros 1
-set linemacros 0
++set line_tags 1
set useapicall 0
+set srcdir tsrc
+
for {set i 0} {$i<[llength $argv]} {incr i} {
set x [lindex $argv $i]
- if {[regexp {^-+nostatic$} $x]} {
+ if {[regexp {^-?-nostatic$} $x]} {
set addstatic 0
- } elseif {[regexp {^-?-linemacros=([01])$} $x ma ulm]} {
- set linemacros $ulm
- } elseif {[regexp {^-+linemacros} $x]} {
- set linemacros 1
- } elseif {[regexp {^-+useapicall} $x]} {
++ } elseif {[regexp {^-?-line_tags=([01])$} $x ma ulm]} {
++ set line_tags $ulm
+ } elseif {[regexp {^-?-useapicall$} $x]} {
set useapicall 1
+ } elseif {[regexp {^-?-srcdir$} $x]} {
+ incr i
+ if {$i==[llength $argv]} {
+ error "No argument following $x"
+ }
+ set srcdir [lindex $argv $i]
+ } elseif {[regexp {^-?-((help)|\?)$} $x]} {
+ puts $help
+ exit 0
} else {
error "unknown command-line option: $x"
}
#
proc copy_file {filename} {
global seen_hdr available_hdr varonly_hdr cdecllist out
- global addstatic linemacros useapicall srcdir
- global addstatic linemacros useapicall
++ global addstatic line_tags useapicall srcdir
set ln 0
set tail [file tail $filename]
section_comment "Begin file $tail"
-- if {$linemacros} {puts $out "#line 1 \"$filename\""}
++ if {$line_tags} {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]+)(\(.*)}
set available_hdr($hdr) 0
}
section_comment "Include $hdr in the middle of $tail"
- copy_file tsrc/$hdr
+ copy_file $srcdir/$hdr
section_comment "Continuing where we left off in $tail"
-- if {$linemacros} {puts $out "#line [expr {$ln+1}] \"$filename\""}
++ if {$line_tags} {puts $out "#line [expr {$ln+1}] \"$filename\""}
} else {
# Comment out the entire line, replacing any nested comment
# begin/end markers with the harmless substring "**".
}
} elseif {[regexp {^#ifdef __cplusplus} $line]} {
puts $out "#if 0"
-- } elseif {!$linemacros && [regexp {^#line} $line]} {
++ } elseif {!$line_tags && [regexp {^#line} $line]} {
# Skip #line directives.
} elseif {$addstatic
&& ![regexp {^(static|typedef|SQLITE_PRIVATE)} $line]} {