From 5de5948cddd47dac91cd4bfce348fcdf118b8f67 Mon Sep 17 00:00:00 2001 From: dana Date: Wed, 22 Apr 2020 12:43:40 -0500 Subject: [PATCH] Makefile: Improve install target, update phonies --- Makefile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 7a66a01..7d9571c 100644 --- a/Makefile +++ b/Makefile @@ -4,6 +4,9 @@ # @author dana # @license MIT +prefix ?= /usr/local +bindir ?= $(prefix)/bin + all: build build: phar phar: clean twigc.phar @@ -40,7 +43,7 @@ test-integration: twigc.phar echo 'hello {{ name }}' | ./twigc.phar -p name=foo | grep -qF 'hello foo' install: twigc.phar - cp twigc.phar /usr/local/bin/twigc + cp twigc.phar $(DESTDIR)$(bindir)/twigc clean: rm -f twigc.phar @@ -48,4 +51,4 @@ clean: distclean: clean rm -rf vendor/ -.PHONY: all clean distclean install test test-integration test-unit +.PHONY: all build clean distclean help install phar test test-integration test-unit