1 2.include <src.opts.mk> 3 4PROG= getconf 5 6SRCS= confstr.c getconf.c limits.c pathconf.c progenv.c sysconf.c \ 7 unsigned_limits.c 8CFLAGS+= -I${.CURDIR} 9CLEANFILES+= confstr.c limits.c pathconf.c progenv.c sysconf.c \ 10 confstr.names limits.names pathconf.names sysconf.names \ 11 conflicting.names unique.names unsigned_limits.names 12 13.SUFFIXES: .gperf .names 14.PHONY: conflicts 15 16all: conflicts 17 18FAKE_GPERF= ${.CURDIR}/fake-gperf.awk 19.gperf.c: ${FAKE_GPERF} 20 LC_ALL=C awk -f ${FAKE_GPERF} ${.IMPSRC} >${.TARGET} 21 22.gperf.names: 23 LC_ALL=C awk '/^[_A-Z]/ { print; }' ${.IMPSRC} | \ 24 sed -e 's/,$$//' >${.TARGET} 25 26conflicts: conflicting.names unique.names 27 @if test `wc -l <conflicting.names` != `wc -l <unique.names`; then \ 28 echo "Name conflicts found!" >&2; \ 29 exit 1; \ 30 fi 31 32# pathconf.names is not included here because pathconf names are 33# syntactically distinct from the other kinds. 34conflicting.names: confstr.names limits.names sysconf.names 35 cat ${.ALLSRC} >${.TARGET} 36 37unique.names: conflicting.names 38 LC_ALL=C sort -u ${.ALLSRC} >${.TARGET} 39 40HAS_TESTS= 41SUBDIR.${MK_TESTS}+= tests 42 43.include <bsd.prog.mk> 44