/ Check-in [5b677521]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Convert the tool/tostr.awk script into tool/tostr.tcl. Remove two obsolete Makefiles. Purge NAWK from the configure script and from unix makefiles. There are still two uses of NAWK in Makefile.msc.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | omit-awk
Files: files | file ages | folders
SHA1: 5b6775215327a89232f5059653747a18e83b8b4b
User & Date: drh 2015-10-07 12:36:42
Context
2015-10-09
17:36
Add tool capable of downloading a TclKit (and its associated SDK) on Windows. check-in: 50673dda user: mistachkin tags: omit-awk
2015-10-07
12:36
Convert the tool/tostr.awk script into tool/tostr.tcl. Remove two obsolete Makefiles. Purge NAWK from the configure script and from unix makefiles. There are still two uses of NAWK in Makefile.msc. check-in: 5b677521 user: drh tags: omit-awk
12:21
Change the addopcodes.awk script into tool/addopcodes.tcl. check-in: 8bbf3714 user: drh tags: omit-awk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Deleted Makefile.arm-wince-mingw32ce-gcc.

     1         -#!/usr/make
     2         -#
     3         -# Makefile for SQLITE
     4         -#
     5         -# This is a template makefile for SQLite.  Most people prefer to
     6         -# use the autoconf generated "configure" script to generate the
     7         -# makefile automatically.  But that does not work for everybody
     8         -# and in every situation.  If you are having problems with the
     9         -# "configure" script, you might want to try this makefile as an
    10         -# alternative.  Create a copy of this file, edit the parameters
    11         -# below and type "make".
    12         -#
    13         -
    14         -#### The directory where to find the mingw32ce tools
    15         -MINGW32CE = /opt/mingw32ce/bin
    16         -
    17         -#### The target prefix of the mingw32ce tools
    18         -TARGET = arm-wince-mingw32ce
    19         -
    20         -#### The toplevel directory of the source tree.  This is the directory
    21         -#    that contains this "Makefile.in" and the "configure.in" script.
    22         -#
    23         -TOP = ../sqlite
    24         -
    25         -#### C Compiler and options for use in building executables that
    26         -#    will run on the platform that is doing the build.
    27         -#
    28         -BCC = gcc -g -O2
    29         -#BCC = /opt/ancic/bin/c89 -0
    30         -
    31         -#### If the target operating system supports the "usleep()" system
    32         -#    call, then define the HAVE_USLEEP macro for all C modules.
    33         -#
    34         -USLEEP = 
    35         -#USLEEP = -DHAVE_USLEEP=1
    36         -
    37         -#### If you want the SQLite library to be safe for use within a 
    38         -#    multi-threaded program, then define the following macro
    39         -#    appropriately:
    40         -#
    41         -THREADSAFE = -DTHREADSAFE=1
    42         -#THREADSAFE = -DTHREADSAFE=0
    43         -
    44         -#### Specify any extra linker options needed to make the library
    45         -#    thread safe
    46         -#
    47         -#THREADLIB = -lpthread
    48         -THREADLIB = 
    49         -
    50         -#### Specify any extra libraries needed to access required functions.
    51         -#
    52         -#TLIBS = -lrt    # fdatasync on Solaris 8
    53         -TLIBS = 
    54         -
    55         -#### Leave SQLITE_DEBUG undefined for maximum speed.  Use SQLITE_DEBUG=1
    56         -#    to check for memory leaks.  Use SQLITE_DEBUG=2 to print a log of all
    57         -#    malloc()s and free()s in order to track down memory leaks.
    58         -#    
    59         -#    SQLite uses some expensive assert() statements in the inner loop.
    60         -#    You can make the library go almost twice as fast if you compile
    61         -#    with -DNDEBUG=1
    62         -#
    63         -#OPTS = -DSQLITE_DEBUG=2
    64         -#OPTS = -DSQLITE_DEBUG=1
    65         -#OPTS = 
    66         -OPTS = -DNDEBUG=1 -DSQLITE_OS_WIN=1 -D_WIN32_WCE=1
    67         -#OPTS += -DHAVE_FDATASYNC=1
    68         -
    69         -#### The suffix to add to executable files.  ".exe" for windows.
    70         -#    Nothing for unix.
    71         -#
    72         -EXE = .exe
    73         -#EXE =
    74         -
    75         -#### C Compile and options for use in building executables that 
    76         -#    will run on the target platform.  This is usually the same
    77         -#    as BCC, unless you are cross-compiling.
    78         -#
    79         -#TCC = gcc -O6
    80         -#TCC = gcc -g -O0 -Wall
    81         -#TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
    82         -#TCC = /opt/mingw/bin/i386-mingw32-gcc -O6
    83         -TCC = $(MINGW32CE)/$(TARGET)-gcc -O2
    84         -#TCC = /opt/ansic/bin/c89 -O +z -Wl,-a,archive
    85         -
    86         -#### Tools used to build a static library.
    87         -#
    88         -#AR = ar cr
    89         -#AR = /opt/mingw/bin/i386-mingw32-ar cr
    90         -AR = $(MINGW32CE)/$(TARGET)-ar cr
    91         -#RANLIB = ranlib
    92         -#RANLIB = /opt/mingw/bin/i386-mingw32-ranlib
    93         -RANLIB = $(MINGW32CE)/$(TARGET)-ranlib
    94         -
    95         -#MKSHLIB = gcc -shared
    96         -#SO = so
    97         -#SHPREFIX = lib
    98         -MKSHLIB = $(MINGW32CE)/$(TARGET)-gcc -shared
    99         -SO = dll
   100         -SHPREFIX =
   101         -
   102         -#### Extra compiler options needed for programs that use the TCL library.
   103         -#
   104         -#TCL_FLAGS =
   105         -#TCL_FLAGS = -DSTATIC_BUILD=1
   106         -TCL_FLAGS = -I/home/drh/tcltk/8.5linux
   107         -#TCL_FLAGS = -I/home/drh/tcltk/8.5win -DSTATIC_BUILD=1
   108         -#TCL_FLAGS = -I/home/drh/tcltk/8.3hpux
   109         -
   110         -#### Linker options needed to link against the TCL library.
   111         -#
   112         -#LIBTCL = -ltcl -lm -ldl
   113         -LIBTCL = /home/drh/tcltk/8.5linux/libtcl8.5g.a -lm -ldl
   114         -#LIBTCL = /home/drh/tcltk/8.5win/libtcl85s.a -lmsvcrt
   115         -#LIBTCL = /home/drh/tcltk/8.3hpux/libtcl8.3.a -ldld -lm -lc
   116         -
   117         -#### Additional objects for SQLite library when TCL support is enabled.
   118         -TCLOBJ =
   119         -#TCLOBJ = tclsqlite.o
   120         -
   121         -#### Compiler options needed for programs that use the readline() library.
   122         -#
   123         -READLINE_FLAGS =
   124         -#READLINE_FLAGS = -DHAVE_READLINE=1 -I/usr/include/readline
   125         -
   126         -#### Linker options needed by programs using readline() must link against.
   127         -#
   128         -LIBREADLINE =
   129         -#LIBREADLINE = -static -lreadline -ltermcap
   130         -
   131         -#### Which "awk" program provides nawk compatibilty
   132         -#
   133         -# NAWK = nawk
   134         -NAWK = awk
   135         -
   136         -# You should not have to change anything below this line
   137         -###############################################################################
   138         -include $(TOP)/main.mk

Changes to Makefile.in.

   151    151   ALLOWRELEASE = @ALLOWRELEASE@
   152    152   
   153    153   # libtool compile/link/install
   154    154   LTCOMPILE = $(LIBTOOL) --mode=compile --tag=CC $(TCC) $(LTCOMPILE_EXTRAS)
   155    155   LTLINK = $(LIBTOOL) --mode=link $(TCC) $(LTCOMPILE_EXTRAS) @LDFLAGS@ $(LTLINK_EXTRAS)
   156    156   LTINSTALL = $(LIBTOOL) --mode=install $(INSTALL)
   157    157   
   158         -# nawk compatible awk.
   159         -NAWK = @AWK@
   160         -
   161    158   # You should not have to change anything below this line
   162    159   ###############################################################################
   163    160   
   164    161   USE_AMALGAMATION = @USE_AMALGAMATION@
   165    162   
   166    163   # Object files for the SQLite library (non-amalgamation).
   167    164   #
