mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Copy fts5.h into the build directory as part of building fts5.c. Also remove code to edit fts5parse.c from various Makefiles and add it to mkfts5c.tcl.
FossilOrigin-Name: 4d8f03dc7b6529cf8d46fc0fcc82112c0394dc13
This commit is contained in:
@@ -77,15 +77,20 @@ proc fts5c_init {zOut} {
|
||||
proc fts5c_printfile {zIn} {
|
||||
global G
|
||||
set data [readfile $zIn]
|
||||
puts $G(fd) "#line 1 \"[file tail $zIn]\""
|
||||
set zTail [file tail $zIn]
|
||||
puts $G(fd) "#line 1 \"$zTail\""
|
||||
|
||||
set sub_map [list --FTS5-SOURCE-ID-- [fts5_source_id $::srcdir]]
|
||||
if {$zTail=="fts5parse.c"} {
|
||||
lappend sub_map yy fts5yy YY fts5YY TOKEN FTS5TOKEN
|
||||
}
|
||||
|
||||
set srcid_map [list --FTS5-SOURCE-ID-- [fts5_source_id $::srcdir]]
|
||||
foreach line [split $data "\n"] {
|
||||
if {[regexp {^#include.*fts5} $line]} continue
|
||||
if {[regexp {^(const )?[a-zA-Z][a-zA-Z0-9]* [*]?sqlite3Fts5} $line]} {
|
||||
set line "static $line"
|
||||
}
|
||||
set line [string map $srcid_map $line]
|
||||
set line [string map $sub_map $line]
|
||||
puts $G(fd) $line
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user