From db5ff1d65f5b07beb34e288b067a39886ec91706 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Wed, 6 Sep 2017 17:27:38 +0200 Subject: Add install target. Make default PREFIX absolute, for being useful in subdirectories too. Stop rm -rf $(INSTDIR), for being less dangerous. --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 84553d4..b3f69ac 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ # Makefile for catlfish -PREFIX=. +PREFIX=$(PWD) INSTDIR=$(PREFIX)/catlfish build all: @@ -11,11 +11,13 @@ clean: $(MAKE) -C doc $@ release: all - rm -rf $(INSTDIR) mkdir $(INSTDIR) ./makerelease.erl $(INSTDIR) -dist: release +install: release + make -C tools INSTDIR=$(INSTDIR) install + +dist: install (VER=$$(./version.erl) && \ ARCH=$$(uname -sm | sed -e 's/ /-/g') && \ N=catlfish-$${VER}_$${ARCH} && \ -- cgit v1.1