................................................................................
  1092   1089   
  1093   1090   sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
  1094   1091   	echo "#define TCLSH 2" > $@
  1095   1092   	echo "#define SQLITE_ENABLE_DBSTAT_VTAB 1" >> $@
  1096   1093   	cat sqlite3.c $(TOP)/src/tclsqlite.c >> $@
  1097   1094   	echo "static const char *tclsh_main_loop(void){" >> $@
  1098   1095   	echo "static const char *zMainloop = " >> $@
  1099         -	$(NAWK) -f $(TOP)/tool/tostr.awk $(TOP)/tool/spaceanal.tcl >> $@
         1096  +	$(TCLSH_CMD) $(TOP)/tool/tostr.tcl $(TOP)/tool/spaceanal.tcl >> $@
  1100   1097   	echo "; return zMainloop; }" >> $@
  1101   1098   
  1102   1099   sqlite3_analyzer$(TEXE): sqlite3_analyzer.c
  1103   1100   	$(LTLINK) sqlite3_analyzer.c -o $@ $(LIBTCL) $(TLIBS)
  1104   1101   
  1105   1102   showdb$(TEXE):	$(TOP)/tool/showdb.c sqlite3.lo
  1106   1103   	$(LTLINK) -o $@ $(TOP)/tool/showdb.c sqlite3.lo $(TLIBS)

Changes to Makefile.linux-gcc.

   114    114   #READLINE_FLAGS = -DHAVE_READLINE=1 -I/usr/include/readline
   115    115   
   116    116   #### Linker options needed by programs using readline() must link against.
   117    117   #
   118    118   LIBREADLINE =
   119    119   #LIBREADLINE = -static -lreadline -ltermcap
   120    120   
   121         -#### Which "awk" program provides nawk compatibilty
   122         -#
   123         -# NAWK = nawk
   124         -NAWK = awk
   125         -
   126    121   # You should not have to change anything below this line
   127    122   ###############################################################################
   128    123   include $(TOP)/main.mk

Changes to Makefile.msc.

  1770   1770   
  1771   1771   sqlite3_analyzer.c: $(SQLITE3C) $(TOP)\src\tclsqlite.c $(TOP)\tool\spaceanal.tcl
  1772   1772   	echo #define TCLSH 2 > $@
  1773   1773   	echo #define SQLITE_ENABLE_DBSTAT_VTAB 1 >> $@
  1774   1774   	copy $@ + $(SQLITE3C) + $(TOP)\src\tclsqlite.c $@
  1775   1775   	echo static const char *tclsh_main_loop(void){ >> $@
  1776   1776   	echo static const char *zMainloop = >> $@
  1777         -	$(NAWK) -f $(TOP)\tool\tostr.awk $(TOP)\tool\spaceanal.tcl >> $@
         1777  +	$(TCLSH_CMD) $(TOP)\tool\tostr.tcl $(TOP)\tool\spaceanal.tcl >> $@
  1778   1778   	echo ; return zMainloop; } >> $@
  1779   1779   
  1780   1780   sqlite3_analyzer.exe:	sqlite3_analyzer.c $(LIBRESOBJS)
  1781   1781   	$(LTLINK) $(NO_WARN) -DBUILD_sqlite -I$(TCLINCDIR) sqlite3_analyzer.c \
  1782   1782   		/link $(LTLINKOPTS) $(LTLIBPATHS) $(LIBRESOBJS) $(LTLIBS) $(TLIBS)
  1783   1783   
  1784   1784   testloadext.lo:	$(TOP)\src\test_loadext.c

