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