]> git.refcnt.org Git - colorize.git/commitdiff
Add Makefile install target
authorSteven Schubiger <stsc@refcnt.org>
Sat, 24 Dec 2016 22:49:29 +0000 (23:49 +0100)
committerSteven Schubiger <stsc@refcnt.org>
Sat, 24 Dec 2016 22:49:29 +0000 (23:49 +0100)
Makefile

index 2c111eb9966b62185dbf25116dc0670d5aa0340c..381f11aacc7366e2ec15221a59bb80688f0ceca9 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-.PHONY: check check_valgrind clean release
+.PHONY: check check_valgrind install clean release
 
 .SUFFIXES:
 .SUFFIXES: .c .o
@@ -19,6 +19,10 @@ check_valgrind:
                        @which valgrind >/dev/null 2>&1 || (printf '%s\n' "valgrind not found" && exit 1)
                        perl ./test.pl --valgrind || exit 0
 
+install:
+                       test ! -d $(DESTDIR)/usr/bin && mkdir -p $(DESTDIR)/usr/bin || exit 0
+                       cp colorize $(DESTDIR)/usr/bin
+
 clean:
                        rm -f a.out colorize debug.txt version.h