yahoo / mdbm

MDBM a very fast memory-mapped key/value store.
BSD 3-Clause "New" or "Revised" License
993 stars 111 forks source link

install PREFIX not overriddable #9

Closed bhuvan closed 10 years ago

bhuvan commented 10 years ago

It is hard coded in Makefile.base: https://github.com/yahoo/mdbm/blob/master/Makefile.base#L34

It would be useful if PREFIX is overridable when user run make install

something like:

PREFIX=$(pwd)/install make install
bhuvan commented 10 years ago

The following patch may fix it.

diff --git a/Makefile.base b/Makefile.base
index 94e9d96..bd5b1cb 100644
--- a/Makefile.base
+++ b/Makefile.base
@@ -31,7 +31,8 @@ INSTALL=install
 ARCH_SUFFIX=64
 # where to install files:
 #PREFIX=/usr/local
-PREFIX=/tmp/install
+PREFIX ?= /tmp/install
 BIN_PREFIX=$(PREFIX)/bin
 PERL_PREFIX=/tmp/install
 ############################################################
timrc-git commented 10 years ago

Hi Bhuvaneswaran-

I moved all of the install dirs into Makefile.base, and made them all conditional. So now you should be able to overide any or all from the environment.

Thanks! .timrc