Last active
November 10, 2018 03:18
-
-
Save rduplain/5420825 to your computer and use it in GitHub Desktop.
A Makefile to download, install, and run redis-server. For @teebes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Call `make redis`, which runs redis binary after downloading/installing. | |
REDIS = redis-2.6.12 | |
redis: bin/redis-server | |
# bin/redis-server path/to/redis.conf | |
bin/redis-server | |
bin/redis-server: src/$(REDIS)/src/redis-server | |
mkdir -p bin | |
cp $< $@ | |
src/$(REDIS)/src/redis-server: src/$(REDIS)/README | |
cd src/$(REDIS) && make | |
src/$(REDIS)/README: src/$(REDIS).tar.gz | |
cd src && tar -xvf $(REDIS).tar.gz | |
@touch $@ # Ensure we do not untar every time, by updating README time. | |
src/$(REDIS).tar.gz: | |
mkdir -p src | |
cd src && wget http://redis.googlecode.com/files/$(REDIS).tar.gz | |
clean: | |
rm -fr bin/redis-server src/$(REDIS)* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment