2002-11-25 04:00:05 -05:00
|
|
|
# $FreeBSD$
|
2000-04-25 22:36:54 -04:00
|
|
|
|
2017-05-17 21:43:30 -04:00
|
|
|
.include <src.opts.mk>
|
|
|
|
|
|
2000-04-25 22:36:54 -04:00
|
|
|
PROG= getconf
|
|
|
|
|
|
2018-05-22 22:51:56 -04:00
|
|
|
SRCS= confstr.c getconf.c limits.c pathconf.c progenv.c sysconf.c \
|
|
|
|
|
unsigned_limits.c
|
2000-04-26 03:00:46 -04:00
|
|
|
CFLAGS+= -I${.CURDIR}
|
2002-09-18 23:39:03 -04:00
|
|
|
CLEANFILES+= confstr.c limits.c pathconf.c progenv.c sysconf.c \
|
|
|
|
|
confstr.names limits.names pathconf.names sysconf.names \
|
2018-05-22 22:51:56 -04:00
|
|
|
conflicting.names unique.names unsigned_limits.names
|
2000-04-25 22:36:54 -04:00
|
|
|
|
2002-09-18 23:39:03 -04:00
|
|
|
.SUFFIXES: .gperf .names
|
|
|
|
|
.PHONY: conflicts
|
|
|
|
|
|
|
|
|
|
all: conflicts
|
2000-04-25 22:36:54 -04:00
|
|
|
|
2017-05-17 21:35:07 -04:00
|
|
|
FAKE_GPERF= ${.CURDIR}/fake-gperf.awk
|
|
|
|
|
.gperf.c: ${FAKE_GPERF}
|
|
|
|
|
LC_ALL=C awk -f ${FAKE_GPERF} ${.IMPSRC} >${.TARGET}
|
2002-09-18 23:39:03 -04:00
|
|
|
|
|
|
|
|
.gperf.names:
|
2002-11-25 04:00:05 -05:00
|
|
|
LC_ALL=C awk '/^[_A-Z]/ { print; }' ${.IMPSRC} | \
|
|
|
|
|
sed -e 's/,$$//' >${.TARGET}
|
2002-09-18 23:39:03 -04:00
|
|
|
|
|
|
|
|
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
|
2002-11-25 04:00:05 -05:00
|
|
|
LC_ALL=C sort -u ${.ALLSRC} >${.TARGET}
|
2000-04-25 22:36:54 -04:00
|
|
|
|
2017-08-02 04:50:42 -04:00
|
|
|
HAS_TESTS=
|
2017-08-02 04:35:51 -04:00
|
|
|
SUBDIR.${MK_TESTS}+= tests
|
2017-05-17 21:43:30 -04:00
|
|
|
|
2000-04-25 22:36:54 -04:00
|
|
|
.include <bsd.prog.mk>
|