/ Check-in [4f360b2a]
Login
SQLite training in Houston TX on 2019-11-05 (details)
Part of the 2019 Tcl Conference

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

Overview
Comment:Add the new "snapshot-tarball" target to the unix makefiles, for building a tarball similar to "amalgamation-tarball" but named by the SHA1 hash of the current check-out rather than by the version number.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 4f360b2ae78b3d4ccfe6c40ac6b27a00fc70cf23
User & Date: drh 2016-02-09 22:39:39
Context
2016-02-09
22:54
Update the snapshot tarball name to use the date (ISO8601 format) instead of the SHA1 hash in its name. check-in: 070ec66f user: drh tags: trunk
22:39
Add the new "snapshot-tarball" target to the unix makefiles, for building a tarball similar to "amalgamation-tarball" but named by the SHA1 hash of the current check-out rather than by the version number. check-in: 4f360b2a user: drh tags: trunk
22:00
Update the MSVC autoconf makefile with the recent changes from the primary one. check-in: c7242aa3 user: mistachkin tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to Makefile.in.

  1152   1152   # symbols that do not begin with "sqlite3_". It is run as part of the
  1153   1153   # releasetest.tcl script.
  1154   1154   #
  1155   1155   checksymbols: sqlite3.lo
  1156   1156   	nm -g --defined-only sqlite3.o | grep -v " sqlite3_" ; test $$? -ne 0
  1157   1157   	echo '0 errors out of 1 tests'
  1158   1158   
  1159         -# Build the amalgamation-autoconf package.
         1159  +# Build the amalgamation-autoconf package.  The amalamgation-tarball target builds
         1160  +# a tarball named for the version number.  Ex:  sqlite-autoconf-3110000.tar.gz.
         1161  +# The snapshot-tarball target builds a tarball named by the SHA1 hash
  1160   1162   #
  1161   1163   amalgamation-tarball: sqlite3.c
  1162         -	TOP=$(TOP) sh $(TOP)/tool/mkautoconfamal.sh
         1164  +	TOP=$(TOP) sh $(TOP)/tool/mkautoconfamal.sh --normal
         1165  +
         1166  +snapshot-tarball: sqlite3.c
         1167  +	TOP=$(TOP) sh $(TOP)/tool/mkautoconfamal.sh --snapshot
  1163   1168   
  1164   1169   # The next two rules are used to support the "threadtest" target. Building
  1165   1170   # threadtest runs a few thread-safety tests that are implemented in C. This
  1166   1171   # target is invoked by the releasetest.tcl script.
  1167   1172   # 
  1168   1173   THREADTEST3_SRC = $(TOP)/test/threadtest3.c    \
  1169   1174                     $(TOP)/test/tt3_checkpoint.c \

Changes to main.mk.

   859    859   # This target will fail if the SQLite amalgamation contains any exported
   860    860   # symbols that do not begin with "sqlite3_". It is run as part of the
   861    861   # releasetest.tcl script.
   862    862   #
   863    863   checksymbols: sqlite3.o
   864    864   	nm -g --defined-only sqlite3.o | grep -v " sqlite3_" ; test $$? -ne 0
   865    865   
   866         -# Build the amalgamation-autoconf package.
          866  +# Build the amalgamation-autoconf package.  The amalamgation-tarball target builds
          867  +# a tarball named for the version number.  Ex:  sqlite-autoconf-3110000.tar.gz.
          868  +# The snapshot-tarball target builds a tarball named by the SHA1 hash
   867    869   #
   868    870   amalgamation-tarball: sqlite3.c
   869         -	TOP=$(TOP) sh $(TOP)/tool/mkautoconfamal.sh
          871  +	TOP=$(TOP) sh $(TOP)/tool/mkautoconfamal.sh --normal
          872  +
          873  +snapshot-tarball: sqlite3.c
          874  +	TOP=$(TOP) sh $(TOP)/tool/mkautoconfamal.sh --snapshot
   870    875   
   871    876   
   872    877   # Standard install and cleanup targets
   873    878   #
   874    879   install:	sqlite3 libsqlite3.a sqlite3.h
   875    880   	mv sqlite3 /usr/bin
   876    881   	mv libsqlite3.a /usr/lib

Changes to tool/mkautoconfamal.sh.

    18     18   # may fail for old /bin/sh interpreters.
    19     19   #
    20     20   set -e
    21     21   set -u
    22     22   
    23     23   TMPSPACE=./mkpkg_tmp_dir
    24     24   VERSION=`cat $TOP/VERSION`
           25  +HASH=`sed 's/^\(..........\).*/\1/' $TOP/manifest.uuid`
    25     26   
    26         -# Set global variable $ARTIFACT to the "3xxyyzz" string incorporated 
    27         -# into artifact filenames. And $VERSION2 to the "3.x.y[.z]" form.
    28         -xx=`echo $VERSION|sed 's/3\.\([0-9]*\)\..*/\1/'`
    29         -yy=`echo $VERSION|sed 's/3\.[^.]*\.\([0-9]*\).*/\1/'`
    30         -zz=0
    31         -set +e
    32         -  zz=`echo $VERSION|sed 's/3\.[^.]*\.[^.]*\.\([0-9]*\).*/\1/'|grep -v '\.'`
    33         -set -e
    34         -ARTIFACT=`printf "3%.2d%.2d%.2d" $xx $yy $zz`
           27  +# If this script is given an argument of --snapshot, then generate a
           28  +# snapshot tarball named for the current checkout SHA1 hash, rather than
           29  +# the version number.
           30  +#
           31  +if test "$#" -ge 1 -a x$1 != x--snapshot
           32  +then
           33  +  # Set global variable $ARTIFACT to the "3xxyyzz" string incorporated 
           34  +  # into artifact filenames. And $VERSION2 to the "3.x.y[.z]" form.
           35  +  xx=`echo $VERSION|sed 's/3\.\([0-9]*\)\..*/\1/'`
           36  +  yy=`echo $VERSION|sed 's/3\.[^.]*\.\([0-9]*\).*/\1/'`
           37  +  zz=0
           38  +  set +e
           39  +    zz=`echo $VERSION|sed 's/3\.[^.]*\.[^.]*\.\([0-9]*\).*/\1/'|grep -v '\.'`
           40  +  set -e
           41  +  ARTIFACT=`printf "3%.2d%.2d%.2d" $xx $yy $zz`
           42  +else
           43  +  ARTIFACT=$HASH
           44  +fi
    35     45   
    36     46   rm -rf $TMPSPACE
    37     47   cp -R $TOP/autoconf       $TMPSPACE
    38     48   cp sqlite3.c              $TMPSPACE
    39     49   cp sqlite3.h              $TMPSPACE
    40     50   cp sqlite3ext.h           $TMPSPACE
    41     51   cp $TOP/sqlite3.1         $TMPSPACE
................................................................................
    72     82   
    73     83   cd ../
    74     84   ./configure && make dist
    75     85   tar -xzf sqlite-$VERSION.tar.gz
    76     86   mv sqlite-$VERSION sqlite-autoconf-$ARTIFACT
    77     87   tar -czf sqlite-autoconf-$ARTIFACT.tar.gz sqlite-autoconf-$ARTIFACT
    78     88   mv sqlite-autoconf-$ARTIFACT.tar.gz ..
           89  +cd ..
           90  +ls -l sqlite-autoconf-$ARTIFACT.tar.gz