Deleted Makefile.vxworks.

     1         -#!/usr/make
     2         -#
     3         -# Makefile for SQLITE on VxWorks
     4         -
     5         -ifeq ($(FORCPU),)
     6         -  FORCPU = SH32gnule
     7         -endif
     8         -
     9         -TOOL_FAMILY = gnu
    10         -
    11         -include $(WIND_USR)/tool/gnu/make.$(FORCPU)
    12         -
    13         -#### The toplevel directory of the source tree.  This is the directory
    14         -#    that contains this "Makefile.in" and the "configure.in" script.
    15         -#
    16         -TOP = .
    17         -
    18         -#### C Compiler and options for use in building executables that
    19         -#    will run on the platform that is doing the build.
    20         -#
    21         -BCC = gcc -g -O2
    22         -#BCC = /opt/ancic/bin/c89 -0
    23         -
    24         -#### If the target operating system supports the "usleep()" system
    25         -#    call, then define the HAVE_USLEEP macro for all C modules.
    26         -#
    27         -USLEEP = 
    28         -#USLEEP = -DHAVE_USLEEP=1
    29         -
    30         -#### If you want the SQLite library to be safe for use within a 
    31         -#    multi-threaded program, then define the following macro
    32         -#    appropriately:
    33         -#
    34         -THREADSAFE = -DSQLITE_THREADSAFE=1
    35         -#THREADSAFE = -DSQLITE_THREADSAFE=0
    36         -
    37         -#### Specify any extra linker options needed to make the library
    38         -#    thread safe
    39         -#
    40         -#THREADLIB = -lpthread
    41         -THREADLIB = 
    42         -
    43         -#### Specify any extra libraries needed to access required functions.
    44         -#
    45         -ifeq ($(CPU),SH32) 
    46         -  # for SH4 shared library
    47         -  TLIBS_SHARED += -L$(WIND_USR)/lib/sh/SH32/commonle/PIC
    48         -else 
    49         -  # for all other CPUs shared library
    50         -  TLIBS_SHARED += $(LD_LINK_PATH_ATEND) $(LD_PARTIAL_LAST_FLAGS)
    51         -endif
    52         -# for static library
    53         -TLIBS += $(LD_LINK_PATH_ATEND) $(LD_PARTIAL_LAST_FLAGS)
    54         -
    55         -#### Leave SQLITE_DEBUG undefined for maximum speed.  Use SQLITE_DEBUG=1
    56         -#    to check for memory leaks.  Use SQLITE_DEBUG=2 to print a log of all
    57         -#    malloc()s and free()s in order to track down memory leaks.
    58         -#    
    59         -#    SQLite uses some expensive assert() statements in the inner loop.
    60         -#    You can make the library go almost twice as fast if you compile
    61         -#    with -DNDEBUG=1
    62         -#
    63         -#OPTS = -DSQLITE_DEBUG=2
    64         -#OPTS = -DSQLITE_DEBUG=1
    65         -#OPTS = 
    66         -OPTS = -DNDEBUG=1 -DSQLITE_OS_UNIX=1 $(THREADSAFE)
    67         -OPTS += -DSQLITE_OMIT_LOAD_EXTENSION=1
    68         -OPTS += -DSQLITE_ENABLE_LOCKING_STYLE=1
    69         -OPTS += -DSQLITE_THREAD_OVERRIDE_LOCK=0
    70         -OPTS += -DSQLITE_ENABLE_COLUMN_METADATA=1
    71         -OPTS += -DHAVE_FDATASYNC=1
    72         -
    73         -#### The suffix to add to executable files.  ".exe" for windows.
    74         -#    Nothing for unix.
    75         -#
    76         -EXE = .vxe
    77         -#EXE =
    78         -
    79         -#### C Compile and options for use in building executables that 
    80         -#    will run on the target platform.  This is usually the same
    81         -#    as BCC, unless you are cross-compiling.
    82         -#
    83         -#TCC = gcc -O6
    84         -#TCC = gcc -g -O0 -Wall
    85         -#TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
    86         -#TCC = /opt/mingw/bin/i386-mingw32-gcc -O6
    87         -TCC = $(CC) $(DEFINE_CC) -O2 -g -mrtp $(CC_ARCH_SPEC) -D_REENTRANT=1 -D_VX_CPU=_VX_$(CPU) -D_VX_TOOL_FAMILY=$(TOOL_FAMILY) -D_VX_TOOL=$(TOOL)
    88         -TCC += -I$(WIND_USR)/h -I$(WIND_USR)/h/wrn/coreip
    89         -#TCC = /opt/ansic/bin/c89 -O +z -Wl,-a,archive
    90         -
    91         -#TCC_SHARED = $(TCC) -fPIC
    92         -TCC_SHARED = $(TCC)
    93         -
    94         -#### Tools used to build a static library.
    95         -#
    96         -#ARX = ar cr
    97         -#ARX = /opt/mingw/bin/i386-mingw32-ar cr
    98         -AR += cr
    99         -#RANLIB = ranlib
   100         -#RANLIB = /opt/mingw/bin/i386-mingw32-ranlib
   101         -
   102         -#MKSHLIB = gcc -shared
   103         -#SO = so
   104         -#SHPREFIX = lib
   105         -MKSHLIB = $(CC) $(DEFINE_CC) -mrtp -shared $(CC_ARCH_SPEC) -D_VX_CPU=_VX_$(CPU) -D_VX_TOOL_FAMILY=$(TOOL_FAMILY) -D_VX_TOOL=$(TOOL)
   106         -SO = so
   107         -SHPREFIX = lib
   108         -
   109         -#### Extra compiler options needed for programs that use the TCL library.
   110         -#
   111         -#TCL_FLAGS =
   112         -#TCL_FLAGS = -DSTATIC_BUILD=1
   113         -TCL_FLAGS = -I/home/drh/tcltk/8.5linux
   114         -#TCL_FLAGS = -I/home/drh/tcltk/8.5win -DSTATIC_BUILD=1
   115         -#TCL_FLAGS = -I/home/drh/tcltk/8.3hpux
   116         -
   117         -#### Linker options needed to link against the TCL library.
   118         -#
   119         -#LIBTCL = -ltcl -lm -ldl
   120         -LIBTCL = /home/drh/tcltk/8.5linux/libtcl8.5g.a -lm -ldl
   121         -#LIBTCL = /home/drh/tcltk/8.5win/libtcl85s.a -lmsvcrt
   122         -#LIBTCL = /home/drh/tcltk/8.3hpux/libtcl8.3.a -ldld -lm -lc
   123         -
   124         -#### Additional objects for SQLite library when TCL support is enabled.
   125         -TCLOBJ =
   126         -#TCLOBJ = tclsqlite.o
   127         -
   128         -#### Compiler options needed for programs that use the readline() library.
   129         -#
   130         -READLINE_FLAGS =
   131         -#READLINE_FLAGS = -DHAVE_READLINE=1 -I/usr/include/readline
   132         -
   133         -#### Linker options needed by programs using readline() must link against.
   134         -#
   135         -LIBREADLINE =
   136         -#LIBREADLINE = -static -lreadline -ltermcap
   137         -
   138         -#### Which "awk" program provides nawk compatibilty
   139         -#
   140         -# NAWK = nawk
   141         -NAWK = awk
   142         -
   143         -
   144         -#### Pasted and adapted main.mk file
   145         -###############################################################################
   146         -# The following macros should be defined before this script is
   147         -# invoked:
   148         -#
   149         -# TOP              The toplevel directory of the source tree.  This is the
   150         -#                  directory that contains this "Makefile.in" and the
   151         -#                  "configure.in" script.
   152         -#
   153         -# BCC              C Compiler and options for use in building executables that
   154         -#                  will run on the platform that is doing the build.
   155         -#
   156         -# THREADLIB        Specify any extra linker options needed to make the library
   157         -#                  thread safe
   158         -#
   159         -# OPTS             Extra compiler command-line options.
   160         -#
   161         -# EXE              The suffix to add to executable files.  ".exe" for windows
   162         -#                  and "" for Unix.
   163         -#
   164         -# TCC              C Compiler and options for use in building executables that 
   165         -#                  will run on the target platform.  This is usually the same
   166         -#                  as BCC, unless you are cross-compiling.
   167         -#
   168         -# AR               Tools used to build a static library.
   169         -# RANLIB
   170         -#
   171         -# TCL_FLAGS        Extra compiler options needed for programs that use the
   172         -#                  TCL library.
   173         -#
   174         -# LIBTCL           Linker options needed to link against the TCL library.
   175         -#
   176         -# READLINE_FLAGS   Compiler options needed for programs that use the
   177         -#                  readline() library.
   178         -#
   179         -# LIBREADLINE      Linker options needed by programs using readline() must
   180         -#                  link against.
   181         -#
   182         -# NAWK             Nawk compatible awk program.  Older (obsolete?) solaris
   183         -#                  systems need this to avoid using the original AT&T AWK.
   184         -#
   185         -# Once the macros above are defined, the rest of this make script will
   186         -# build the SQLite library and testing tools.
   187         -################################################################################
   188         -
   189         -# This is how we compile
   190         -#
   191         -TCCX = $(TCC) $(OPTS) -I. -I$(TOP)/src -I$(TOP)
   192         -TCCX_SHARED = $(TCC_SHARED) $(OPTS) -I. -I$(TOP)/src -I$(TOP) \
   193         -	-I$(TOP)/ext/rtree -I$(TOP)/ext/icu -I$(TOP)/ext/fts3 \
   194         -	-I$(TOP)/ext/async
   195         -
   196         -# Object files for the SQLite library.
   197         -#
   198         -LIBOBJ+= alter.o analyze.o attach.o auth.o \
   199         -         backup.o bitvec.o btmutex.o btree.o build.o \
   200         -         callback.o complete.o date.o delete.o expr.o fault.o \
   201         -         fts3.o fts3_expr.o fts3_hash.o fts3_icu.o fts3_porter.o \
   202         -         fts3_tokenizer.o fts3_tokenizer1.o \
   203         -         func.o global.o hash.o \
   204         -         icu.o insert.o journal.o legacy.o loadext.o \
   205         -         main.o malloc.o mem0.o mem1.o mem2.o mem3.o mem5.o \
   206         -         memjournal.o \
   207         -         mutex.o mutex_noop.o mutex_unix.o mutex_w32.o \
   208         -         notify.o opcodes.o os.o os_unix.o os_win.o \
   209         -         pager.o parse.o pcache.o pcache1.o pragma.o prepare.o printf.o \
   210         -         random.o resolve.o rowset.o rtree.o select.o status.o \
   211         -         table.o tokenize.o trigger.o \
   212         -         update.o util.o vacuum.o \
   213         -         vdbe.o vdbeapi.o vdbeaux.o vdbeblob.o vdbemem.o \
   214         -         walker.o where.o utf.o vtab.o
   215         -
   216         -
   217         -
   218         -# All of the source code files.
   219         -#
   220         -SRC = \
   221         -  $(TOP)/src/alter.c \
   222         -  $(TOP)/src/analyze.c \
   223         -  $(TOP)/src/attach.c \
   224         -  $(TOP)/src/auth.c \
   225         -  $(TOP)/src/backup.c \
   226         -  $(TOP)/src/bitvec.c \
   227         -  $(TOP)/src/btmutex.c \
   228         -  $(TOP)/src/btree.c \
   229         -  $(TOP)/src/btree.h \
   230         -  $(TOP)/src/btreeInt.h \
   231         -  $(TOP)/src/build.c \
   232         -  $(TOP)/src/callback.c \
   233         -  $(TOP)/src/complete.c \
   234         -  $(TOP)/src/ctime.c \
   235         -  $(TOP)/src/date.c \
   236         -  $(TOP)/src/delete.c \
   237         -  $(TOP)/src/expr.c \
   238         -  $(TOP)/src/fault.c \
   239         -  $(TOP)/src/func.c \
   240         -  $(TOP)/src/global.c \
   241         -  $(TOP)/src/hash.c \
   242         -  $(TOP)/src/hash.h \
   243         -  $(TOP)/src/hwtime.h \
   244         -  $(TOP)/src/insert.c \
   245         -  $(TOP)/src/journal.c \
   246         -  $(TOP)/src/legacy.c \
   247         -  $(TOP)/src/loadext.c \
   248         -  $(TOP)/src/main.c \
   249         -  $(TOP)/src/malloc.c \
   250         -  $(TOP)/src/mem0.c \
   251         -  $(TOP)/src/mem1.c \
   252         -  $(TOP)/src/mem2.c \
   253         -  $(TOP)/src/mem3.c \
   254         -  $(TOP)/src/mem5.c \
   255         -  $(TOP)/src/memjournal.c \
   256         -  $(TOP)/src/msvc.h \
   257         -  $(TOP)/src/mutex.c \
   258         -  $(TOP)/src/mutex.h \
   259         -  $(TOP)/src/mutex_noop.c \
   260         -  $(TOP)/src/mutex_unix.c \
   261         -  $(TOP)/src/mutex_w32.c \
   262         -  $(TOP)/src/notify.c \
   263         -  $(TOP)/src/os.c \
   264         -  $(TOP)/src/os.h \
   265         -  $(TOP)/src/os_common.h \
   266         -  $(TOP)/src/os_setup.h \
   267         -  $(TOP)/src/os_unix.c \
   268         -  $(TOP)/src/os_win.c \
   269         -  $(TOP)/src/os_win.h \
   270         -  $(TOP)/src/pager.c \
   271         -  $(TOP)/src/pager.h \
   272         -  $(TOP)/src/parse.y \
   273         -  $(TOP)/src/pcache.c \
   274         -  $(TOP)/src/pcache.h \
   275         -  $(TOP)/src/pcache1.c \
   276         -  $(TOP)/src/pragma.c \
   277         -  $(TOP)/src/prepare.c \
   278         -  $(TOP)/src/printf.c \
   279         -  $(TOP)/src/random.c \
   280         -  $(TOP)/src/resolve.c \
   281         -  $(TOP)/src/rowset.c \
   282         -  $(TOP)/src/select.c \
   283         -  $(TOP)/src/status.c \
   284         -  $(TOP)/src/shell.c \
   285         -  $(TOP)/src/sqlite.h.in \
   286         -  $(TOP)/src/sqlite3ext.h \
   287         -  $(TOP)/src/sqliteInt.h \
   288         -  $(TOP)/src/sqliteLimit.h \
   289         -  $(TOP)/src/table.c \
   290         -  $(TOP)/src/tclsqlite.c \
   291         -  $(TOP)/src/tokenize.c \
   292         -  $(TOP)/src/trigger.c \
   293         -  $(TOP)/src/utf.c \
   294         -  $(TOP)/src/update.c \
   295         -  $(TOP)/src/util.c \
   296         -  $(TOP)/src/vacuum.c \
   297         -  $(TOP)/src/vdbe.c \
   298         -  $(TOP)/src/vdbe.h \
   299         -  $(TOP)/src/vdbeapi.c \
   300         -  $(TOP)/src/vdbeaux.c \
   301         -  $(TOP)/src/vdbeblob.c \
   302         -  $(TOP)/src/vdbemem.c \
   303         -  $(TOP)/src/vdbeInt.h \
   304         -  $(TOP)/src/vtab.c \
   305         -  $(TOP)/src/walker.c \
   306         -  $(TOP)/src/where.c
   307         -
   308         -# Source code for extensions
   309         -#
   310         -SRC += \
   311         -  $(TOP)/ext/fts1/fts1.c \
   312         -  $(TOP)/ext/fts1/fts1.h \
   313         -  $(TOP)/ext/fts1/fts1_hash.c \
   314         -  $(TOP)/ext/fts1/fts1_hash.h \
   315         -  $(TOP)/ext/fts1/fts1_porter.c \
   316         -  $(TOP)/ext/fts1/fts1_tokenizer.h \
   317         -  $(TOP)/ext/fts1/fts1_tokenizer1.c
   318         -SRC += \
   319         -  $(TOP)/ext/fts2/fts2.c \
   320         -  $(TOP)/ext/fts2/fts2.h \
   321         -  $(TOP)/ext/fts2/fts2_hash.c \
   322         -  $(TOP)/ext/fts2/fts2_hash.h \
   323         -  $(TOP)/ext/fts2/fts2_icu.c \
   324         -  $(TOP)/ext/fts2/fts2_porter.c \
   325         -  $(TOP)/ext/fts2/fts2_tokenizer.h \
   326         -  $(TOP)/ext/fts2/fts2_tokenizer.c \
   327         -  $(TOP)/ext/fts2/fts2_tokenizer1.c
   328         -SRC += \
   329         -  $(TOP)/ext/fts3/fts3.c \
   330         -  $(TOP)/ext/fts3/fts3.h \
   331         -  $(TOP)/ext/fts3/fts3_expr.c \
   332         -  $(TOP)/ext/fts3/fts3_expr.h \
   333         -  $(TOP)/ext/fts3/fts3_hash.c \
   334         -  $(TOP)/ext/fts3/fts3_hash.h \
   335         -  $(TOP)/ext/fts3/fts3_icu.c \
   336         -  $(TOP)/ext/fts3/fts3_porter.c \
   337         -  $(TOP)/ext/fts3/fts3_tokenizer.h \
   338         -  $(TOP)/ext/fts3/fts3_tokenizer.c \
   339         -  $(TOP)/ext/fts3/fts3_tokenizer1.c
   340         -SRC += \
   341         -  $(TOP)/ext/icu/sqliteicu.h \
   342         -  $(TOP)/ext/icu/icu.c 
   343         -SRC += \
   344         -  $(TOP)/ext/rtree/rtree.h \
   345         -  $(TOP)/ext/rtree/rtree.c
   346         -
   347         -
   348         -# Generated source code files
   349         -#
   350         -SRC += \
   351         -  keywordhash.h \
   352         -  opcodes.c \
   353         -  opcodes.h \
   354         -  parse.c \
   355         -  parse.h \
   356         -  sqlite3.h
   357         -
   358         -
   359         -# Source code to the test files.
   360         -#
   361         -TESTSRC = \
   362         -  $(TOP)/src/test1.c \
   363         -  $(TOP)/src/test2.c \
   364         -  $(TOP)/src/test3.c \
   365         -  $(TOP)/src/test4.c \
   366         -  $(TOP)/src/test5.c \
   367         -  $(TOP)/src/test6.c \
   368         -  $(TOP)/src/test7.c \
   369         -  $(TOP)/src/test8.c \
   370         -  $(TOP)/src/test9.c \
   371         -  $(TOP)/src/test_autoext.c \
   372         -  $(TOP)/src/test_async.c \
   373         -  $(TOP)/src/test_backup.c \
   374         -  $(TOP)/src/test_btree.c \
   375         -  $(TOP)/src/test_config.c \
   376         -  $(TOP)/src/test_devsym.c \
   377         -  $(TOP)/src/test_func.c \
   378         -  $(TOP)/src/test_hexio.c \
   379         -  $(TOP)/src/test_journal.c \
   380         -  $(TOP)/src/test_malloc.c \
   381         -  $(TOP)/src/test_md5.c \
   382         -  $(TOP)/src/test_mutex.c \
   383         -  $(TOP)/src/test_onefile.c \
   384         -  $(TOP)/src/test_osinst.c \
   385         -  $(TOP)/src/test_pcache.c \
   386         -  $(TOP)/src/test_schema.c \
   387         -  $(TOP)/src/test_server.c \
   388         -  $(TOP)/src/test_tclvar.c \
   389         -  $(TOP)/src/test_thread.c \
   390         -  $(TOP)/src/test_vfs.c \
   391         -  $(TOP)/src/test_wsd.c \
   392         -
   393         -#TESTSRC += $(TOP)/ext/fts2/fts2_tokenizer.c
   394         -#TESTSRC += $(TOP)/ext/fts3/fts3_tokenizer.c
   395         -
   396         -TESTSRC2 = \
   397         -  $(TOP)/src/attach.c $(TOP)/src/backup.c $(TOP)/src/btree.c                   \
   398         -  $(TOP)/src/build.c $(TOP)/src/ctime.c $(TOP)/src/date.c                      \
   399         -  $(TOP)/src/expr.c $(TOP)/src/func.c $(TOP)/src/insert.c $(TOP)/src/os.c      \
   400         -  $(TOP)/src/os_unix.c $(TOP)/src/os_win.c                 \
   401         -  $(TOP)/src/pager.c $(TOP)/src/pragma.c $(TOP)/src/prepare.c                  \
   402         -  $(TOP)/src/printf.c $(TOP)/src/random.c $(TOP)/src/pcache.c                  \
   403         -  $(TOP)/src/pcache1.c $(TOP)/src/select.c $(TOP)/src/tokenize.c               \
   404         -  $(TOP)/src/utf.c $(TOP)/src/util.c $(TOP)/src/vdbeapi.c $(TOP)/src/vdbeaux.c \
   405         -  $(TOP)/src/vdbe.c $(TOP)/src/vdbemem.c $(TOP)/src/where.c parse.c            \
   406         -  $(TOP)/ext/fts3/fts3.c $(TOP)/ext/fts3/fts3_expr.c                           \
   407         -  $(TOP)/ext/fts3/fts3_tokenizer.c                                             \
   408         -  $(TOP)/ext/async/sqlite3async.c
   409         -
   410         -# Header files used by all library source files.
   411         -#
   412         -HDR = \
   413         -   $(TOP)/src/btree.h \
   414         -   $(TOP)/src/btreeInt.h \
   415         -   $(TOP)/src/hash.h \
   416         -   $(TOP)/src/hwtime.h \
   417         -   keywordhash.h \
   418         -   $(TOP)/src/msvc.h \
   419         -   $(TOP)/src/mutex.h \
   420         -   opcodes.h \
   421         -   $(TOP)/src/os.h \
   422         -   $(TOP)/src/os_common.h \
   423         -   $(TOP)/src/os_setup.h \
   424         -   $(TOP)/src/os_win.h \
   425         -   $(TOP)/src/pager.h \
   426         -   $(TOP)/src/pcache.h \
   427         -   parse.h  \
   428         -   sqlite3.h  \
   429         -   $(TOP)/src/sqlite3ext.h \
   430         -   $(TOP)/src/sqliteInt.h  \
   431         -   $(TOP)/src/sqliteLimit.h \
   432         -   $(TOP)/src/vdbe.h \
   433         -   $(TOP)/src/vdbeInt.h
   434         -
   435         -# Header files used by extensions
   436         -#
   437         -EXTHDR += \
   438         -  $(TOP)/ext/fts1/fts1.h \
   439         -  $(TOP)/ext/fts1/fts1_hash.h \
   440         -  $(TOP)/ext/fts1/fts1_tokenizer.h
   441         -EXTHDR += \
   442         -  $(TOP)/ext/fts2/fts2.h \
   443         -  $(TOP)/ext/fts2/fts2_hash.h \
   444         -  $(TOP)/ext/fts2/fts2_tokenizer.h
   445         -EXTHDR += \
   446         -  $(TOP)/ext/fts3/fts3.h \
   447         -  $(TOP)/ext/fts3/fts3_expr.h \
   448         -  $(TOP)/ext/fts3/fts3_hash.h \
   449         -  $(TOP)/ext/fts3/fts3_tokenizer.h
   450         -EXTHDR += \
   451         -  $(TOP)/ext/rtree/rtree.h
   452         -EXTHDR += \
   453         -  $(TOP)/ext/icu/sqliteicu.h
   454         -
   455         -# This is the default Makefile target.  The objects listed here
   456         -# are what get build when you type just "make" with no arguments.
   457         -#
   458         -all:	sqlite3.h libsqlite3.a sqlite3$(EXE)
   459         -
   460         -libsqlite3.a:	$(LIBOBJ)
   461         -	$(AR) libsqlite3.a $(LIBOBJ)
   462         -	$(RANLIB) libsqlite3.a
   463         -
   464         -$(SHPREFIX)sqlite3.$(SO):	$(LIBOBJ)
   465         -	$(MKSHLIB) -o $(SHPREFIX)sqlite3.$(SO) $(LIBOBJ) $(TLIBS_SHARED)
   466         -
   467         -sqlite3$(EXE):	$(TOP)/src/shell.c libsqlite3.a sqlite3.h
   468         -	$(TCCX) $(READLINE_FLAGS) -o sqlite3$(EXE)      \
   469         -		$(TOP)/src/shell.c                      \
   470         -		$(LIBREADLINE) $(TLIBS) $(THREADLIB) -L. -lsqlite3
   471         -
   472         -# This target creates a directory named "tsrc" and fills it with
   473         -# copies of all of the C source code and header files needed to
   474         -# build on the target system.  Some of the C source code and header
   475         -# files are automatically generated.  This target takes care of
   476         -# all that automatic generation.
   477         -#
   478         -target_source:	$(SRC)
   479         -	rm -rf tsrc
   480         -	mkdir tsrc
   481         -	cp -f $(SRC) tsrc
   482         -	rm tsrc/sqlite.h.in tsrc/parse.y
   483         -	touch target_source
   484         -
   485         -sqlite3.c:	target_source $(TOP)/tool/mksqlite3c.tcl
   486         -	tclsh $(TOP)/tool/mksqlite3c.tcl
   487         -	cp sqlite3.c tclsqlite3.c
   488         -	cat $(TOP)/src/tclsqlite.c >>tclsqlite3.c
   489         -
   490         -fts2amal.c:	target_source $(TOP)/ext/fts2/mkfts2amal.tcl
   491         -	tclsh $(TOP)/ext/fts2/mkfts2amal.tcl
   492         -
   493         -fts3amal.c:	target_source $(TOP)/ext/fts3/mkfts3amal.tcl
   494         -	tclsh $(TOP)/ext/fts3/mkfts3amal.tcl
   495         -
   496         -# Rules to build the LEMON compiler generator
   497         -#
   498         -lemon:	$(TOP)/tool/lemon.c $(TOP)/src/lempar.c
   499         -	$(BCC) -o lemon $(TOP)/tool/lemon.c
   500         -	cp $(TOP)/src/lempar.c .
   501         -
   502         -# Rules to build individual *.o files from generated *.c files. This
   503         -# applies to:
   504         -#
   505         -#     parse.o
   506         -#     opcodes.o
   507         -#
   508         -%.o: %.c $(HDR)
   509         -	$(TCCX_SHARED) -c $<
   510         -
   511         -# Rules to build individual *.o files from files in the src directory.
   512         -#
   513         -%.o: $(TOP)/src/%.c $(HDR)
   514         -	$(TCCX_SHARED) -c $<
   515         -
   516         -tclsqlite.o:	$(TOP)/src/tclsqlite.c $(HDR)
   517         -	$(TCCX_SHARED) $(TCL_FLAGS) -c $(TOP)/src/tclsqlite.c
   518         -
   519         -
   520         -
   521         -# Rules to build opcodes.c and opcodes.h
   522         -#
   523         -opcodes.c:	opcodes.h $(TOP)/mkopcodec.awk
   524         -	$(NAWK) -f $(TOP)/mkopcodec.awk opcodes.h >opcodes.c
   525         -
   526         -opcodes.h:	parse.h $(TOP)/src/vdbe.c $(TOP)/mkopcodeh.awk
   527         -	cat parse.h $(TOP)/src/vdbe.c | \
   528         -		$(NAWK) -f $(TOP)/mkopcodeh.awk >opcodes.h
   529         -
   530         -# Rules to build parse.c and parse.h - the outputs of lemon.
   531         -#
   532         -parse.h:	parse.c
   533         -
   534         -parse.c:	$(TOP)/src/parse.y lemon $(TOP)/addopcodes.awk
   535         -	cp $(TOP)/src/parse.y .
   536         -	rm -f parse.h
   537         -	./lemon $(OPTS) parse.y
   538         -	mv parse.h parse.h.temp
   539         -	awk -f $(TOP)/addopcodes.awk parse.h.temp >parse.h
   540         -
   541         -sqlite3.h:	$(TOP)/src/sqlite.h.in 
   542         -	sed -e s/--VERS--/`cat ${TOP}/VERSION`/ \
   543         -	    -e s/--VERSION-NUMBER--/`cat ${TOP}/VERSION | sed 's/[^0-9]/ /g' | $(NAWK) '{printf "%d%03d%03d",$$1,$$2,$$3}'`/ \
   544         -                 $(TOP)/src/sqlite.h.in >sqlite3.h
   545         -
   546         -keywordhash.h:	$(TOP)/tool/mkkeywordhash.c
   547         -	$(BCC) -o mkkeywordhash $(OPTS) $(TOP)/tool/mkkeywordhash.c
   548         -	./mkkeywordhash >keywordhash.h
   549         -
   550         -
   551         -
   552         -# Rules to build the extension objects.
   553         -#
   554         -icu.o:	$(TOP)/ext/icu/icu.c $(HDR) $(EXTHDR)
   555         -	$(TCCX_SHARED) -DSQLITE_CORE -c $(TOP)/ext/icu/icu.c
   556         -
   557         -fts2.o:	$(TOP)/ext/fts2/fts2.c $(HDR) $(EXTHDR)
   558         -	$(TCCX_SHARED) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2.c
   559         -
   560         -fts2_hash.o:	$(TOP)/ext/fts2/fts2_hash.c $(HDR) $(EXTHDR)
   561         -	$(TCCX_SHARED) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_hash.c
   562         -
   563         -fts2_icu.o:	$(TOP)/ext/fts2/fts2_icu.c $(HDR) $(EXTHDR)
   564         -	$(TCCX_SHARED) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_icu.c
   565         -
   566         -fts2_porter.o:	$(TOP)/ext/fts2/fts2_porter.c $(HDR) $(EXTHDR)
   567         -	$(TCCX_SHARED) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_porter.c
   568         -
   569         -fts2_tokenizer.o:	$(TOP)/ext/fts2/fts2_tokenizer.c $(HDR) $(EXTHDR)
   570         -	$(TCCX_SHARED) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_tokenizer.c
   571         -
   572         -fts2_tokenizer1.o:	$(TOP)/ext/fts2/fts2_tokenizer1.c $(HDR) $(EXTHDR)
   573         -	$(TCCX_SHARED) -DSQLITE_CORE -c $(TOP)/ext/fts2/fts2_tokenizer1.c
   574         -
   575         -fts3.o:	$(TOP)/ext/fts3/fts3.c $(HDR) $(EXTHDR)
   576         -	$(TCCX_SHARED) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3.c
   577         -
   578         -fts3_expr.o:	$(TOP)/ext/fts3/fts3_expr.c $(HDR) $(EXTHDR)
   579         -	$(TCCX_SHARED) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_expr.c
   580         -
   581         -fts3_hash.o:	$(TOP)/ext/fts3/fts3_hash.c $(HDR) $(EXTHDR)
   582         -	$(TCCX_SHARED) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_hash.c
   583         -
   584         -fts3_icu.o:	$(TOP)/ext/fts3/fts3_icu.c $(HDR) $(EXTHDR)
   585         -	$(TCCX_SHARED) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_icu.c
   586         -
   587         -fts3_porter.o:	$(TOP)/ext/fts3/fts3_porter.c $(HDR) $(EXTHDR)
   588         -	$(TCCX_SHARED) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_porter.c
   589         -
   590         -fts3_tokenizer.o:	$(TOP)/ext/fts3/fts3_tokenizer.c $(HDR) $(EXTHDR)
   591         -	$(TCCX_SHARED) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer.c
   592         -
   593         -fts3_tokenizer1.o:	$(TOP)/ext/fts3/fts3_tokenizer1.c $(HDR) $(EXTHDR)
   594         -	$(TCCX_SHARED) -DSQLITE_CORE -c $(TOP)/ext/fts3/fts3_tokenizer1.c
   595         -
   596         -rtree.o:	$(TOP)/ext/rtree/rtree.c $(HDR) $(EXTHDR)
   597         -	$(TCCX_SHARED) -DSQLITE_CORE -c $(TOP)/ext/rtree/rtree.c
   598         -
   599         -
   600         -# Rules for building test programs and for running tests
   601         -#
   602         -tclsqlite3:	$(TOP)/src/tclsqlite.c libsqlite3.a
   603         -	$(TCCX_SHARED) $(TCL_FLAGS) -DTCLSH=1 -o tclsqlite3 \
   604         -		$(TOP)/src/tclsqlite.c libsqlite3.a $(LIBTCL) $(THREADLIB)
   605         -
   606         -
   607         -# Rules to build the 'testfixture' application.
   608         -#
   609         -TESTFIXTURE_FLAGS  = -DTCLSH=1 -DSQLITE_TEST=1 -DSQLITE_CRASH_TEST=1
   610         -TESTFIXTURE_FLAGS += -DSQLITE_SERVER=1 -DSQLITE_PRIVATE="" -DSQLITE_CORE 
   611         -
   612         -testfixture$(EXE): $(TESTSRC2) libsqlite3.a $(TESTSRC) $(TOP)/src/tclsqlite.c
   613         -	$(TCCX) $(TCL_FLAGS) $(TESTFIXTURE_FLAGS)                            \
   614         -		$(TESTSRC) $(TESTSRC2) $(TOP)/src/tclsqlite.c                \
   615         -		-o testfixture$(EXE) $(LIBTCL) $(THREADLIB) libsqlite3.a
   616         -
   617         -amalgamation-testfixture$(EXE): sqlite3.c $(TESTSRC) $(TOP)/src/tclsqlite.c
   618         -	$(TCCX) $(TCL_FLAGS) $(TESTFIXTURE_FLAGS)                            \
   619         -		$(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c                  \
   620         -		-o testfixture$(EXE) $(LIBTCL) $(THREADLIB)
   621         -
   622         -fts3-testfixture$(EXE): sqlite3.c fts3amal.c $(TESTSRC) $(TOP)/src/tclsqlite.c
   623         -	$(TCCX) $(TCL_FLAGS) $(TESTFIXTURE_FLAGS)                            \
   624         -	-DSQLITE_ENABLE_FTS3=1                                               \
   625         -		$(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c fts3amal.c       \
   626         -		-o testfixture$(EXE) $(LIBTCL) $(THREADLIB)
   627         -
   628         -fulltest:	testfixture$(EXE) sqlite3$(EXE)
   629         -	./testfixture$(EXE) $(TOP)/test/all.test
   630         -
   631         -soaktest:	testfixture$(EXE) sqlite3$(EXE)
   632         -	./testfixture$(EXE) $(TOP)/test/all.test -soak=1
   633         -
   634         -fulltestonly:	testfixture$(EXE) sqlite3$(EXE)
   635         -	./testfixture$(EXE) $(TOP)/test/full.test
   636         -
   637         -test:	testfixture$(EXE) sqlite3$(EXE)
   638         -	./testfixture$(EXE) $(TOP)/test/veryquick.test
   639         -
   640         -sqlite3_analyzer$(EXE):	$(TOP)/src/tclsqlite.c sqlite3.c $(TESTSRC) \
   641         -			$(TOP)/tool/spaceanal.tcl
   642         -	sed \
   643         -	  -e '/^#/d' \
   644         -	  -e 's,\\,\\\\,g' \
   645         -	  -e 's,",\\",g' \
   646         -	  -e 's,^,",' \
   647         -	  -e 's,$$,\\n",' \
   648         -	  $(TOP)/tool/spaceanal.tcl >spaceanal_tcl.h
   649         -	$(TCCX) $(TCL_FLAGS)                  $(TESTFIXTURE_FLAGS)                                 \
   650         -		-DTCLSH=2 -DSQLITE_TEST=1 -DSQLITE_DEBUG=1 -DSQLITE_PRIVATE="" \
   651         -		$(TESTSRC) $(TOP)/src/tclsqlite.c sqlite3.c                    \
   652         -		-o sqlite3_analyzer$(EXE)                                      \
   653         -		$(LIBTCL) $(THREADLIB)
   654         -
   655         -TEST_EXTENSION = $(SHPREFIX)testloadext.$(SO)
   656         -$(TEST_EXTENSION): $(TOP)/src/test_loadext.c
   657         -	$(MKSHLIB) $(TOP)/src/test_loadext.c -o $(TEST_EXTENSION)
   658         -
   659         -extensiontest: testfixture$(EXE) $(TEST_EXTENSION)
   660         -	./testfixture$(EXE) $(TOP)/test/loadext.test
   661         -
   662         -clean:	
   663         -	rm -f *.o sqlite3$(EXE) libsqlite3.a sqlite3.h opcodes.*
   664         -	rm -f lemon lempar.c parse.* sqlite*.tar.gz mkkeywordhash keywordhash.h
   665         -	rm -f $(PUBLISH)
   666         -	rm -f *.da *.bb *.bbg gmon.out
   667         -	rm -rf quota2a quota2b quota2c
   668         -	rm -rf tsrc target_source
   669         -	rm -f testloadext.dll libtestloadext.so
   670         -	rm -f sqlite3.c fts?amal.c tclsqlite3.c
   671         -	rm -f sqlite3rc.h
   672         -	rm -f shell.c sqlite3ext.h
   673         -	rm -f $(SHPREFIX)sqlite3.$(SO)

Changes to configure.

   799    799   BUILD_CC
   800    800   VERSION_NUMBER
   801    801   RELEASE
   802    802   VERSION
   803    803   program_prefix
   804    804   TCLLIBDIR
   805    805   TCLSH_CMD
   806         -AWK
   807    806   INSTALL_DATA
   808    807   INSTALL_SCRIPT
   809    808   INSTALL_PROGRAM
   810    809   CPP
   811    810   OTOOL64
   812    811   OTOOL
   813    812   LIPO
................................................................................
  3907   3906   { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
  3908   3907   $as_echo_n "checking the name lister ($NM) interface... " >&6; }
  3909   3908   if ${lt_cv_nm_interface+:} false; then :
  3910   3909     $as_echo_n "(cached) " >&6
  3911   3910   else
  3912   3911     lt_cv_nm_interface="BSD nm"
  3913   3912     echo "int some_variable = 0;" > conftest.$ac_ext
  3914         -  (eval echo "\"\$as_me:3914: $ac_compile\"" >&5)
         3913  +  (eval echo "\"\$as_me:3913: $ac_compile\"" >&5)
  3915   3914     (eval "$ac_compile" 2>conftest.err)
  3916   3915     cat conftest.err >&5
  3917         -  (eval echo "\"\$as_me:3917: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
         3916  +  (eval echo "\"\$as_me:3916: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
  3918   3917     (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
  3919   3918     cat conftest.err >&5
  3920         -  (eval echo "\"\$as_me:3920: output\"" >&5)
         3919  +  (eval echo "\"\$as_me:3919: output\"" >&5)
  3921   3920     cat conftest.out >&5
  3922   3921     if $GREP 'External.*some_variable' conftest.out > /dev/null; then
  3923   3922       lt_cv_nm_interface="MS dumpbin"
  3924   3923     fi
  3925   3924     rm -f conftest*
  3926   3925   fi
  3927   3926   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
................................................................................
  5119   5118   	;;
  5120   5119       esac
  5121   5120     fi
  5122   5121     rm -rf conftest*
  5123   5122     ;;
  5124   5123   *-*-irix6*)
  5125   5124     # Find out which ABI we are using.
  5126         -  echo '#line 5126 "configure"' > conftest.$ac_ext
         5125  +  echo '#line 5125 "configure"' > conftest.$ac_ext
  5127   5126     if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
  5128   5127     (eval $ac_compile) 2>&5
  5129   5128     ac_status=$?
  5130   5129     $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  5131   5130     test $ac_status = 0; }; then
  5132   5131       if test "$lt_cv_prog_gnu_ld" = yes; then
  5133   5132         case `/usr/bin/file conftest.$ac_objext` in
................................................................................
  6644   6643      # Note that $ac_compile itself does not contain backslashes and begins
  6645   6644      # with a dollar sign (not a hyphen), so the echo should work correctly.
  6646   6645      # The option is referenced via a variable to avoid confusing sed.
  6647   6646      lt_compile=`echo "$ac_compile" | $SED \
  6648   6647      -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  6649   6648      -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
  6650   6649      -e 's:$: $lt_compiler_flag:'`
  6651         -   (eval echo "\"\$as_me:6651: $lt_compile\"" >&5)
         6650  +   (eval echo "\"\$as_me:6650: $lt_compile\"" >&5)
  6652   6651      (eval "$lt_compile" 2>conftest.err)
  6653   6652      ac_status=$?
  6654   6653      cat conftest.err >&5
  6655         -   echo "$as_me:6655: \$? = $ac_status" >&5
         6654  +   echo "$as_me:6654: \$? = $ac_status" >&5
  6656   6655      if (exit $ac_status) && test -s "$ac_outfile"; then
  6657   6656        # The compiler can only warn and ignore the option if not recognized
  6658   6657        # So say no if there are warnings other than the usual output.
  6659   6658        $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
  6660   6659        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  6661   6660        if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  6662   6661          lt_cv_prog_compiler_rtti_exceptions=yes
................................................................................
  6983   6982      # Note that $ac_compile itself does not contain backslashes and begins
  6984   6983      # with a dollar sign (not a hyphen), so the echo should work correctly.
  6985   6984      # The option is referenced via a variable to avoid confusing sed.
  6986   6985      lt_compile=`echo "$ac_compile" | $SED \
  6987   6986      -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  6988   6987      -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
  6989   6988      -e 's:$: $lt_compiler_flag:'`
  6990         -   (eval echo "\"\$as_me:6990: $lt_compile\"" >&5)
         6989  +   (eval echo "\"\$as_me:6989: $lt_compile\"" >&5)
  6991   6990      (eval "$lt_compile" 2>conftest.err)
  6992   6991      ac_status=$?
  6993   6992      cat conftest.err >&5
  6994         -   echo "$as_me:6994: \$? = $ac_status" >&5
         6993  +   echo "$as_me:6993: \$? = $ac_status" >&5
  6995   6994      if (exit $ac_status) && test -s "$ac_outfile"; then
  6996   6995        # The compiler can only warn and ignore the option if not recognized
  6997   6996        # So say no if there are warnings other than the usual output.
  6998   6997        $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
  6999   6998        $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
  7000   6999        if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
  7001   7000          lt_cv_prog_compiler_pic_works=yes
................................................................................
  7088   7087      # (2) before a word containing "conftest.", or (3) at the end.
  7089   7088      # Note that $ac_compile itself does not contain backslashes and begins
  7090   7089      # with a dollar sign (not a hyphen), so the echo should work correctly.
  7091   7090      lt_compile=`echo "$ac_compile" | $SED \
  7092   7091      -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  7093   7092      -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
  7094   7093      -e 's:$: $lt_compiler_flag:'`
  7095         -   (eval echo "\"\$as_me:7095: $lt_compile\"" >&5)
         7094  +   (eval echo "\"\$as_me:7094: $lt_compile\"" >&5)
  7096   7095      (eval "$lt_compile" 2>out/conftest.err)
  7097   7096      ac_status=$?
  7098   7097      cat out/conftest.err >&5
  7099         -   echo "$as_me:7099: \$? = $ac_status" >&5
         7098  +   echo "$as_me:7098: \$? = $ac_status" >&5
  7100   7099      if (exit $ac_status) && test -s out/conftest2.$ac_objext
  7101   7100      then
  7102   7101        # The compiler can only warn and ignore the option if not recognized
  7103   7102        # So say no if there are warnings
  7104   7103        $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
  7105   7104        $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  7106   7105        if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
................................................................................
  7143   7142      # (2) before a word containing "conftest.", or (3) at the end.
  7144   7143      # Note that $ac_compile itself does not contain backslashes and begins
  7145   7144      # with a dollar sign (not a hyphen), so the echo should work correctly.
  7146   7145      lt_compile=`echo "$ac_compile" | $SED \
  7147   7146      -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
  7148   7147      -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
  7149   7148      -e 's:$: $lt_compiler_flag:'`
  7150         -   (eval echo "\"\$as_me:7150: $lt_compile\"" >&5)
         7149  +   (eval echo "\"\$as_me:7149: $lt_compile\"" >&5)
  7151   7150      (eval "$lt_compile" 2>out/conftest.err)
  7152   7151      ac_status=$?
  7153   7152      cat out/conftest.err >&5
  7154         -   echo "$as_me:7154: \$? = $ac_status" >&5
         7153  +   echo "$as_me:7153: \$? = $ac_status" >&5
  7155   7154      if (exit $ac_status) && test -s out/conftest2.$ac_objext
  7156   7155      then
  7157   7156        # The compiler can only warn and ignore the option if not recognized
  7158   7157        # So say no if there are warnings
  7159   7158        $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
  7160   7159        $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
  7161   7160        if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
................................................................................
  9523   9522   else
  9524   9523     	  if test "$cross_compiling" = yes; then :
  9525   9524     lt_cv_dlopen_self=cross
  9526   9525   else
  9527   9526     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  9528   9527     lt_status=$lt_dlunknown
  9529   9528     cat > conftest.$ac_ext <<_LT_EOF
  9530         -#line 9530 "configure"
         9529  +#line 9529 "configure"
  9531   9530   #include "confdefs.h"
  9532   9531   
  9533   9532   #if HAVE_DLFCN_H
  9534   9533   #include <dlfcn.h>
  9535   9534   #endif
  9536   9535   
  9537   9536   #include <stdio.h>
................................................................................
  9619   9618   else
  9620   9619     	  if test "$cross_compiling" = yes; then :
  9621   9620     lt_cv_dlopen_self_static=cross
  9622   9621   else
  9623   9622     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
  9624   9623     lt_status=$lt_dlunknown
  9625   9624     cat > conftest.$ac_ext <<_LT_EOF
  9626         -#line 9626 "configure"
         9625  +#line 9625 "configure"
  9627   9626   #include "confdefs.h"
  9628   9627   
  9629   9628   #if HAVE_DLFCN_H
  9630   9629   #include <dlfcn.h>
  9631   9630   #endif
  9632   9631   
  9633   9632   #include <stdio.h>
................................................................................
  9939   9938   # It thinks the first close brace ends the variable substitution.
  9940   9939   test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  9941   9940   
  9942   9941   test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
  9943   9942   
  9944   9943   test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  9945   9944   
  9946         -for ac_prog in gawk mawk nawk awk
  9947         -do
  9948         -  # Extract the first word of "$ac_prog", so it can be a program name with args.
  9949         -set dummy $ac_prog; ac_word=$2
  9950         -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
  9951         -$as_echo_n "checking for $ac_word... " >&6; }
  9952         -if ${ac_cv_prog_AWK+:} false; then :
  9953         -  $as_echo_n "(cached) " >&6
  9954         -else
  9955         -  if test -n "$AWK"; then
  9956         -  ac_cv_prog_AWK="$AWK" # Let the user override the test.
  9957         -else
  9958         -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
  9959         -for as_dir in $PATH
  9960         -do
  9961         -  IFS=$as_save_IFS
  9962         -  test -z "$as_dir" && as_dir=.
  9963         -    for ac_exec_ext in '' $ac_executable_extensions; do
  9964         -  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
  9965         -    ac_cv_prog_AWK="$ac_prog"
  9966         -    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
  9967         -    break 2
  9968         -  fi
  9969         -done
  9970         -  done
  9971         -IFS=$as_save_IFS
  9972         -
  9973         -fi
  9974         -fi
  9975         -AWK=$ac_cv_prog_AWK
  9976         -if test -n "$AWK"; then
  9977         -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
  9978         -$as_echo "$AWK" >&6; }
  9979         -else
  9980         -  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  9981         -$as_echo "no" >&6; }
  9982         -fi
  9983         -
  9984         -
  9985         -  test -n "$AWK" && break
  9986         -done
  9987         -
  9988   9945   
  9989   9946   #########
  9990   9947   # Enable large file support (if special flags are necessary)
  9991   9948   #
  9992   9949   # Check whether --enable-largefile was given.
  9993   9950   if test "${enable_largefile+set}" = set; then :
  9994   9951     enableval=$enable_largefile;
