From: drh Date: Wed, 7 Oct 2015 12:11:36 +0000 (+0000) Subject: Convert the mkopcodec.awk script into tool/mkopcodec.tcl. X-Git-Tag: version-3.10.0~237^2~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7651e0a43969cd7e8f524a300cdf8abd094a2a4b;p=thirdparty%2Fsqlite.git Convert the mkopcodec.awk script into tool/mkopcodec.tcl. FossilOrigin-Name: 1506cb33fcf61e2ef97b35b99e58fbf21f4f5496 --- diff --git a/Makefile.in b/Makefile.in index 20c8420d34..b78dbac1a2 100644 --- a/Makefile.in +++ b/Makefile.in @@ -899,8 +899,8 @@ tclsqlite3$(TEXE): tclsqlite-shell.lo libsqlite3.la # Rules to build opcodes.c and opcodes.h # -opcodes.c: opcodes.h $(TOP)/mkopcodec.awk - $(NAWK) -f $(TOP)/mkopcodec.awk opcodes.h >opcodes.c +opcodes.c: opcodes.h $(TOP)/tool/mkopcodec.tcl + $(TCLSH_CMD) $(TOP)/tool/mkopcodec.tcl opcodes.h >opcodes.c opcodes.h: parse.h $(TOP)/src/vdbe.c $(TOP)/tool/mkopcodeh.tcl cat parse.h $(TOP)/src/vdbe.c | $(TCLSH_CMD) $(TOP)/tool/mkopcodeh.tcl >opcodes.h diff --git a/Makefile.msc b/Makefile.msc index 124761757d..d21bab0d8e 100644 --- a/Makefile.msc +++ b/Makefile.msc @@ -1572,8 +1572,8 @@ tclsqlite3.exe: tclsqlite-shell.lo $(SQLITE3C) $(LIBRESOBJS) # Rules to build opcodes.c and opcodes.h # -opcodes.c: opcodes.h $(TOP)\mkopcodec.awk - $(NAWK) -f $(TOP)\mkopcodec.awk opcodes.h > opcodes.c +opcodes.c: opcodes.h $(TOP)\tool\mkopcodec.tcl + $(TCLSH_CMD) $(TOP)\tool\mkopcodec.tcl opcodes.h > opcodes.c opcodes.h: parse.h $(TOP)\src\vdbe.c $(TOP)\tool\mkopcodeh.tcl type parse.h $(TOP)\src\vdbe.c | $(TCLSH_CMD) $(TOP)\tool\mkopcodeh.awk > opcodes.h diff --git a/main.mk b/main.mk index cc413faca2..9c7abf7277 100644 --- a/main.mk +++ b/main.mk @@ -579,8 +579,8 @@ tclsqlite.o: $(TOP)/src/tclsqlite.c $(HDR) # Rules to build opcodes.c and opcodes.h # -opcodes.c: opcodes.h $(TOP)/mkopcodec.awk - $(NAWK) -f $(TOP)/mkopcodec.awk opcodes.h >opcodes.c +opcodes.c: opcodes.h $(TOP)/tool/mkopcodec.tcl + tclsh $(TOP)/tool/mkopcodec.tcl opcodes.h >opcodes.c opcodes.h: parse.h $(TOP)/src/vdbe.c $(TOP)/tool/mkopcodeh.tcl cat parse.h $(TOP)/src/vdbe.c | \ diff --git a/manifest b/manifest index 1a4dd94095..b54e68ae0a 100644 --- a/manifest +++ b/manifest @@ -1,9 +1,9 @@ -C Change\smkopcodeh.awk\sinto\stool/mkopcodeh.tcl. -D 2015-10-07T02:52:09.315 +C Convert\sthe\smkopcodec.awk\sscript\sinto\stool/mkopcodec.tcl. +D 2015-10-07T12:11:36.664 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f -F Makefile.in dd1f363468240142a5be1c9d58014dc9b8eae2f4 +F Makefile.in da829ae5a1f60e3ff7d76a979628ce4a1bfc5d7d F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 -F Makefile.msc 8fb99d7b4e8b2e812a2360b8356d956d26e0e953 +F Makefile.msc 5ae4a363bc7cfbd18814e077f67bb418e6e3378d F Makefile.vxworks e1b65dea203f054e71653415bd8f96dcaed47858 F README.md 8ecc12493ff9f820cdea6520a9016001cb2e59b7 F VERSION ccfc4d1576dbfdeece0a4372a2e6a2e37d3e7975 @@ -263,8 +263,7 @@ F ext/userauth/userauth.c 5fa3bdb492f481bbc1709fc83c91ebd13460c69e F install-sh 9d4de14ab9fb0facae2f48780b874848cbf2f895 x F ltmain.sh 3ff0879076df340d2e23ae905484d8c15d5fdea8 F magic.txt 8273bf49ba3b0c8559cb2774495390c31fd61c60 -F main.mk 9fe51a296a2550282db357d2b3825cc32fbc455b -F mkopcodec.awk c2ff431854d702cdd2d779c9c0d1f58fa16fa4ea +F main.mk b67cb215800e4602744db3c6abdb77aac8adbf5e F mkso.sh fd21c06b063bb16a5d25deea1752c2da6ac3ed83 F mptest/config01.test 3c6adcbc50b991866855f1977ff172eb6d901271 F mptest/config02.test 4415dfe36c48785f751e16e32c20b077c28ae504 @@ -1351,6 +1350,7 @@ F tool/loadfts.c c3c64e4d5e90e8ba41159232c2189dba4be7b862 F tool/logest.c eef612f8adf4d0993dafed0416064cf50d5d33c6 F tool/mkautoconfamal.sh d1a2da0e15b2ed33d60af35c7e9d483f13a8eb9f F tool/mkkeywordhash.c dfff09dbbfaf950e89af294f48f902181b144670 +F tool/mkopcodec.tcl edde8adc42621b5e598127f8cdc6d52cfe21f52b F tool/mkopcodeh.tcl e04177031532b7aa9379ded50e820231ac4abd6e F tool/mkopts.tcl 66ac10d240cc6e86abd37dc908d50382f84ff46e F tool/mkpragmatab.tcl 84af2b180484323a2ea22a2279e8bd9e3e1e492e @@ -1389,10 +1389,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1 F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4 F tool/warnings.sh 48bd54594752d5be3337f12c72f28d2080cb630b F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f -P 0abd65294e6e8db68e7ce6724f02f17ba1cb3422 -R 33730b016d975e72f95dcd99735ce552 -T *branch * omit-awk -T *sym-omit-awk * -T -sym-trunk * +P ed0ebc460b54939862e3bddee2bb9bcb9f69c747 +R 725a0812f70e1ffeb50dd24066c3fbf1 U drh -Z 05cb2395dd6fc47d133085b2716a644b +Z a24c1f360278b392b8819db30361ce0f diff --git a/manifest.uuid b/manifest.uuid index 7bf1ca41d8..3254b996cd 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -ed0ebc460b54939862e3bddee2bb9bcb9f69c747 \ No newline at end of file +1506cb33fcf61e2ef97b35b99e58fbf21f4f5496 \ No newline at end of file diff --git a/mkopcodec.awk b/mkopcodec.awk deleted file mode 100644 index de19068c20..0000000000 --- a/mkopcodec.awk +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/awk -f -# -# This AWK script scans the opcodes.h file (which is itself generated by -# another awk script) and uses the information gleaned to create the -# opcodes.c source file. -# -# Opcodes.c contains strings which are the symbolic names for the various -# opcodes used by the VDBE. These strings are used when disassembling a -# VDBE program during tracing or as a result of the EXPLAIN keyword. -# -BEGIN { - print "/* Automatically generated. Do not edit */" - print "/* See the mkopcodec.awk script for details. */" - printf "#if !defined(SQLITE_OMIT_EXPLAIN)" - printf " || defined(VDBE_PROFILE)" - print " || defined(SQLITE_DEBUG)" - print "#if defined(SQLITE_ENABLE_EXPLAIN_COMMENTS) || defined(SQLITE_DEBUG)" - print "# define OpHelp(X) \"\\0\" X" - print "#else" - print "# define OpHelp(X)" - print "#endif" - print "const char *sqlite3OpcodeName(int i){" - print " static const char *const azName[] = { \"?\"," - mx = 0 -} -/^.define OP_/ { - sub("OP_","",$2) - i = $3+0 - label[i] = $2 - if( mx