From 758da604cdb9183289526a9c087287ec83399216 Mon Sep 17 00:00:00 2001 From: Maxime Biais Date: Sun, 21 Oct 2012 20:55:50 +0200 Subject: [PATCH] add install and uninstall rules in Makefile --- Makefile | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index aac341f..ac55fd4 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 + -- 2.40.0