From 8efb2433aa7a0812c02075f5b456b757a7fa910a Mon Sep 17 00:00:00 2001 From: Mike Dillon Date: Mon, 9 May 2016 08:58:49 -0700 Subject: [PATCH] Support alternate install prefix --- Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f68304c..f83658f 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,12 @@ +prefix=/usr/local +exec_prefix=$(prefix) +bindir=$(exec_prefix)/bin +datarootdir=$(prefix)/share +datadir=$(datarootdir) +mandir=$(datarootdir)/man + +.PHONY: all deps build test gox build-all install clean + all: build test deps: @@ -23,7 +32,8 @@ build-all: test gox -arch="386 amd64 arm" -os="darwin linux windows" github.com/cbednarski/hostess/cmd/hostess install: hostess - cp hostess /usr/local/bin/hostess + mkdir -p $(bindir) + cp hostess $(bindir)/hostess clean: rm -f ./hostess