]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/getconf/Makefile
Add two missing eventhandler.h headers
[FreeBSD/FreeBSD.git] / usr.bin / getconf / Makefile
1 # $FreeBSD$
2
3 .include <src.opts.mk>
4
5 PROG=   getconf
6
7 SRCS=   confstr.c getconf.c limits.c pathconf.c progenv.c sysconf.c \
8         unsigned_limits.c
9 CFLAGS+= -I${.CURDIR}
10 CLEANFILES+=    confstr.c limits.c pathconf.c progenv.c sysconf.c \
11                 confstr.names limits.names pathconf.names sysconf.names \
12                 conflicting.names unique.names unsigned_limits.names
13
14 .SUFFIXES: .gperf .names
15 .PHONY: conflicts
16
17 all:    conflicts
18
19 FAKE_GPERF=     ${.CURDIR}/fake-gperf.awk
20 .gperf.c: ${FAKE_GPERF}
21         LC_ALL=C awk -f ${FAKE_GPERF} ${.IMPSRC} >${.TARGET}
22
23 .gperf.names:
24         LC_ALL=C awk '/^[_A-Z]/ { print; }' ${.IMPSRC} | \
25             sed -e 's/,$$//' >${.TARGET}
26
27 conflicts: conflicting.names unique.names
28         @if test `wc -l <conflicting.names` != `wc -l <unique.names`; then \
29                 echo "Name conflicts found!" >&2; \
30                 exit 1; \
31         fi
32
33 # pathconf.names is not included here because pathconf names are
34 # syntactically distinct from the other kinds.
35 conflicting.names:      confstr.names limits.names sysconf.names
36         cat ${.ALLSRC} >${.TARGET}
37
38 unique.names:           conflicting.names
39         LC_ALL=C sort -u ${.ALLSRC} >${.TARGET}
40
41 HAS_TESTS=
42 SUBDIR.${MK_TESTS}+= tests
43
44 .include <bsd.prog.mk>