Makefile
967 Bytes
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
SUBCOMMANDS = random \
rand_printable \
amngrdbinit \
amngrdbdestroy \
amngradd \
amngrcreate \
amngrcrypt \
amngrdelete \
amngrgen \
amngrgetoldpass \
amngrgetolduser \
amngrgetpass \
amngrgetuser \
amngrid \
amngrlist \
amngrrename \
amngrsearch
PREFIX ?= /usr
DESTDIR ?=
export PREFIX DESTDIR
PROGRAM := accountmanager.sh
all: doc
README_new.md: doc/accountmanager.1
groff -D utf8 -mandoc -Thtml "$<" |\
pandoc -f html -t markdown_strict >"$@"
.PHONY: clean install doc
doc:
make -C doc
install_doc: doc
make -C doc install
install_$(PROGRAM):
@install -D "$(PROGRAM)" "$(DESTDIR)/$(PREFIX)/bin/$(PROGRAM)"
install_%:
@ln -s "$(realpath ${DESTDIR}/${PREFIX}/bin/$(PROGRAM))" \
"${DESTDIR}/$(PREFIX)/bin/$(subst install_,,$@)"
install: install_$(PROGRAM) $(patsubst %,install_%,$(SUBCOMMANDS)) install_doc
clean:
make -C doc clean