1ec65476d5
Items tested via this commit are: - Some basic POSIX constants. - Some valid programming environments with -v. - Some invalid programming environments via -v. NOTE: this test makes assumptions about ILP32/LP32 vs LP64 that are currently not true on all architectures to avoid hardcoding some architectures in the tests. I'm working on improving getconf(1) to be more sane about handling ILP32/LP32 vs LP64. Future commits are coming soon to address this. MFC after: 2 weeks Tested with: amd64, i386 Sponsored by: Dell EMC Isilon
45 lines
1.1 KiB
Makefile
45 lines
1.1 KiB
Makefile
# $FreeBSD$
|
|
|
|
.include <src.opts.mk>
|
|
|
|
PROG= getconf
|
|
|
|
SRCS= confstr.c getconf.c limits.c pathconf.c progenv.c sysconf.c
|
|
CFLAGS+= -I${.CURDIR}
|
|
CLEANFILES+= confstr.c limits.c pathconf.c progenv.c sysconf.c \
|
|
confstr.names limits.names pathconf.names sysconf.names \
|
|
conflicting.names unique.names
|
|
|
|
.SUFFIXES: .gperf .names
|
|
.PHONY: conflicts
|
|
|
|
all: conflicts
|
|
|
|
FAKE_GPERF= ${.CURDIR}/fake-gperf.awk
|
|
.gperf.c: ${FAKE_GPERF}
|
|
LC_ALL=C awk -f ${FAKE_GPERF} ${.IMPSRC} >${.TARGET}
|
|
|
|
.gperf.names:
|
|
LC_ALL=C 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
|
|
LC_ALL=C sort -u ${.ALLSRC} >${.TARGET}
|
|
|
|
.if ${MK_TESTS} != "no"
|
|
SUBDIR+= tests
|
|
.endif
|
|
|
|
.include <bsd.prog.mk>
|