................................................................................
 11881  11838   Copyright (C) 2012 Free Software Foundation, Inc.
 11882  11839   This config.status script is free software; the Free Software Foundation
 11883  11840   gives unlimited permission to copy, distribute and modify it."
 11884  11841   
 11885  11842   ac_pwd='$ac_pwd'
 11886  11843   srcdir='$srcdir'
 11887  11844   INSTALL='$INSTALL'
 11888         -AWK='$AWK'
 11889  11845   test -n "\$AWK" || AWK=awk
 11890  11846   _ACEOF
 11891  11847   
 11892  11848   cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 11893  11849   # The default lists apply if the user does not specify any file.
 11894  11850   ac_need_defaults=:
 11895  11851   while test $# != 0

Changes to configure.ac.

    86     86   fi
    87     87   
    88     88   #########
    89     89   # Programs needed
    90     90   #
    91     91   AC_PROG_LIBTOOL
    92     92   AC_PROG_INSTALL
    93         -AC_PROG_AWK
    94     93   
    95     94   #########
    96     95   # Enable large file support (if special flags are necessary)
    97     96   #
    98     97   AC_SYS_LARGEFILE
    99     98   
   100     99   #########

Changes to main.mk.

    31     31   #
    32     32   # READLINE_FLAGS   Compiler options needed for programs that use the
    33     33   #                  readline() library.
    34     34   #
    35     35   # LIBREADLINE      Linker options needed by programs using readline() must
    36     36   #                  link against.
    37     37   #
    38         -# NAWK             Nawk compatible awk program.  Older (obsolete?) solaris
    39         -#                  systems need this to avoid using the original AT&T AWK.
    40         -#
    41     38   # Once the macros above are defined, the rest of this make script will
    42     39   # build the SQLite library and testing tools.
    43     40   ################################################################################
    44     41   
    45     42   # This is how we compile
    46     43   #
    47     44   TCCX =  $(TCC) $(OPTS) -I. -I$(TOP)/src -I$(TOP) 
