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