aboutsummaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
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