File: Makefile.bsd

package info (click to toggle)
entr 5.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 260 kB
  • sloc: ansic: 937; sh: 544; makefile: 13
file content (43 lines) | stat: -rw-r--r-- 870 bytes parent folder | download
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
CLANG_FORMAT ?= clang-format
PREFIX ?= /usr/local
MANPREFIX ?= ${PREFIX}/man
RELEASE = 5.7
COMPONENTS = compat.o status.o entr.o

all: entr

compat.c: missing/*
	cat /dev/null ${EXTRA_SRC} > compat.c

.c.o:
	${CC} ${CFLAGS} ${CPPFLAGS} -DRELEASE=\"${RELEASE}\" -c $<

entr: ${COMPONENTS}
	${CC} ${CFLAGS} ${CPPFLAGS} -o $@ ${COMPONENTS} ${LDFLAGS}

test: entr
	ls entr.1 | EV_TRACE=1 ./entr -zn wc -l entr.1

check: entr
	./system_test.sh

clean:
	rm -f *.o compat.c entr

distclean: clean
	rm -f Makefile

install: entr
	@mkdir -p ${DESTDIR}${PREFIX}/bin
	@mkdir -p ${DESTDIR}${MANPREFIX}/man1
	install entr ${DESTDIR}${PREFIX}/bin
	install -m 644 entr.1 ${DESTDIR}${MANPREFIX}/man1

uninstall:
	rm ${DESTDIR}${PREFIX}/bin/entr
	rm ${DESTDIR}${MANPREFIX}/man1/entr.1

format:
	${CLANG_FORMAT} -i *.c *.h

.PHONY: all test check clean format distclean install uninstall