From ad64781df6d77206d49a35562e2459e6a67b4729 Mon Sep 17 00:00:00 2001 From: Gregory Burd Date: Mon, 28 Nov 2011 18:39:53 -0500 Subject: [PATCH] Auto-download of db package now works properly. --- .gitignore | 1 + Makefile | 2 ++ c_src/Makefile | 14 +++++++------- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index e6c2f0e..17a89cb 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,7 @@ *.orig logs doc +include/BDBERL-MIB.hrl test/test.cover int_test/test.cover .eunit diff --git a/Makefile b/Makefile index a30bee7..7c77fff 100644 --- a/Makefile +++ b/Makefile @@ -26,3 +26,5 @@ distclean: clean -rm -rf logs include rebar.mk + +.EXPORT_ALL_VARIABLES: diff --git a/c_src/Makefile b/c_src/Makefile index 13e2208..aa6b216 100644 --- a/c_src/Makefile +++ b/c_src/Makefile @@ -1,14 +1,15 @@ # This Makefile builds the dependency (libdb) needed by bdberl_drv.so -ERL ?=erl -ERL_FLAGS ?=+A10 +ERL ?= erl +ERL_FLAGS ?= +A10 TAR ?= tar GUNZIP ?= gunzip +CURL ?= curl BDB_VER := 5.2.36 BDB_DIR := $(CURDIR)/db-$(BDB_VER) -BDB_DIST := db-$(BDB_VER).tar.gz -#BDB_DIST_URL := http://download.oracle.com/berkeley-db/$(BDB_DIST) -BDB_DIST_URL := https://github.com/downloads/gburd/libdb/$(BDB_DIST) +BDB_DIST := db-$(BDB_VER) +#BDB_DIST_URL := http://download.oracle.com/berkeley-db/$(BDB_DIST).tar.gz +BDB_DIST_URL := https://github.com/downloads/gburd/libdb/$(BDB_DIST).tar.gz SYSTEM_DIR := $(CURDIR)/system LIB_DIR := $(SYSTEM_DIR)/lib @@ -18,7 +19,6 @@ INC_DIR := $(SYSTEM_DIR)/include db: $(LIB_DIR)/libdb.a $(LIB_DIR)/libdb.a: $(BDB_DIST) - $(GUNZIP) -c db-$(BDB_VER).tar.gz | $(TAR) xf - @for I in patches/*.patch; do \ (patch -p0 < $${I} || echo "Skipping patch"); \ done @@ -29,6 +29,6 @@ clean: @rm -rf ./*.o $(SYSTEM_DIR) $(BDB_DIR) $(BDB_DIST): - $(REBAR_FETCH) $(BDB_DIST_URL) + $(CURL) -L $(BDB_DIST_URL) | $(GUNZIP) | $(TAR) xf - .EXPORT_ALL_VARIABLES: