Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids. Most
[dragonfly.git] / usr.bin / getconf / Makefile
1 # $FreeBSD: src/usr.bin/getconf/Makefile,v 1.3.2.2 2002/11/25 09:02:40 ru Exp $
2 # $DragonFly: src/usr.bin/getconf/Makefile,v 1.2 2003/06/17 04:29:27 dillon Exp $
3
4 PROG=   getconf
5
6 SRCS=   confstr.c getconf.c limits.c pathconf.c progenv.c sysconf.c
7 CFLAGS+= -I${.CURDIR} -DSTABLE
8 CLEANFILES+=    confstr.c limits.c pathconf.c progenv.c sysconf.c \
9                 confstr.names limits.names pathconf.names sysconf.names \
10                 conflicting.names unique.names
11
12 .SUFFIXES: .gperf .names
13 .PHONY: conflicts
14
15 all:    conflicts
16
17 .gperf.c:
18         LC_ALL=C awk -f ${.CURDIR}/fake-gperf.awk ${.IMPSRC} >${.TARGET}
19
20 .gperf.names:
21         LC_ALL=C awk '/^[_A-Z]/ { print; }' ${.IMPSRC} | \
22             sed -e 's/,$$//' >${.TARGET}
23
24 conflicts: conflicting.names unique.names
25         @if test `wc -l <conflicting.names` != `wc -l <unique.names`; then \
26                 echo "Name conflicts found!" >&2; \
27                 exit 1; \
28         fi
29
30 # pathconf.names is not included here because pathconf names are
31 # syntactically distinct from the other kinds.
32 conflicting.names:      confstr.names limits.names sysconf.names
33         cat ${.ALLSRC} >${.TARGET}
34
35 unique.names:           conflicting.names
36         LC_ALL=C sort -u ${.ALLSRC} >${.TARGET}
37
38 .include <bsd.prog.mk>