forked from dashohoxha/pw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
36 lines (25 loc) · 781 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
PREFIX ?= /usr
DESTDIR ?=
BINDIR ?= $(DESTDIR)$(PREFIX)/bin
LIBDIR ?= $(DESTDIR)$(PREFIX)/lib
MANDIR ?= $(DESTDIR)$(PREFIX)/share/man/man1
PW = $(BINDIR)/pw
LIB = $(LIBDIR)/pw
all: install
install:
@install -v -d "$(BINDIR)/"
@install -v -m 0755 src/pw.sh "$(PW)"
@sed -i $(PW) -e "s#^LIBDIR=.*#LIBDIR=\"$(LIB)\"#"
@install -v -d "$(LIB)/platform/"
@install -v -m 0644 $(wildcard src/platform/*) "$(LIB)/platform/"
@install -v -d "$(MANDIR)/"
@install -v -m 0644 man/pw.1 "$(MANDIR)/pw.1"
uninstall:
@rm -vrf "$(PW)" "$(LIB)" "$(MANDIR)/pw.1"
TESTS = $(sort $(wildcard tests/t*.t))
test: $(TESTS)
$(TESTS):
@$@ $(PW_TEST_OPTS)
clean:
$(RM) -rf tests/test-results/ tests/trash\ directory.*/ tests/gnupg/random_seed
.PHONY: install uninstall test clean $(TESTS)