................................................................................
   697    694   
   698    695   sqlite3_analyzer.c: sqlite3.c $(TOP)/src/tclsqlite.c $(TOP)/tool/spaceanal.tcl
   699    696   	echo "#define TCLSH 2" > $@
   700    697   	echo "#define SQLITE_ENABLE_DBSTAT_VTAB 1" >> $@
   701    698   	cat sqlite3.c $(TOP)/src/tclsqlite.c >> $@
   702    699   	echo "static const char *tclsh_main_loop(void){" >> $@
   703    700   	echo "static const char *zMainloop = " >> $@
   704         -	$(NAWK) -f $(TOP)/tool/tostr.awk $(TOP)/tool/spaceanal.tcl >> $@
          701  +	tclsh $(TOP)/tool/tostr.tcl $(TOP)/tool/spaceanal.tcl >> $@
   705    702   	echo "; return zMainloop; }" >> $@
   706    703   
   707    704   sqlite3_analyzer$(EXE): sqlite3_analyzer.c
   708    705   	$(TCCX) $(TCL_FLAGS) sqlite3_analyzer.c -o $@ $(LIBTCL) $(THREADLIB) 
   709    706   
   710    707   # Rules to build the 'testfixture' application.
   711    708   #

Deleted tool/tostr.awk.

     1         -#!/usr/bin/awk
     2         -#
     3         -# Convert input text into a C string
     4         -#
     5         -{
     6         -  gsub(/\\/,"\\\\");
     7         -  gsub(/\"/,"\\\"");
     8         -  print "\"" $0 "\\n\"";
     9         -}

Added tool/tostr.tcl.

            1  +#!/usr/bin/tcl
            2  +#
            3  +# Convert input text into a C string
            4  +#
            5  +set in [open [lindex $argv 0] rb]
            6  +while {![eof $in]} {
            7  +  set line [gets $in]
            8  +  if {[eof $in]} break;
            9  +  set x [string map "\\\\ \\\\\\\\ \\\" \\\\\"" $line]
           10  +  puts "\"$x\\n\""
           11  +}
           12  +close $in