yahoo / mdbm

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

add SHELL variable to Makefile #30

Closed yutannihilation closed 9 years ago

yutannihilation commented 9 years ago

I'm using Ubuntu 14.04. I had no problem with make, but make install fails with the following error messages:

$ make install
(...snip...)

install -D object/libmdbm.so.4 /tmp/install/lib64
#ln -s -f -r /tmp/install/lib64/libmdbm.so.4 /tmp/install/lib64/libmdbm.so
# some systems don't support "ln -r" (relative links), emulate it...
pushd /tmp/install/lib64; ln -s -f -r libmdbm.so.4 libmdbm.so; popd
/bin/sh: 1: pushd: not found
/bin/sh: 1: popd: not found
make[2]: *** [install] Error 127
make[2]: Leaving directory `/home/vagrant/repo/mdbm/src/lib'
make[1]: *** [make-recursive-install] Error 2
make[1]: Leaving directory `/home/vagrant/repo/mdbm/src'
make: *** [make-recursive-install] Error 2

pushd and popd are bash built-in commands. But Ubuntu's default shell is dash, where those commands are not available. To make things work, the environmental variable SHELL should be specified in Makefile.

(I'm not familiar with Makefile. Sorry if this pull request is not a good way of setting SHELL...)

cf. GNU make - 5.3.2 Choosing the Shell

yahoocla commented 9 years ago

Thank you for submitting this pull request, however I do not see a valid CLA on file for you. Before we can merge this request please visit https://yahoocla.herokuapp.com/ and agree to the terms. Thanks! :smile:

yutannihilation commented 9 years ago

@yahoocla Thank you for your notation! I signed the CLA :)

timrc-git commented 9 years ago

Hi yutannihilation-

It turns out that each line of make targets run in their own subshell, so pushd/popd isn't needed. Please let me know if the last commit (278db4b3364c74335f2c09f16b9dbc98295aec65), doesn't fix your issue.

Thanks!

.timrc

yutannihilation commented 9 years ago

@timrc-git Thanks! I confirmed the problem is fixed at HEAD :+1: