about summary refs log tree commit diff
path: root/Makefile
blob: 80c41b69092373830bb1ae3c277bf65cd90698ee (plain) (blame)
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
51
52
53
54
55
56
57
58
59
60
61
62
63
PREFIX = /usr/local
SHAREDIR = ${PREFIX}/share
MANDIR = ${SHAREDIR}/man

CURL ?= curl
TAR ?= tar

SYSTEMS += freebsd
SYSTEMS += linux
SYSTEMS += netbsd
SYSTEMS += openbsd
SYSTEMS += posix

all: exman ${SYSTEMS}

.SUFFIXES: .tar .url

.PRECIOUS: ${SYSTEMS:=.tar}

.url.tar:
	${CURL} -f -o $@ "$$(cat $<)"

.tar:
	mkdir -p $@
	${TAR} -x -f $< -C $@ --strip-components ${STRIP.$@} ${FILES.$@}

netbsd: netbsd-man.tar netbsd-comp.tar
	mkdir -p $@
	${TAR} -x -f netbsd-man.tar -C $@ --strip-components ${STRIP.$@} ${FILES.$@}
	${TAR} -x -f netbsd-comp.tar -C $@ --strip-components ${STRIP.$@} ${FILES.$@}

.PRECIOUS: netbsd-man.tar netbsd-comp.tar

openbsd: openbsd-man.tar openbsd-comp.tar
	mkdir -p $@
	${TAR} -x -f openbsd-man.tar -C $@ --strip-components ${STRIP.$@} ${FILES.$@}
	${TAR} -x -f openbsd-comp.tar -C $@ --strip-components ${STRIP.$@} ${FILES.$@}

.PRECIOUS: openbsd-man.tar openbsd-comp.tar

FILES.freebsd = './usr/share/man/man[1-9]/'
FILES.netbsd = './usr/share/man/man[1-9]*/'
FILES.openbsd = './usr/share/man/man[1-9]*/'
FILES.linux = '*/man[1-9]/'
FILES.posix = '*/man[0-3]p/'

STRIP.freebsd = 4
STRIP.netbsd = 4
STRIP.openbsd = 4
STRIP.linux = 1
STRIP.posix = 1

clean:
	rm -fr ${SYSTEMS} *.tar

install: exman exman.1 ${SYSTEMS}
	install -d ${PREFIX}/bin ${MANDIR}/man1 ${SHAREDIR}/exman
	install exman ${PREFIX}/bin
	gzip -c exman.1 > ${MANDIR}/man1/exman.1.gz
	${TAR} -c -f - ${SYSTEMS} | ${TAR} -xo -f - -C ${SHAREDIR}/exman

uninstall:
	rm -fr ${PREFIX}/bin/exman ${MANDIR}/man1/exman.1.gz ${SHAREDIR}/exman
June McEnroe 2019-11-09Define macro for bit flag enumsJune McEnroe 2019-11-08Check that password is hashedJune McEnroe 2019-11-08Avoid calling getopt_long again after it returns -1June McEnroe On GNU, calling getopt_long again will reset optind back to the first non-option argument, which would cause an infinite loop of reading the same configurtion file forever. 2019-11-08Only change AWAY status for registered clientsJune McEnroe Turns out I did eventually fix this, because I may want to implement "passive clients" for logging or notification stuff, which wouldn't affect AWAY status either. 2019-11-07Just write the example normallyJune McEnroe 2019-11-07Include path in readlinkat errorJune McEnroe 2019-11-07Call clientConsume before clientRecvJune McEnroe This might reduce the frequency of a client getting its own message back because it was behind in the ring when it sent it. 2019-11-06Use -l:filename in Linux.mkJune McEnroe 2019-11-06Fix compat.h for #defined strlcpyJune McEnroe 2019-11-06Allow unsetting LIBRESSL_PREFIXJune McEnroe 2019-11-06Document calico service configurationJune McEnroe 2019-11-06Document SASL EXTERNAL configuration in more detailJune McEnroe 2019-11-06Document pounce service configurationJune McEnroe 2019-11-06Mention Darwin and GNU/Linux in READMEJune McEnroe 2019-11-06Assume LibreSSL from brew on DarwinJune McEnroe 2019-11-06Remove -DNO_EXPLICIT_BZERO from Darwin.mkJune McEnroe 2019-11-06Don't install rc scripts or dirs on LinuxJune McEnroe