2000-04-26 03:36:54 +01:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PROG= getconf
|
|
|
|
|
2002-09-19 04:39:03 +01:00
|
|
|
SRCS= confstr.c getconf.c limits.c pathconf.c progenv.c sysconf.c
|
2000-04-26 08:00:46 +01:00
|
|
|
CFLAGS+= -I${.CURDIR}
|
2002-09-19 04:39:03 +01:00
|
|
|
CLEANFILES+= confstr.c limits.c pathconf.c progenv.c sysconf.c \
|
|
|
|
confstr.names limits.names pathconf.names sysconf.names \
|
|
|
|
conflicting.names unique.names
|
2000-04-26 03:36:54 +01:00
|
|
|
|
2002-09-19 04:39:03 +01:00
|
|
|
.SUFFIXES: .gperf .names
|
|
|
|
.PHONY: conflicts
|
|
|
|
|
|
|
|
all: conflicts
|
2000-04-26 03:36:54 +01:00
|
|
|
|
|
|
|
.gperf.c:
|
2002-09-19 04:39:03 +01:00
|
|
|
awk -f ${.CURDIR}/fake-gperf.awk ${.IMPSRC} >${.TARGET}
|
|
|
|
|
|
|
|
.gperf.names:
|
|
|
|
awk '/^[_A-Z]/ { print; }' ${.IMPSRC} | sed -e 's/,$$//' >${.TARGET}
|
|
|
|
|
|
|
|
conflicts: conflicting.names unique.names
|
|
|
|
@if test `wc -l <conflicting.names` != `wc -l <unique.names`; then \
|
|
|
|
echo "Name conflicts found!" >&2; \
|
|
|
|
exit 1; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
# pathconf.names is not included here because pathconf names are
|
|
|
|
# syntactically distinct from the other kinds.
|
|
|
|
conflicting.names: confstr.names limits.names sysconf.names
|
|
|
|
cat ${.ALLSRC} >${.TARGET}
|
|
|
|
|
|
|
|
unique.names: conflicting.names
|
|
|
|
sort -u ${.ALLSRC} >${.TARGET}
|
2000-04-26 03:36:54 +01:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|