]> git.ipfire.org Git - thirdparty/sqlite.git/commitdiff
Fix typo in the MSVC makefile. Replace remaining uses of AWK in the MSVC makefile...
authormistachkin <mistachkin@noemail.net>
Sat, 10 Oct 2015 01:55:57 +0000 (01:55 +0000)
committermistachkin <mistachkin@noemail.net>
Sat, 10 Oct 2015 01:55:57 +0000 (01:55 +0000)
FossilOrigin-Name: f8c2193b64979a2fe480fcf913573b5fac06235e

Makefile.msc
manifest
manifest.uuid
tool/replace.tcl [new file with mode: 0644]

index 71b5fc8cc93b9ad750bf48991677363a1dc0d2ea..d8459e8492c1024a6610b4412c0ab62f01e1fc68 100644 (file)
@@ -809,12 +809,6 @@ LTLIBPATHS = $(LTLIBPATHS) /LIBPATH:$(ICULIBDIR)
 LTLIBS = $(LTLIBS) $(LIBICU)
 !ENDIF
 
-# nawk compatible awk.
-#
-!IFNDEF NAWK
-NAWK = gawk.exe
-!ENDIF
-
 # You should not have to change anything below this line
 ###############################################################################
 
@@ -1331,7 +1325,7 @@ $(LIBRESOBJS):    $(TOP)\src\sqlite3.rc $(HDR)
        echo #ifndef SQLITE_RESOURCE_VERSION > sqlite3rc.h
        for /F %%V in ('type "$(TOP)\VERSION"') do ( \
                echo #define SQLITE_RESOURCE_VERSION %%V \
-                       | $(NAWK) "/.*/ { gsub(/[.]/,\",\");print }" >> sqlite3rc.h \
+                       | $(TCLSH_CMD) $(TOP)\tool\replace.tcl exact . ^, >> sqlite3rc.h \
        )
        echo #endif >> sqlite3rc.h
        $(LTRCOMPILE) -fo $(LIBRESOBJS) $(TOP)\src\sqlite3.rc
@@ -1576,7 +1570,7 @@ 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
+       type parse.h $(TOP)\src\vdbe.c | $(TCLSH_CMD) $(TOP)\tool\mkopcodeh.tcl > opcodes.h
 
 # Rules to build parse.c and parse.h - the outputs of lemon.
 #
@@ -1858,7 +1852,7 @@ dll: sqlite3.dll
 sqlite3.def: libsqlite3.lib
        echo EXPORTS > sqlite3.def
        dumpbin /all libsqlite3.lib \
-               | $(NAWK) "/ 1 _?sqlite3_/ { sub(/^.* _?/,\"\");print }" \
+               | $(TCLSH_CMD) $(TOP)\tool\replace.tcl include "^\s+1 _?(sqlite3_.*)$$" "\1" \
                | sort >> sqlite3.def
 
 sqlite3.dll: $(LIBOBJ) $(LIBRESOBJS) $(CORE_LINK_DEP)
index 689702bf1b012d4a5b5f3024089fb1d3202d0cf2..ac0312bb8a9c0763c9f74a0e1d8e1dedddc868a5 100644 (file)
--- a/manifest
+++ b/manifest
@@ -1,8 +1,8 @@
-C More\sfine-tuning\sto\sthe\snew\sTclKit\stools.
-D 2015-10-10T00:53:28.483
+C Fix\stypo\sin\sthe\sMSVC\smakefile.\s\sReplace\sremaining\suses\sof\sAWK\sin\sthe\sMSVC\smakefile\swith\sa\sTcl\sscript.
+D 2015-10-10T01:55:57.399
 F Makefile.in 2a247c733c2dd6fab703df04dd009b26413956f5
 F Makefile.linux-gcc 7bc79876b875010e8c8f9502eb935ca92aa3c434
-F Makefile.msc 17ce18bb7e9ca2ad3abed9b0a1fcbef3fbe8f307
+F Makefile.msc d40af03b1453a4f5b132cfa5ffef36a4c4fc3338
 F README.md 8ecc12493ff9f820cdea6520a9016001cb2e59b7
 F VERSION ccfc4d1576dbfdeece0a4372a2e6a2e37d3e7975
 F aclocal.m4 a5c22d164aff7ed549d53a90fa56d56955281f50
@@ -1363,6 +1363,7 @@ F tool/mkvsix.tcl bbe57cd9ae11c6cc70319241101ef8d2b8c3765b
 F tool/offsets.c fe4262fdfa378e8f5499a42136d17bf3b98f6091
 F tool/omittest.tcl 34d7ac01fe4fd18e3637f64abe12c40eca0f6b97
 F tool/pagesig.c ff0ca355fd3c2398e933da5e22439bbff89b803b
+F tool/replace.tcl 7727c60a04299b65a92f5e1590896fea0f25b9e0
 F tool/restore_jrnl.tcl 6957a34f8f1f0f8285e07536225ec3b292a9024a
 F tool/rollback-test.c 9fc98427d1e23e84429d7e6d07d9094fbdec65a5
 F tool/showdb.c b1e16174385d5bd0815823a7fda1ecc82ed6088b
@@ -1389,7 +1390,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 1d2f82df6774f8d66bfc5d67d5dad9f068a1069c
-R e581949b3345aa5207b2c38f2d8bf17e
+P 43addd8aa04c3faceb9d303672e330294af01a16
+R 006632f80fd4c638e12a5eb804e62e4f
 U mistachkin
-Z 2c1d38a7e80b3d62039ba691f1ca8a45
+Z 791ad8ca8445d57bc0ffe78a443c7839
index e20379fb17ced1e53a4bd78ae5415e7b9c9ae5bc..33acad903824415c6b38be941ef4ffde6d6e9521 100644 (file)
@@ -1 +1 @@
-43addd8aa04c3faceb9d303672e330294af01a16
\ No newline at end of file
+f8c2193b64979a2fe480fcf913573b5fac06235e
\ No newline at end of file
diff --git a/tool/replace.tcl b/tool/replace.tcl
new file mode 100644 (file)
index 0000000..b01a83a
--- /dev/null
@@ -0,0 +1,20 @@
+#!/usr/bin/tcl
+#
+# Replace string with another string -OR- include
+# only lines successfully modified with a regular
+# expression.
+#
+set mode [string tolower [lindex $argv 0]]
+set from [lindex $argv 1]
+set to [lindex $argv 2]
+if {$mode ni [list exact include]} {exit 1}
+if {[string length $from]==0} {exit 2}
+while {![eof stdin]} {
+  set line [gets stdin]
+  if {[eof stdin]} break
+  switch -exact $mode {
+    exact {set line [string map [list $from $to] $line]}
+    include {if {[regsub -all -- $from $line $to line]==0} continue}
+  }
+  puts stdout $line
+}