Add a new AWK script in the tool/ folder for converting text files into
C string literals. Use it for building sqlite3_analyzer. FossilOrigin-Name: dcb46d3f68e219a84c67c7ffef26fd2076a0ba28
This commit is contained in:
parent
3c22c60434
commit
3dcf39afa0
@ -837,7 +837,7 @@ test: testfixture.exe sqlite3.exe
|
||||
.\testfixture.exe $(TOP)\test\veryquick.test
|
||||
|
||||
spaceanal_tcl.h: $(TOP)\tool\spaceanal.tcl
|
||||
$(NAWK) "/^[^#]/ { gsub(/\\/,\"\\\\\\\\\");gsub(/\\\"/,\"\\\\\\\"\");gsub(/^/,\"\\\"\");gsub(/$$/,\"\\n\\\"\");print }" \
|
||||
$(NAWK) -f $(TOP)/tool/tostr.awk \
|
||||
$(TOP)\tool\spaceanal.tcl >spaceanal_tcl.h
|
||||
|
||||
sqlite3_analyzer.exe: $(TESTFIXTURE_SRC) spaceanal_tcl.h
|
||||
|
9
main.mk
9
main.mk
@ -550,13 +550,8 @@ threadtest: threadtest3$(EXE)
|
||||
|
||||
sqlite3_analyzer$(EXE): $(TOP)/src/tclsqlite.c sqlite3.c $(TESTSRC) \
|
||||
$(TOP)/tool/spaceanal.tcl
|
||||
sed \
|
||||
-e '/^#/d' \
|
||||
-e 's,\\,\\\\,g' \
|
||||
-e 's,",\\",g' \
|
||||
-e 's,^,",' \
|
||||
-e 's,$$,\\n",' \
|
||||
$(TOP)/tool/spaceanal.tcl >spaceanal_tcl.h
|
||||
$(NAWK) -f $(TOP)/tool/tostr.awk $(TOP)/tool/spaceanal.tcl \
|
||||
>spaceanal_tcl.h
|
||||
$(TCCX) $(TCL_FLAGS) -DTCLSH=2 $(TESTFIXTURE_FLAGS) \
|
||||
-DSQLITE_TEST=1 -DSQLITE_PRIVATE="" \
|
||||
$(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c \
|
||||
|
15
manifest
15
manifest
@ -1,9 +1,9 @@
|
||||
C More\stypo\sfixes\sin\sevidence\smarks.\s\sNo\scode\schanges.
|
||||
D 2011-06-20T23:51:33.581
|
||||
C Add\sa\snew\sAWK\sscript\sin\sthe\stool/\sfolder\sfor\sconverting\stext\sfiles\sinto\nC\sstring\sliterals.\s\sUse\sit\sfor\sbuilding\ssqlite3_analyzer.
|
||||
D 2011-06-21T03:36:06.406
|
||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||
F Makefile.in c1d7a7f4fd8da6b1815032efca950e3d5125407e
|
||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||
F Makefile.msc c942f2ceb9385d6c75b01ee3d38d8a189fb76e8c
|
||||
F Makefile.msc 341373786f1481b6027e26162d2a73db4ad12306
|
||||
F Makefile.vxworks c85ec1d8597fe2f7bc225af12ac1666e21379151
|
||||
F README cd04a36fbc7ea56932a4052d7d0b7f09f27c33d6
|
||||
F VERSION 3fcdd7fbe3eb282df3978fe77288544543767961
|
||||
@ -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 6de0d92dcae3d399a6bafaeb23b57f6ef0f41955
|
||||
F main.mk 4918ba9d27921895ddc6abaeebb43a633f5d23c7
|
||||
F mkdll.sh 7d09b23c05d56532e9d44a50868eb4b12ff4f74a
|
||||
F mkextu.sh 416f9b7089d80e5590a29692c9d9280a10dbad9f
|
||||
F mkextw.sh 4123480947681d9b434a5e7b1ee08135abe409ac
|
||||
@ -944,9 +944,10 @@ F tool/speedtest8.c 2902c46588c40b55661e471d7a86e4dd71a18224
|
||||
F tool/speedtest8inst1.c 293327bc76823f473684d589a8160bde1f52c14e
|
||||
F tool/split-sqlite3c.tcl d9be87f1c340285a3e081eb19b4a247981ed290c
|
||||
F tool/symbols.sh bc2a3709940d47c8ac8e0a1fdf17ec801f015a00
|
||||
F tool/tostr.awk 11760e1b94a5d3dcd42378f3cc18544c06cfa576
|
||||
F tool/vdbe-compress.tcl d70ea6d8a19e3571d7ab8c9b75cba86d1173ff0f
|
||||
F tool/warnings.sh 347d974d143cf132f953b565fbc03026f19fcb4d
|
||||
P bd980be471b185e2dc45875804103d5afc8f78cf
|
||||
R 129d3396a51cd277a2cd5fd90ed058d9
|
||||
P e60eefc76fa5066720d76858f6cfca56365330ee
|
||||
R 6bcbb640ed0444c63b52a62d6c605768
|
||||
U drh
|
||||
Z c467af82d7eff2f784ff6186e148e641
|
||||
Z 23ac254af253dc4e456f23427954539d
|
||||
|
@ -1 +1 @@
|
||||
e60eefc76fa5066720d76858f6cfca56365330ee
|
||||
dcb46d3f68e219a84c67c7ffef26fd2076a0ba28
|
9
tool/tostr.awk
Normal file
9
tool/tostr.awk
Normal file
@ -0,0 +1,9 @@
|
||||
#!/usr/bin/awk
|
||||
#
|
||||
# Convert input text into a C string
|
||||
#
|
||||
{
|
||||
gsub(/\\/,"\\\\");
|
||||
gsub(/\"/,"\\\"");
|
||||
print "\"" $0 "\\n\"";
|
||||
}
|
Loading…
Reference in New Issue
Block a user