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 +++++--- README.md | 11 ++++++----- tools/Makefile | 3 +++ 3 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 tools/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} && \ diff --git a/README.md b/README.md index af5e4fb..de745ae 100644 --- a/README.md +++ b/README.md @@ -34,20 +34,21 @@ needed: - A compiled https://github.com/benoitc/hackney.git (http client) in ../hackney -- nettle-dev, libbsd-dev, librhash-dev (for using the permdb backend) +- Debian packages nettle-dev, libbsd-dev, librhash-dev, libpython-dev + (for using the permdb backend) Note: hackney is dependent on rebar, but doesn't include one. You can use the rebar from lager by adding "REBAR=../lager/rebar" to the make command line, or install rebar yourself. In order to perform merge operations, the following software packages -are needed: python-ecdsa, python-yaml. +are needed (Debian): python-ecdsa, python-yaml. In order to use the tools for submitting certificates, the following -software packages are needed: python-pyasn1, unzip. +software packages are needed (Debian): python-pyasn1, unzip. -In order to run the tests, the following software packagess are -needed: curl. +In order to run the tests, the following software packagess are needed +(Debian): curl. # Compile diff --git a/tools/Makefile b/tools/Makefile new file mode 100644 index 0000000..61c7351 --- /dev/null +++ b/tools/Makefile @@ -0,0 +1,3 @@ +install: + mkdir $(INSTDIR)/tools + cp *.py *.sh merge $(INSTDIR)/tools/ -- cgit v1.1