summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2017-09-06 17:27:38 +0200
committerLinus Nordberg <linus@nordu.net>2017-09-06 17:27:38 +0200
commitdb5ff1d65f5b07beb34e288b067a39886ec91706 (patch)
tree1a849fb6d627cd14edc82783be2bf281f4fa18ba /Makefile
parentf0f24939e5100c9b42ce782d55f87161caf8739e (diff)
Add install target.
Make default PREFIX absolute, for being useful in subdirectories too. Stop rm -rf $(INSTDIR), for being less dangerous.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 5 insertions, 3 deletions
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} && \