summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Dolan <mu@netsoc.tcd.ie>2012-10-21 12:23:22 -0700
committerStephen Dolan <mu@netsoc.tcd.ie>2012-10-21 12:23:22 -0700
commit6e64cdcbfcde4d8beb5a60c87de0a6bb4e44d7af (patch)
tree0223547f2c976a0eaab6d57c95ddb9fe965651f7
parent73e479e171bd959e9ee194732205a0ed49d029d9 (diff)
parent758da604cdb9183289526a9c087287ec83399216 (diff)
Merge pull request #8 from maxme/master
add install and uninstall rules in Makefile
-rw-r--r--Makefile13
1 files changed, 12 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index aac341f8..ac55fd4a 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
CC=gcc -Wextra -Wall -Wno-missing-field-initializers -Wno-unused-parameter -std=gnu99 -ggdb -Wno-unused-function
+prefix=/usr/local
.PHONY: all clean releasedep tarball
all: jq
@@ -41,4 +42,14 @@ docs/content/2.download/source/jq.tgz: jq
mkdir -p `dirname $@`
tar -czvf $@ `git ls-files; ls *.gen.*`
-tarball: docs/content/2.download/source/jq.tgz \ No newline at end of file
+tarball: docs/content/2.download/source/jq.tgz
+
+install: jq
+ install -d -m 0755 $(prefix)/bin
+ install -m 0755 jq $(prefix)/bin
+
+uninstall:
+ test -d $(prefix)/bin && \
+ cd $(prefix)/bin && \
+ rm -f jq
+