summaryrefslogtreecommitdiff
path: root/ext/pdo_sqlite/sqlite/mkopcodec.awk
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pdo_sqlite/sqlite/mkopcodec.awk')
-rw-r--r--ext/pdo_sqlite/sqlite/mkopcodec.awk12
1 files changed, 9 insertions, 3 deletions
diff --git a/ext/pdo_sqlite/sqlite/mkopcodec.awk b/ext/pdo_sqlite/sqlite/mkopcodec.awk
index 6119272bd7..bf6bfbeb37 100644
--- a/ext/pdo_sqlite/sqlite/mkopcodec.awk
+++ b/ext/pdo_sqlite/sqlite/mkopcodec.awk
@@ -10,13 +10,19 @@
#
BEGIN {
print "/* Automatically generated. Do not edit */"
- print "/* See the mkopcodec.h script for details. */"
+ print "/* See the mkopcodec.awk script for details. */"
+ printf "#if !defined(SQLITE_OMIT_EXPLAIN)"
+ printf " || !defined(NDEBUG)"
+ printf " || defined(VDBE_PROFILE)"
+ print " || defined(SQLITE_DEBUG)"
print "const char *const sqlite3OpcodeNames[] = { \"?\","
}
-/^#define OP_/ {
+/define OP_/ {
sub("OP_","",$2)
- print " \"" $2 "\","
+ i++
+ printf " /* %3d */ \"%s\",\n", $3, $2
}
END {
print "};"
+ print "#endif"
}