]> mj.ucw.cz Git - xsv.git/commitdiff
Makefile: Added "install" target
authorMartin Mares <mj@ucw.cz>
Mon, 9 Dec 2013 20:24:09 +0000 (21:24 +0100)
committerMartin Mares <mj@ucw.cz>
Mon, 9 Dec 2013 20:24:09 +0000 (21:24 +0100)
Makefile

index 6a31bb69bfdd8c5b03594010944228e6aa6883ad..1dd7c42e408bb20706c57101cd74ff15b0108442 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -7,6 +7,10 @@ PCRE_LIBS:=$(shell pcre-config --libs)
 CFLAGS=-O2 -Wall -W -Wno-parentheses -Wstrict-prototypes -Wmissing-prototypes -Wundef -Wredundant-decls -std=gnu99 $(PCRE_CFLAGS) -DVERSION='"$(VERSION)"'
 LDLIBS=$(PCRE_LIBS)
 
+PREFIX=/usr/local
+BINDIR=$(PREFIX)/bin
+MANDIR=$(PREFIX)/share/man/man1
+
 all: xsv xsv.1
 
 tests: xsv
@@ -23,6 +27,12 @@ clean:
        rm -f xsv xsv.1 xsv.1.html docbook-xsl.css
        rm -rf tmp
 
+install: all
+       install -d -m 755 $(BINDIR) $(MANDIR)
+       install -m 755 xsv $(BINDIR)/
+       install -m 644 xsv.1 $(MANDIR)/
+
+# Release target for private use by the maintainer
 release: xsv.1.html
        git tag v$(VERSION)
        git push --tags