aboutsummaryrefslogtreecommitdiffstats
path: root/system_cmds/getconf.tproj
diff options
context:
space:
mode:
authorCameron Katri <me@cameronkatri.com>2021-05-12 16:08:47 -0400
committerCameron Katri <me@cameronkatri.com>2021-05-12 16:08:47 -0400
commit68311c8bb2e7f974b5b91ad61f85980f432f2d7f (patch)
treed4a9ed409ebadc06c878142757ac2fd0fb5456af /system_cmds/getconf.tproj
parent31cccc89092a6431196810f7fc29a49e51aecfa6 (diff)
downloadapple_cmds-68311c8bb2e7f974b5b91ad61f85980f432f2d7f.tar.gz
apple_cmds-68311c8bb2e7f974b5b91ad61f85980f432f2d7f.tar.zst
apple_cmds-68311c8bb2e7f974b5b91ad61f85980f432f2d7f.zip
system_cmds: shutdown may not work
Diffstat (limited to 'system_cmds/getconf.tproj')
-rw-r--r--system_cmds/getconf.tproj/Makefile41
1 files changed, 41 insertions, 0 deletions
diff --git a/system_cmds/getconf.tproj/Makefile b/system_cmds/getconf.tproj/Makefile
new file mode 100644
index 0000000..a5b230d
--- /dev/null
+++ b/system_cmds/getconf.tproj/Makefile
@@ -0,0 +1,41 @@
+# $FreeBSD$
+
+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}
+
+HAS_TESTS=
+SUBDIR.${MK_TESTS}+= tests
+
+.include <bsd.prog.mk>