]> thyrsus.com Git - src.git/commitdiff
Add a "make install" target
authorMike Swanson <mikeonthecomputer@gmail.com>
Sat, 8 Nov 2014 21:44:15 +0000 (13:44 -0800)
committerEric S. Raymond <esr@thyrsus.com>
Sat, 8 Nov 2014 21:51:40 +0000 (16:51 -0500)
Makefile

index f95a160689b6f7942e51910677af60019dc0e66b..137eb4bfead2daf5e5af982e31dddf939e08ff6d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,11 @@
 #
 # makefile for src
 #
+
+prefix?=/usr/local
+mandir?=/share/man
+target=$(DESTDIR)$(prefix)
+
 VERS=$(shell sed <src -n -e '/version=\(.*\)/s//\1/p')
 
 SOURCES = README COPYING NEWS TODO src src.asc Makefile control
@@ -43,3 +48,9 @@ dist: src-$(VERS).tar.gz
 
 release: src-$(VERS).tar.gz src.html
        shipper version=$(VERS) | sh -e -x
+
+install: all
+       install -d "$(target)/bin"
+       install -d "$(target)$(mandir)/man1"
+       install src "$(target)/bin"
+       install -m644 src.1 "$(target)$(mandir)/man1"