aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCameron Katri <me@cameronkatri.com>2021-05-10 11:59:14 -0400
committerCameron Katri <me@cameronkatri.com>2021-05-10 14:59:06 -0400
commit0d0ad219a6366e30e1b1ae41f79c8e10a21ade6d (patch)
tree6c00373b0ec2a5f83ddad990b0ed347675bfa57d
parentb9db19b71926ba1d2b0722a43cf538bf139fc0d9 (diff)
downloadapple_cmds-0d0ad219a6366e30e1b1ae41f79c8e10a21ade6d.tar.gz
apple_cmds-0d0ad219a6366e30e1b1ae41f79c8e10a21ade6d.tar.zst
apple_cmds-0d0ad219a6366e30e1b1ae41f79c8e10a21ade6d.zip
shell_cmds: All compiled
-rw-r--r--shell_cmds/Makefile51
-rw-r--r--shell_cmds/Makefile.inc1
-rw-r--r--shell_cmds/alias/Makefile37
-rw-r--r--shell_cmds/apply/Makefile3
-rw-r--r--shell_cmds/basename/Makefile4
-rw-r--r--shell_cmds/chroot/Makefile6
-rw-r--r--shell_cmds/date/Makefile6
-rw-r--r--shell_cmds/dirname/Makefile4
-rw-r--r--shell_cmds/echo/Makefile5
-rw-r--r--shell_cmds/env/Makefile4
-rw-r--r--shell_cmds/expr/Makefile4
-rw-r--r--shell_cmds/false/Makefile3
-rw-r--r--shell_cmds/find/Makefile4
-rw-r--r--shell_cmds/getopt/Makefile3
-rw-r--r--shell_cmds/hexdump/Makefile10
-rw-r--r--shell_cmds/hostname/Makefile3
-rw-r--r--shell_cmds/id/Makefile8
-rw-r--r--shell_cmds/jot/Makefile3
-rw-r--r--shell_cmds/kill/Makefile5
-rw-r--r--shell_cmds/killall/Makefile3
-rw-r--r--shell_cmds/lastcomm/Makefile3
-rw-r--r--shell_cmds/locate/Makefile3
-rw-r--r--shell_cmds/locate/bigram/Makefile8
-rw-r--r--shell_cmds/locate/code/Makefile8
-rw-r--r--shell_cmds/locate/locate/Makefile17
-rw-r--r--shell_cmds/logname/Makefile3
-rw-r--r--shell_cmds/mktemp/Makefile3
-rw-r--r--shell_cmds/nice/Makefile3
-rw-r--r--shell_cmds/nohup/Makefile3
-rw-r--r--shell_cmds/path_helper/Makefile4
-rw-r--r--shell_cmds/printenv/Makefile3
-rw-r--r--shell_cmds/printf/Makefile3
-rw-r--r--shell_cmds/pwd/Makefile3
-rw-r--r--shell_cmds/renice/Makefile4
-rw-r--r--shell_cmds/script/Makefile3
-rw-r--r--shell_cmds/seq/Makefile3
-rw-r--r--shell_cmds/sh/Makefile23
-rw-r--r--shell_cmds/shlock/Makefile3
-rw-r--r--shell_cmds/sleep/Makefile3
-rw-r--r--shell_cmds/su/Makefile5
-rw-r--r--shell_cmds/systime/Makefile3
-rw-r--r--shell_cmds/tee/Makefile3
-rw-r--r--shell_cmds/test/Makefile8
-rw-r--r--shell_cmds/time/Makefile3
-rw-r--r--shell_cmds/true/Makefile3
-rw-r--r--shell_cmds/uname/Makefile3
-rw-r--r--shell_cmds/users/Makefile3
-rw-r--r--shell_cmds/w/Makefile6
-rw-r--r--shell_cmds/what/Makefile3
-rw-r--r--shell_cmds/whereis/Makefile3
-rw-r--r--shell_cmds/which/Makefile3
-rw-r--r--shell_cmds/who/Makefile6
-rw-r--r--shell_cmds/who/utmpentry.c4
-rw-r--r--shell_cmds/xargs/Makefile4
-rw-r--r--shell_cmds/yes/Makefile3
55 files changed, 317 insertions, 16 deletions
diff --git a/shell_cmds/Makefile b/shell_cmds/Makefile
new file mode 100644
index 0000000..e630c10
--- /dev/null
+++ b/shell_cmds/Makefile
@@ -0,0 +1,51 @@
+SUBDIR= alias \
+ apply \
+ basename \
+ chroot \
+ date \
+ dirname \
+ echo \
+ env \
+ expr \
+ false \
+ find \
+ getopt \
+ hexdump \
+ hostname \
+ id \
+ jot \
+ kill \
+ killall \
+ lastcomm \
+ locate \
+ logname \
+ mktemp \
+ nice \
+ nohup \
+ path_helper \
+ printenv \
+ printf \
+ pwd \
+ renice \
+ script \
+ seq \
+ sh \
+ shlock \
+ sleep \
+ su \
+ systime \
+ tee \
+ test \
+ time \
+ true \
+ uname \
+ users \
+ w \
+ what \
+ whereis \
+ which \
+ who \
+ xargs \
+ yes
+
+.include <bsd.subdir.mk>
diff --git a/shell_cmds/Makefile.inc b/shell_cmds/Makefile.inc
new file mode 100644
index 0000000..5b08cda
--- /dev/null
+++ b/shell_cmds/Makefile.inc
@@ -0,0 +1 @@
+BINDIR?=/usr/bin
diff --git a/shell_cmds/alias/Makefile b/shell_cmds/alias/Makefile
new file mode 100644
index 0000000..818ff1a
--- /dev/null
+++ b/shell_cmds/alias/Makefile
@@ -0,0 +1,37 @@
+# $FreeBSD$
+
+SCRIPTS=generic.sh
+SCRIPTSNAME=alias
+MAN=builtin.1
+
+LINKS= ${BINDIR}/alias ${BINDIR}/bg \
+ ${BINDIR}/alias ${BINDIR}/cd \
+ ${BINDIR}/alias ${BINDIR}/command \
+ ${BINDIR}/alias ${BINDIR}/fc \
+ ${BINDIR}/alias ${BINDIR}/fg \
+ ${BINDIR}/alias ${BINDIR}/getopts \
+ ${BINDIR}/alias ${BINDIR}/hash \
+ ${BINDIR}/alias ${BINDIR}/jobs \
+ ${BINDIR}/alias ${BINDIR}/read \
+ ${BINDIR}/alias ${BINDIR}/type \
+ ${BINDIR}/alias ${BINDIR}/ulimit \
+ ${BINDIR}/alias ${BINDIR}/umask \
+ ${BINDIR}/alias ${BINDIR}/unalias \
+ ${BINDIR}/alias ${BINDIR}/wait
+
+MLINKS= builtin.1 alias.1 \
+ builtin.1 cd.1 \
+ builtin.1 command.1 \
+ builtin.1 fc.1 \
+ builtin.1 fg.1 \
+ builtin.1 getopts.1 \
+ builtin.1 hash.1 \
+ builtin.1 jobs.1 \
+ builtin.1 read.1 \
+ builtin.1 type.1 \
+ builtin.1 ulimit.1 \
+ builtin.1 umask.1 \
+ builtin.1 unalias.1 \
+ builtin.1 wait.1
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/apply/Makefile b/shell_cmds/apply/Makefile
new file mode 100644
index 0000000..6c62a46
--- /dev/null
+++ b/shell_cmds/apply/Makefile
@@ -0,0 +1,3 @@
+PROG= apply
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/basename/Makefile b/shell_cmds/basename/Makefile
new file mode 100644
index 0000000..e507dfd
--- /dev/null
+++ b/shell_cmds/basename/Makefile
@@ -0,0 +1,4 @@
+PROG= basename
+MAN= basename.1 dirname.1
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/chroot/Makefile b/shell_cmds/chroot/Makefile
new file mode 100644
index 0000000..eb16239
--- /dev/null
+++ b/shell_cmds/chroot/Makefile
@@ -0,0 +1,6 @@
+BINDIR=/usr/sbin
+
+PROG= chroot
+MAN= chroot.8
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/date/Makefile b/shell_cmds/date/Makefile
new file mode 100644
index 0000000..ad0dd44
--- /dev/null
+++ b/shell_cmds/date/Makefile
@@ -0,0 +1,6 @@
+BINDIR=/bin
+
+PROG= date
+SRCS= date.c netdate.c vary.c
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/dirname/Makefile b/shell_cmds/dirname/Makefile
new file mode 100644
index 0000000..939bfaf
--- /dev/null
+++ b/shell_cmds/dirname/Makefile
@@ -0,0 +1,4 @@
+PROG= dirname
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/echo/Makefile b/shell_cmds/echo/Makefile
new file mode 100644
index 0000000..f896dfc
--- /dev/null
+++ b/shell_cmds/echo/Makefile
@@ -0,0 +1,5 @@
+BINDIR=/bin
+
+PROG= echo
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/env/Makefile b/shell_cmds/env/Makefile
new file mode 100644
index 0000000..e646986
--- /dev/null
+++ b/shell_cmds/env/Makefile
@@ -0,0 +1,4 @@
+PROG= env
+SRCS= env.c envopts.c
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/expr/Makefile b/shell_cmds/expr/Makefile
new file mode 100644
index 0000000..8169f63
--- /dev/null
+++ b/shell_cmds/expr/Makefile
@@ -0,0 +1,4 @@
+PROG= expr
+SRCS= expr.y
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/false/Makefile b/shell_cmds/false/Makefile
new file mode 100644
index 0000000..7922186
--- /dev/null
+++ b/shell_cmds/false/Makefile
@@ -0,0 +1,3 @@
+PROG= false
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/find/Makefile b/shell_cmds/find/Makefile
new file mode 100644
index 0000000..22bfbad
--- /dev/null
+++ b/shell_cmds/find/Makefile
@@ -0,0 +1,4 @@
+PROG= find
+SRCS= find.c function.c getdate.y ls.c main.c misc.c operator.c option.c
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/getopt/Makefile b/shell_cmds/getopt/Makefile
new file mode 100644
index 0000000..b015a8a
--- /dev/null
+++ b/shell_cmds/getopt/Makefile
@@ -0,0 +1,3 @@
+PROG= getopt
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/hexdump/Makefile b/shell_cmds/hexdump/Makefile
new file mode 100644
index 0000000..1ae98e4
--- /dev/null
+++ b/shell_cmds/hexdump/Makefile
@@ -0,0 +1,10 @@
+PROG= hexdump
+MAN= hexdump.1 od.1
+SRCS= conv.c \
+ display.c \
+ hexdump.c \
+ hexsyntax.c \
+ odsyntax.c \
+ parse.c
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/hostname/Makefile b/shell_cmds/hostname/Makefile
new file mode 100644
index 0000000..95cf6bb
--- /dev/null
+++ b/shell_cmds/hostname/Makefile
@@ -0,0 +1,3 @@
+PROG= hostname
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/id/Makefile b/shell_cmds/id/Makefile
new file mode 100644
index 0000000..b01f798
--- /dev/null
+++ b/shell_cmds/id/Makefile
@@ -0,0 +1,8 @@
+PROG= id
+MAN= groups.1 id.1 whoami.1
+SRCS= id.c
+
+LINKS= ${BINDIR}/id ${BINDIR}/groups
+LINKS+= ${BINDIR}/id ${BINDIR}/whoami
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/jot/Makefile b/shell_cmds/jot/Makefile
new file mode 100644
index 0000000..e662623
--- /dev/null
+++ b/shell_cmds/jot/Makefile
@@ -0,0 +1,3 @@
+PROG= jot
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/kill/Makefile b/shell_cmds/kill/Makefile
new file mode 100644
index 0000000..d6bfee9
--- /dev/null
+++ b/shell_cmds/kill/Makefile
@@ -0,0 +1,5 @@
+BINDIR=/bin
+
+PROG= kill
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/killall/Makefile b/shell_cmds/killall/Makefile
new file mode 100644
index 0000000..e8ff6ee
--- /dev/null
+++ b/shell_cmds/killall/Makefile
@@ -0,0 +1,3 @@
+PROG= killall
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/lastcomm/Makefile b/shell_cmds/lastcomm/Makefile
new file mode 100644
index 0000000..23fafaf
--- /dev/null
+++ b/shell_cmds/lastcomm/Makefile
@@ -0,0 +1,3 @@
+PROG= lastcomm
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/locate/Makefile b/shell_cmds/locate/Makefile
new file mode 100644
index 0000000..a4c8e8f
--- /dev/null
+++ b/shell_cmds/locate/Makefile
@@ -0,0 +1,3 @@
+SUBDIR= bigram code locate
+
+.include <bsd.subdir.mk>
diff --git a/shell_cmds/locate/bigram/Makefile b/shell_cmds/locate/bigram/Makefile
new file mode 100644
index 0000000..1740f30
--- /dev/null
+++ b/shell_cmds/locate/bigram/Makefile
@@ -0,0 +1,8 @@
+PROG= locate.bigram
+MAN= locate.bigram.8
+
+BINDIR=/usr/libexec
+
+CFLAGS+=-I../locate
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/locate/code/Makefile b/shell_cmds/locate/code/Makefile
new file mode 100644
index 0000000..4c06f77
--- /dev/null
+++ b/shell_cmds/locate/code/Makefile
@@ -0,0 +1,8 @@
+PROG= locate.code
+MAN= locate.code.8
+
+BINDIR=/usr/libexec
+
+CFLAGS+=-I../locate
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/locate/locate/Makefile b/shell_cmds/locate/locate/Makefile
new file mode 100644
index 0000000..cf5717b
--- /dev/null
+++ b/shell_cmds/locate/locate/Makefile
@@ -0,0 +1,17 @@
+# @(#)Makefile 8.1 (Berkeley) 6/6/93
+# $FreeBSD$
+
+CONFS= locate.rc
+PROG= locate
+SRCS= util.c locate.c
+CFLAGS+= -I${.CURDIR} -DMMAP # -DDEBUG (print time) -O2 (10% faster)
+SCRIPTS=updatedb.sh mklocatedb.sh concatdb.sh
+MAN= locate.1 locate.updatedb.8
+
+SCRIPTSDIR= ${LIBEXECDIR}
+.for script in ${SCRIPTS}
+SCRIPTSNAME_${script}= locate.${script:R}
+.endfor
+MLINKS+= locate.updatedb.8 updatedb.8
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/logname/Makefile b/shell_cmds/logname/Makefile
new file mode 100644
index 0000000..b7422cb
--- /dev/null
+++ b/shell_cmds/logname/Makefile
@@ -0,0 +1,3 @@
+PROG= logname
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/mktemp/Makefile b/shell_cmds/mktemp/Makefile
new file mode 100644
index 0000000..b78ac92
--- /dev/null
+++ b/shell_cmds/mktemp/Makefile
@@ -0,0 +1,3 @@
+PROG= mktemp
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/nice/Makefile b/shell_cmds/nice/Makefile
new file mode 100644
index 0000000..4098b3b
--- /dev/null
+++ b/shell_cmds/nice/Makefile
@@ -0,0 +1,3 @@
+PROG= nice
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/nohup/Makefile b/shell_cmds/nohup/Makefile
new file mode 100644
index 0000000..5698f6a
--- /dev/null
+++ b/shell_cmds/nohup/Makefile
@@ -0,0 +1,3 @@
+PROG= nohup
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/path_helper/Makefile b/shell_cmds/path_helper/Makefile
new file mode 100644
index 0000000..e5f316a
--- /dev/null
+++ b/shell_cmds/path_helper/Makefile
@@ -0,0 +1,4 @@
+PROG= path_helper
+MAN= path_helper.8
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/printenv/Makefile b/shell_cmds/printenv/Makefile
new file mode 100644
index 0000000..e3b7071
--- /dev/null
+++ b/shell_cmds/printenv/Makefile
@@ -0,0 +1,3 @@
+PROG= printenv
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/printf/Makefile b/shell_cmds/printf/Makefile
new file mode 100644
index 0000000..9133366
--- /dev/null
+++ b/shell_cmds/printf/Makefile
@@ -0,0 +1,3 @@
+PROG= printf
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/pwd/Makefile b/shell_cmds/pwd/Makefile
new file mode 100644
index 0000000..d5c1780
--- /dev/null
+++ b/shell_cmds/pwd/Makefile
@@ -0,0 +1,3 @@
+PROG= pwd
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/renice/Makefile b/shell_cmds/renice/Makefile
new file mode 100644
index 0000000..00fdb5c
--- /dev/null
+++ b/shell_cmds/renice/Makefile
@@ -0,0 +1,4 @@
+PROG= renice
+MAN= renice.8
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/script/Makefile b/shell_cmds/script/Makefile
new file mode 100644
index 0000000..f70b986
--- /dev/null
+++ b/shell_cmds/script/Makefile
@@ -0,0 +1,3 @@
+PROG= script
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/seq/Makefile b/shell_cmds/seq/Makefile
new file mode 100644
index 0000000..96f8a35
--- /dev/null
+++ b/shell_cmds/seq/Makefile
@@ -0,0 +1,3 @@
+PROG= seq
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/sh/Makefile b/shell_cmds/sh/Makefile
index 8d08662..215e1e2 100644
--- a/shell_cmds/sh/Makefile
+++ b/shell_cmds/sh/Makefile
@@ -1,7 +1,7 @@
# @(#)Makefile 8.4 (Berkeley) 5/5/95
# $FreeBSD: head/bin/sh/Makefile 322515 2017-08-14 19:21:37Z ngie $
-
-.include <src.opts.mk>
+#
+BINDIR=/bin
PACKAGE=runtime
PROG= sh
@@ -19,18 +19,18 @@ SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS}
# utilities of the same name are handled with the associated manpage,
# builtin.1 in share/man/man1/.
-LIBADD= edit
+LDADD=-ledit
CFLAGS+=-DSHELL -I. -I${.CURDIR}
# for debug:
# DEBUG_FLAGS+= -g -DDEBUG=2 -fno-inline
-WARNS?= 2
+#WARNS?= 2
WFORMAT=0
.PATH: ${.CURDIR}/bltin \
${.CURDIR:H}/kill \
${.CURDIR:H}/test \
- ${SRCTOP}/usr.bin/printf
+ ${.CURDIR}/../printf
CLEANFILES+= mknodes mknodes.o \
mksyntax mksyntax.o
@@ -39,27 +39,22 @@ CLEANFILES+= ${GENSRCS} ${GENHDRS}
build-tools: mknodes mksyntax
.ORDER: builtins.c builtins.h
-builtins.h: .NOMETA
builtins.c builtins.h: mkbuiltins builtins.def
sh ${.CURDIR}/mkbuiltins ${.CURDIR}
# XXX this is just to stop the default .c rule being used, so that the
# intermediate object has a fixed name.
# XXX we have a default .c rule, but no default .o rule.
-mknodes.o mksyntax.o: ${BUILD_TOOLS_META}
- ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
-mknodes: mknodes.o ${BUILD_TOOLS_META}
-mksyntax: mksyntax.o ${BUILD_TOOLS_META}
+mknodes mksyntax:
+ clang ${.IMPSRC} ${.TARGET}.c -o ${.TARGET}
.ORDER: nodes.c nodes.h
-nodes.h: .NOMETA
nodes.c nodes.h: mknodes nodetypes nodes.c.pat
- ${BTOOLSPATH:U.}/mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
+ ./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
.ORDER: syntax.c syntax.h
-syntax.h: .NOMETA
syntax.c syntax.h: mksyntax
- ${BTOOLSPATH:U.}/mksyntax
+ ./mksyntax
token.h: mktokens
sh ${.CURDIR}/mktokens
diff --git a/shell_cmds/shlock/Makefile b/shell_cmds/shlock/Makefile
new file mode 100644
index 0000000..004ad04
--- /dev/null
+++ b/shell_cmds/shlock/Makefile
@@ -0,0 +1,3 @@
+PROG= shlock
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/sleep/Makefile b/shell_cmds/sleep/Makefile
new file mode 100644
index 0000000..193ae51
--- /dev/null
+++ b/shell_cmds/sleep/Makefile
@@ -0,0 +1,3 @@
+PROG= sleep
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/su/Makefile b/shell_cmds/su/Makefile
new file mode 100644
index 0000000..e7ae615
--- /dev/null
+++ b/shell_cmds/su/Makefile
@@ -0,0 +1,5 @@
+PROG= su
+
+LDADD=-lpam
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/systime/Makefile b/shell_cmds/systime/Makefile
new file mode 100644
index 0000000..d7f9881
--- /dev/null
+++ b/shell_cmds/systime/Makefile
@@ -0,0 +1,3 @@
+PROG= systime
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/tee/Makefile b/shell_cmds/tee/Makefile
new file mode 100644
index 0000000..ab7b935
--- /dev/null
+++ b/shell_cmds/tee/Makefile
@@ -0,0 +1,3 @@
+PROG= tee
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/test/Makefile b/shell_cmds/test/Makefile
new file mode 100644
index 0000000..562c968
--- /dev/null
+++ b/shell_cmds/test/Makefile
@@ -0,0 +1,8 @@
+BINDIR=/bin
+
+PROG= test
+MAN= [.1 test.1
+
+LINKS= ${BINDIR}/test ${BINDIR}/[
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/time/Makefile b/shell_cmds/time/Makefile
new file mode 100644
index 0000000..a91e94f
--- /dev/null
+++ b/shell_cmds/time/Makefile
@@ -0,0 +1,3 @@
+PROG= time
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/true/Makefile b/shell_cmds/true/Makefile
new file mode 100644
index 0000000..1285b81
--- /dev/null
+++ b/shell_cmds/true/Makefile
@@ -0,0 +1,3 @@
+PROG= true
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/uname/Makefile b/shell_cmds/uname/Makefile
new file mode 100644
index 0000000..a002a44
--- /dev/null
+++ b/shell_cmds/uname/Makefile
@@ -0,0 +1,3 @@
+PROG= uname
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/users/Makefile b/shell_cmds/users/Makefile
new file mode 100644
index 0000000..8b987ca
--- /dev/null
+++ b/shell_cmds/users/Makefile
@@ -0,0 +1,3 @@
+PROG= users
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/w/Makefile b/shell_cmds/w/Makefile
new file mode 100644
index 0000000..c1d1c21
--- /dev/null
+++ b/shell_cmds/w/Makefile
@@ -0,0 +1,6 @@
+PROG= w
+SRCS= fmt.c pr_time.c proc_compare.c w.c
+
+CFLAGS+=-DHAVE_UTMPX
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/what/Makefile b/shell_cmds/what/Makefile
new file mode 100644
index 0000000..f50df5d
--- /dev/null
+++ b/shell_cmds/what/Makefile
@@ -0,0 +1,3 @@
+PROG= what
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/whereis/Makefile b/shell_cmds/whereis/Makefile
new file mode 100644
index 0000000..5803279
--- /dev/null
+++ b/shell_cmds/whereis/Makefile
@@ -0,0 +1,3 @@
+PROG= whereis
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/which/Makefile b/shell_cmds/which/Makefile
new file mode 100644
index 0000000..097d238
--- /dev/null
+++ b/shell_cmds/which/Makefile
@@ -0,0 +1,3 @@
+PROG= which
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/who/Makefile b/shell_cmds/who/Makefile
new file mode 100644
index 0000000..74826ba
--- /dev/null
+++ b/shell_cmds/who/Makefile
@@ -0,0 +1,6 @@
+PROG= who
+SRCS= who.c utmpentry.c
+
+CFLAGS+=-DSUPPORT_UTMPX
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/who/utmpentry.c b/shell_cmds/who/utmpentry.c
index b0e0914..7938d37 100644
--- a/shell_cmds/who/utmpentry.c
+++ b/shell_cmds/who/utmpentry.c
@@ -319,7 +319,7 @@ getentry(struct utmpentry *e, struct utmp *up)
static void
getentryx(struct utmpentry *e, struct utmpx *up)
{
- COMPILE_ASSERT(sizeof(e->name) > sizeof(up->ut_name));
+ COMPILE_ASSERT(sizeof(e->name) > sizeof(up->ut_user));
COMPILE_ASSERT(sizeof(e->line) > sizeof(up->ut_line));
COMPILE_ASSERT(sizeof(e->host) > sizeof(up->ut_host));
@@ -331,7 +331,7 @@ getentryx(struct utmpentry *e, struct utmpx *up)
* reason we use the size of the _source_ as the length
* argument.
*/
- (void)strncpy(e->name, up->ut_name, sizeof(up->ut_name));
+ (void)strncpy(e->name, up->ut_user, sizeof(up->ut_user));
(void)strncpy(e->line, up->ut_line, sizeof(up->ut_line));
(void)strncpy(e->host, up->ut_host, sizeof(up->ut_host));
diff --git a/shell_cmds/xargs/Makefile b/shell_cmds/xargs/Makefile
new file mode 100644
index 0000000..58d417a
--- /dev/null
+++ b/shell_cmds/xargs/Makefile
@@ -0,0 +1,4 @@
+PROG= xargs
+SRCS= strnsubst.c xargs.c
+
+.include <bsd.prog.mk>
diff --git a/shell_cmds/yes/Makefile b/shell_cmds/yes/Makefile
new file mode 100644
index 0000000..b1d4075
--- /dev/null
+++ b/shell_cmds/yes/Makefile
@@ -0,0 +1,3 @@
+PROG= yes
+
+.include <bsd.prog.mk>