summaryrefslogtreecommitdiff
path: root/tool/mksqlite3c.tcl
diff options
context:
space:
mode:
Diffstat (limited to 'tool/mksqlite3c.tcl')
-rw-r--r--tool/mksqlite3c.tcl17
1 files changed, 14 insertions, 3 deletions
diff --git a/tool/mksqlite3c.tcl b/tool/mksqlite3c.tcl
index 07c01ef..c14be20 100644
--- a/tool/mksqlite3c.tcl
+++ b/tool/mksqlite3c.tcl
@@ -105,6 +105,8 @@ foreach hdr {
mutex.h
opcodes.h
os_common.h
+ os_setup.h
+ os_win.h
os.h
pager.h
parse.h
@@ -118,6 +120,7 @@ foreach hdr {
vdbe.h
vdbeInt.h
wal.h
+ whereInt.h
} {
set available_hdr($hdr) 1
}
@@ -139,7 +142,7 @@ proc section_comment {text} {
# Read the source file named $filename and write it into the
# sqlite3.c output file. If any #include statements are seen,
-# process them approprately.
+# process them appropriately.
#
proc copy_file {filename} {
global seen_hdr available_hdr out addstatic linemacros
@@ -169,10 +172,18 @@ proc copy_file {filename} {
if {$linemacros} {puts $out "#line [expr {$ln+1}] \"$filename\""}
}
} elseif {![info exists seen_hdr($hdr)]} {
- set seen_hdr($hdr) 1
+ if {![regexp {/\*\s+amalgamator:\s+dontcache\s+\*/} $line]} {
+ set seen_hdr($hdr) 1
+ }
+ puts $out $line
+ } elseif {[regexp {/\*\s+amalgamator:\s+keep\s+\*/} $line]} {
+ # This include file must be kept because there was a "keep"
+ # directive inside of a line comment.
puts $out $line
} else {
- puts $out "/* $line */"
+ # Comment out the entire line, replacing any nested comment
+ # begin/end markers with the harmless substring "**".
+ puts $out "/* [string map [list /* ** */ **] $line] */"
}
} elseif {[regexp {^#ifdef __cplusplus} $line]} {
puts $out "#if 0"