From ff1e051ab7b9b1b5775902f02263705d9ebe6ed6 Mon Sep 17 00:00:00 2001
From: Petr Baudis <pasky@ucw.cz>
Date: Fri, 16 Mar 2012 03:09:36 +0100
Subject: [PATCH] Makefile: A straightforward install rule

---
 Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Makefile b/Makefile
index 1e1fe1c..a9357b3 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,5 @@
 CFLAGS=-Wall -Wextra -Wno-unused -O3 -std=gnu99 -ggdb3
+PREFIX:=/usr/local
 
 all: compctld compctl
 
@@ -11,5 +12,10 @@ help-in-quotes: README.client
 	cat $< | sed -e '0,/^Usage/d; /^Description/,$$d' | \
 		tail -n +3 | sed -e 's/\(.*\)/"\1\\n"/' >$@
 
+install:
+	install -g root -m 755 -o root -t $(DESTDIR)$(PREFIX)/bin compctl
+	install -g root -m 755 -o root -t $(DESTDIR)$(PREFIX)/sbin compctld
+	install -g root -m 755 -o root -t $(DESTDIR)$(PREFIX)/share/man/man1 compctl.1
+
 clean:
 	rm -f compctl compctld compctl.o compctld.o cgroup.o help-in-quotes
-- 
GitLab