aboutsummaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2015-07-07 13:18:21 -0400
committerRob Austein <sra@hactrn.net>2015-07-07 13:18:21 -0400
commitf71125a0d3df1ec17453212fd5b6e64bf492fbf2 (patch)
tree64152b359bf0cb693be04c4b653efa95cdcd49a6 /GNUmakefile
parent7bdeab315c5fdaf6d1b087423b98e80e80fefec8 (diff)
Switch build method to keep a copy of the current tarball in the
repository rather than fetching it every time, both to simplify the build and to avoid a lot of gratuitous re-fetches of the tarball when building under continuous integration or release engineering scripts.
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile30
1 files changed, 16 insertions, 14 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 10d5b70..7e7367d 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,5 +1,4 @@
-# (GNU) Makefile to download and build SQLite3 from source with the
-# options we want for PKCS #11.
+# Build SQLite3 from source with the options we want for PKCS #11.
#
# Author: Rob Austein
# Copyright (c) 2015, SUNET
@@ -29,6 +28,16 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# URL from which we downloaded the source tarball. SQLite3 uses an
+# oddball version control system I've never head of, and the SQLite3
+# project advises using this pre-processed tarball instead of messing
+# with their original source. We could download the tarball every
+# time we build rather than stuffing it in our repository, but that
+# generates a lot of fetches during release engineering and continuous
+# integration, which would be a bit anti-social.
+
+URL := http://sqlite.org/2015/sqlite-autoconf-3080900.tar.gz
+
# Whether to enable threading. Main reason for being able to turn it
# off is that gdb on the Novena goes bananas when threading is enabled.
@@ -36,7 +45,6 @@ ifndef ENABLE_THREADS
ENABLE_THREADS := yes
endif
-URL := http://sqlite.org/2015/sqlite-autoconf-3080900.tar.gz
OPTIONS := --enable-static --disable-shared --disable-dynamic-extensions CFLAGS=-fPIC LDFLAGS=-fPIC
ifneq "${ENABLE_THREADS}" "yes"
@@ -53,25 +61,14 @@ BUILD := ${TOP}/build
OUTPUT := ${BUILD}/sqlite3.h ${BUILD}/.libs/libsqlite3.a ${BUILD}/sqlite3
TARGETS := $(notdir ${OUTPUT})
-SHA256SUM := $(firstword $(wildcard /usr/local/bin/sha256sum /usr/local/bin/gsha256sum /usr/bin/sha256sum))
-
all: ${TARGETS}
clean:
rm -rf ${BUILD} ${TARGETS}
distclean: clean
- rm -f ${TARBALL}
-
-${TARBALL}:
- wget ${URL}
${BUILD}/.build_done: ${TARBALL} GNUmakefile
-ifeq "" "${SHA256SUM}"
- @echo "Couldn't find sha256sum, not verifying distribution checksum"
-else
- ${SHA256SUM} --check Checksums
-endif
rm -rf ${BUILD}
mkdir ${BUILD}
cd ${BUILD}; tar -xf ${TARBALL} --strip-components=1
@@ -81,3 +78,8 @@ endif
touch $@
${TARGETS}: ${BUILD}/.build_done
+
+fetch:
+ wget ${URL}
+
+.PHONY: all clean distclean fetch