aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--adv_cmds/Makefile15
-rw-r--r--adv_cmds/cap_mkdb/Makefile3
-rw-r--r--adv_cmds/colldef/Makefile9
-rw-r--r--adv_cmds/colldef/scan.l2
-rw-r--r--adv_cmds/finger/Makefile8
-rw-r--r--adv_cmds/gencat/Makefile5
-rw-r--r--adv_cmds/last/Makefile3
-rw-r--r--adv_cmds/locale/Makefile3
-rw-r--r--adv_cmds/lsvfs/Makefile3
-rw-r--r--adv_cmds/mklocale/Makefile5
-rw-r--r--adv_cmds/mklocale/lex.l2
-rw-r--r--adv_cmds/ps/Makefile9
-rw-r--r--adv_cmds/stty/Makefile10
-rw-r--r--adv_cmds/tabs/Makefile5
-rw-r--r--adv_cmds/tty/Makefile3
-rw-r--r--adv_cmds/whois/Makefile3
-rw-r--r--basic_cmds/Makefile6
-rw-r--r--basic_cmds/mesg/Makefile3
-rw-r--r--basic_cmds/uudecode/Makefile5
-rw-r--r--basic_cmds/uuencode/Makefile6
-rw-r--r--basic_cmds/write/Makefile3
-rw-r--r--bootstrap_cmds/Makefile3
-rw-r--r--bootstrap_cmds/migcom.tproj/Makefile22
-rw-r--r--bootstrap_cmds/migcom.tproj/lexxer.l2
-rw-r--r--developer_cmds/Makefile7
-rw-r--r--developer_cmds/asa/Makefile3
-rw-r--r--developer_cmds/ctags/Makefile10
-rw-r--r--developer_cmds/lorder/Makefile3
-rw-r--r--developer_cmds/rpcgen/Makefile13
-rw-r--r--developer_cmds/unifdef/Makefile4
-rw-r--r--diskdev_cmds/Makefile18
-rw-r--r--diskdev_cmds/dev_mkdb.tproj/Makefile4
-rw-r--r--diskdev_cmds/disklib/preen.c4
-rw-r--r--diskdev_cmds/edquota.tproj/Makefile4
-rw-r--r--diskdev_cmds/edt_fstab/edt_fstab.h2
-rw-r--r--diskdev_cmds/fdisk.tproj/Makefile14
-rw-r--r--diskdev_cmds/fsck.tproj/Makefile6
-rw-r--r--diskdev_cmds/fsck.tproj/fsck.c2
-rw-r--r--diskdev_cmds/fstyp.tproj/Makefile19
-rw-r--r--diskdev_cmds/fstyp.tproj/progs.mk1
-rw-r--r--diskdev_cmds/fuser.tproj/Makefile3
-rw-r--r--diskdev_cmds/mount.tproj/Makefile3
-rw-r--r--diskdev_cmds/mount_devfs.tproj/Makefile6
-rw-r--r--diskdev_cmds/mount_fdesc.tproj/Makefile6
-rw-r--r--diskdev_cmds/quota.tproj/Makefile4
-rw-r--r--diskdev_cmds/quotacheck.tproj/Makefile9
-rw-r--r--diskdev_cmds/quotaon.tproj/Makefile4
-rw-r--r--diskdev_cmds/repquota.tproj/Makefile4
-rw-r--r--diskdev_cmds/setclass.tproj/Makefile4
-rw-r--r--diskdev_cmds/vndevice.tproj/Makefile4
-rw-r--r--diskdev_cmds/vsdbutil.tproj/Makefile8
-rw-r--r--doc_cmds/Makefile5
-rw-r--r--doc_cmds/checknr/Makefile3
-rw-r--r--doc_cmds/colcrt/Makefile3
-rw-r--r--doc_cmds/makewhatis/Makefile8
-rw-r--r--file_cmds/Makefile30
-rw-r--r--file_cmds/chflags/Makefile3
-rw-r--r--file_cmds/chmod/Makefile5
-rw-r--r--file_cmds/chown/Makefile8
-rw-r--r--file_cmds/cksum/Makefile10
-rw-r--r--file_cmds/compress/Makefile6
-rw-r--r--file_cmds/cp/Makefile4
-rw-r--r--file_cmds/dd/Makefile4
-rw-r--r--file_cmds/df/Makefile6
-rw-r--r--file_cmds/du/Makefile3
-rw-r--r--file_cmds/gzip/Makefile15
-rw-r--r--file_cmds/install/Makefile4
-rw-r--r--file_cmds/ipcrm/Makefile3
-rw-r--r--file_cmds/ipcs/Makefile3
-rw-r--r--file_cmds/ln/Makefile5
-rw-r--r--file_cmds/ls/Makefile6
-rw-r--r--file_cmds/ls/ls.c1
-rw-r--r--file_cmds/mkdir/Makefile3
-rw-r--r--file_cmds/mkfifo/Makefile3
-rw-r--r--file_cmds/mknod/Makefile4
-rw-r--r--file_cmds/mtree/Makefile19
-rw-r--r--file_cmds/mtree/commoncrypto.c4
-rw-r--r--file_cmds/mv/Makefile3
-rw-r--r--file_cmds/pathchk/Makefile3
-rw-r--r--file_cmds/pax/Makefile21
-rw-r--r--file_cmds/pax/extern.h2
-rw-r--r--file_cmds/pax/options.c2
-rw-r--r--file_cmds/rm/Makefile4
-rw-r--r--file_cmds/rmdir/Makefile3
-rw-r--r--file_cmds/rmt/Makefile4
-rw-r--r--file_cmds/shar/Makefile4
-rw-r--r--file_cmds/stat/Makefile4
-rw-r--r--file_cmds/touch/Makefile3
-rw-r--r--mail_cmds/Makefile10
-rw-r--r--mail_cmds/biff/Makefile11
-rw-r--r--mail_cmds/comsat/Makefile13
-rw-r--r--mail_cmds/from/Makefile11
-rw-r--r--mail_cmds/mail/Makefile39
-rw-r--r--mail_cmds/msgs/Makefile12
-rw-r--r--misc_cmds/Makefile7
-rw-r--r--misc_cmds/calendar/Makefile10
-rw-r--r--misc_cmds/leave/Makefile3
-rw-r--r--misc_cmds/leave/leave.c1
-rw-r--r--misc_cmds/ncal/Makefile6
-rw-r--r--misc_cmds/ncal/ncal.c2
-rw-r--r--misc_cmds/tsort/Makefile3
-rw-r--r--misc_cmds/units/Makefile5
-rw-r--r--patch_cmds/Makefile4
-rw-r--r--patch_cmds/diffstat/Makefile5
-rw-r--r--patch_cmds/diffstat/diffstat.c2
-rw-r--r--patch_cmds/patch/Makefile4
-rw-r--r--remote_cmds/Makefile16
-rw-r--r--remote_cmds/logger.tproj/Makefile12
-rw-r--r--remote_cmds/talk.tproj/Makefile18
-rw-r--r--remote_cmds/talkd.tproj/Makefile18
-rw-r--r--remote_cmds/telnet.tproj/Makefile26
-rw-r--r--remote_cmds/telnet.tproj/telnet.c2
-rw-r--r--remote_cmds/telnetd.tproj/Makefile56
-rw-r--r--remote_cmds/telnetd.tproj/sys_term.c2
-rw-r--r--remote_cmds/tftp.tproj/Makefile14
-rw-r--r--remote_cmds/tftpd.tproj/Makefile19
-rw-r--r--remote_cmds/wall.tproj/Makefile18
-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
173 files changed, 970 insertions, 241 deletions
diff --git a/.gitignore b/.gitignore
index df967b9..54828a3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
base
+*.o
diff --git a/adv_cmds/Makefile b/adv_cmds/Makefile
new file mode 100644
index 0000000..722516e
--- /dev/null
+++ b/adv_cmds/Makefile
@@ -0,0 +1,15 @@
+SUBDIR= gencat \
+ lsvfs \
+ ps \
+ whois \
+ cap_mkdb \
+ last \
+ stty \
+ colldef \
+ locale \
+ mklocale \
+ tabs \
+ finger \
+ tty
+
+.include <bsd.subdir.mk>
diff --git a/adv_cmds/cap_mkdb/Makefile b/adv_cmds/cap_mkdb/Makefile
new file mode 100644
index 0000000..4beb70d
--- /dev/null
+++ b/adv_cmds/cap_mkdb/Makefile
@@ -0,0 +1,3 @@
+PROG= cap_mkdb
+
+.include <bsd.prog.mk>
diff --git a/adv_cmds/colldef/Makefile b/adv_cmds/colldef/Makefile
new file mode 100644
index 0000000..fc11e68
--- /dev/null
+++ b/adv_cmds/colldef/Makefile
@@ -0,0 +1,9 @@
+PROG= colldef
+SRCS= parse.y \
+ scan.l
+
+LDADD+=-lfl
+
+CFLAGS+=-Ilocale
+
+.include <bsd.prog.mk>
diff --git a/adv_cmds/colldef/scan.l b/adv_cmds/colldef/scan.l
index ce14492..ee464f0 100644
--- a/adv_cmds/colldef/scan.l
+++ b/adv_cmds/colldef/scan.l
@@ -40,7 +40,7 @@ __FBSDID("$FreeBSD: src/usr.bin/colldef/scan.l,v 1.19 2002/08/23 04:18:26 ache E
#include <sys/types.h>
#include "collate.h"
#include "common.h"
-#include "y.tab.h"
+#include "parse.h"
int line_no = 1, save_no, fromsubs;
wchar_t buf0[BUFSIZE], *ptr;
diff --git a/adv_cmds/finger/Makefile b/adv_cmds/finger/Makefile
new file mode 100644
index 0000000..86b9d00
--- /dev/null
+++ b/adv_cmds/finger/Makefile
@@ -0,0 +1,8 @@
+PROG= finger
+SRCS= finger.c \
+ lprint.c \
+ net.c \
+ sprint.c \
+ util.c
+
+.include <bsd.prog.mk>
diff --git a/adv_cmds/gencat/Makefile b/adv_cmds/gencat/Makefile
new file mode 100644
index 0000000..c5df80c
--- /dev/null
+++ b/adv_cmds/gencat/Makefile
@@ -0,0 +1,5 @@
+PROG= gencat
+SRCS= gencat.c \
+ genlib.c
+
+.include <bsd.prog.mk>
diff --git a/adv_cmds/last/Makefile b/adv_cmds/last/Makefile
new file mode 100644
index 0000000..96e9737
--- /dev/null
+++ b/adv_cmds/last/Makefile
@@ -0,0 +1,3 @@
+PROG= last
+
+.include <bsd.prog.mk>
diff --git a/adv_cmds/locale/Makefile b/adv_cmds/locale/Makefile
new file mode 100644
index 0000000..535355b
--- /dev/null
+++ b/adv_cmds/locale/Makefile
@@ -0,0 +1,3 @@
+PROG_CXX= locale
+
+.include <bsd.prog.mk>
diff --git a/adv_cmds/lsvfs/Makefile b/adv_cmds/lsvfs/Makefile
new file mode 100644
index 0000000..70c8f64
--- /dev/null
+++ b/adv_cmds/lsvfs/Makefile
@@ -0,0 +1,3 @@
+PROG= lsvfs
+
+.include <bsd.prog.mk>
diff --git a/adv_cmds/mklocale/Makefile b/adv_cmds/mklocale/Makefile
new file mode 100644
index 0000000..132ce00
--- /dev/null
+++ b/adv_cmds/mklocale/Makefile
@@ -0,0 +1,5 @@
+PROG= mklocale
+SRCS= lex.l \
+ yacc.y
+
+.include <bsd.prog.mk>
diff --git a/adv_cmds/mklocale/lex.l b/adv_cmds/mklocale/lex.l
index 9ffbaca..0576f3b 100644
--- a/adv_cmds/mklocale/lex.l
+++ b/adv_cmds/mklocale/lex.l
@@ -49,7 +49,7 @@ __FBSDID("$FreeBSD: src/usr.bin/mklocale/lex.l,v 1.9 2005/02/26 21:47:54 ru Exp
#include <stdlib.h>
#include "ldef.h"
-#include "y.tab.h"
+#include "yacc.h"
#include "extern.h"
%}
diff --git a/adv_cmds/ps/Makefile b/adv_cmds/ps/Makefile
new file mode 100644
index 0000000..606ddb7
--- /dev/null
+++ b/adv_cmds/ps/Makefile
@@ -0,0 +1,9 @@
+PROG= ps
+SRCS= fmt.c \
+ keyword.c \
+ nlist.c \
+ print.c \
+ ps.c \
+ tasks.c
+
+.include <bsd.prog.mk>
diff --git a/adv_cmds/stty/Makefile b/adv_cmds/stty/Makefile
new file mode 100644
index 0000000..ca4cb9f
--- /dev/null
+++ b/adv_cmds/stty/Makefile
@@ -0,0 +1,10 @@
+PROG= stty
+SRCS= cchar.c \
+ gfmt.c \
+ key.c \
+ modes.c \
+ print.c \
+ stty.c \
+ util.c
+
+.include <bsd.prog.mk>
diff --git a/adv_cmds/tabs/Makefile b/adv_cmds/tabs/Makefile
new file mode 100644
index 0000000..2d7391e
--- /dev/null
+++ b/adv_cmds/tabs/Makefile
@@ -0,0 +1,5 @@
+PROG= tabs
+
+LDADD=-lncursesw
+
+.include <bsd.prog.mk>
diff --git a/adv_cmds/tty/Makefile b/adv_cmds/tty/Makefile
new file mode 100644
index 0000000..e0e4713
--- /dev/null
+++ b/adv_cmds/tty/Makefile
@@ -0,0 +1,3 @@
+PROG= tty
+
+.include <bsd.prog.mk>
diff --git a/adv_cmds/whois/Makefile b/adv_cmds/whois/Makefile
new file mode 100644
index 0000000..cd1ebf7
--- /dev/null
+++ b/adv_cmds/whois/Makefile
@@ -0,0 +1,3 @@
+PROG= whois
+
+.include <bsd.prog.mk>
diff --git a/basic_cmds/Makefile b/basic_cmds/Makefile
new file mode 100644
index 0000000..2ab0c2d
--- /dev/null
+++ b/basic_cmds/Makefile
@@ -0,0 +1,6 @@
+SUBDIR= mesg \
+ uudecode \
+ uuencode \
+ write
+
+.include <bsd.subdir.mk>
diff --git a/basic_cmds/mesg/Makefile b/basic_cmds/mesg/Makefile
new file mode 100644
index 0000000..02a02d8
--- /dev/null
+++ b/basic_cmds/mesg/Makefile
@@ -0,0 +1,3 @@
+PROG= mesg
+
+.include <bsd.prog.mk>
diff --git a/basic_cmds/uudecode/Makefile b/basic_cmds/uudecode/Makefile
new file mode 100644
index 0000000..e46ca33
--- /dev/null
+++ b/basic_cmds/uudecode/Makefile
@@ -0,0 +1,5 @@
+PROG= uudecode
+SRCS= uudecode.c \
+ base64.c
+
+.include <bsd.prog.mk>
diff --git a/basic_cmds/uuencode/Makefile b/basic_cmds/uuencode/Makefile
new file mode 100644
index 0000000..142478a
--- /dev/null
+++ b/basic_cmds/uuencode/Makefile
@@ -0,0 +1,6 @@
+PROG= uuencode
+MAN= uuencode.1 uuencode.5
+SRCS= uuencode.c \
+ base64.c
+
+.include <bsd.prog.mk>
diff --git a/basic_cmds/write/Makefile b/basic_cmds/write/Makefile
new file mode 100644
index 0000000..7dceec0
--- /dev/null
+++ b/basic_cmds/write/Makefile
@@ -0,0 +1,3 @@
+PROG= write
+
+.include <bsd.prog.mk>
diff --git a/bootstrap_cmds/Makefile b/bootstrap_cmds/Makefile
new file mode 100644
index 0000000..0b2a259
--- /dev/null
+++ b/bootstrap_cmds/Makefile
@@ -0,0 +1,3 @@
+SUBDIR= migcom.tproj
+
+.include <bsd.subdir.mk>
diff --git a/bootstrap_cmds/migcom.tproj/Makefile b/bootstrap_cmds/migcom.tproj/Makefile
new file mode 100644
index 0000000..6677a74
--- /dev/null
+++ b/bootstrap_cmds/migcom.tproj/Makefile
@@ -0,0 +1,22 @@
+PROG= migcom
+SRCS= error.c \
+ global.c \
+ header.c \
+ mig.c \
+ routine.c \
+ server.c \
+ statement.c \
+ string.c \
+ type.c \
+ user.c \
+ utils.c \
+ lexxer.l \
+ parser.y
+SCRIPTS= mig.sh
+
+CFLAGS+=-DMIG_VERSION=\"mig-116.100.1\"
+
+BINDIR=/usr/libexec/
+SCRIPTSDIR=/usr/bin/
+
+.include <bsd.prog.mk>
diff --git a/bootstrap_cmds/migcom.tproj/lexxer.l b/bootstrap_cmds/migcom.tproj/lexxer.l
index 82b32e5..4a784c0 100644
--- a/bootstrap_cmds/migcom.tproj/lexxer.l
+++ b/bootstrap_cmds/migcom.tproj/lexxer.l
@@ -71,7 +71,7 @@ FileName ({QString}|{AString})
#include <mach/std_types.h>
#include "statement.h"
#include "global.h"
-#include "y.tab.h" // was parser.h
+#include "parser.h"
#include "lexxer.h"
#include "mig_machine.h"
diff --git a/developer_cmds/Makefile b/developer_cmds/Makefile
new file mode 100644
index 0000000..b5f3128
--- /dev/null
+++ b/developer_cmds/Makefile
@@ -0,0 +1,7 @@
+SUBDIR= asa \
+ ctags \
+ lorder \
+ rpcgen \
+ unifdef
+
+.include <bsd.subdir.mk>
diff --git a/developer_cmds/asa/Makefile b/developer_cmds/asa/Makefile
new file mode 100644
index 0000000..9ad92ce
--- /dev/null
+++ b/developer_cmds/asa/Makefile
@@ -0,0 +1,3 @@
+PROG= asa
+
+.include <bsd.prog.mk>
diff --git a/developer_cmds/ctags/Makefile b/developer_cmds/ctags/Makefile
new file mode 100644
index 0000000..eca51cd
--- /dev/null
+++ b/developer_cmds/ctags/Makefile
@@ -0,0 +1,10 @@
+PROG= ctags
+SRCS= C.c \
+ ctags.c \
+ fortran.c \
+ lisp.c \
+ print.c \
+ tree.c \
+ yacc.c
+
+.include <bsd.prog.mk>
diff --git a/developer_cmds/lorder/Makefile b/developer_cmds/lorder/Makefile
new file mode 100644
index 0000000..f07a7fc
--- /dev/null
+++ b/developer_cmds/lorder/Makefile
@@ -0,0 +1,3 @@
+SCRIPTS= lorder.sh
+
+.include <bsd.prog.mk>
diff --git a/developer_cmds/rpcgen/Makefile b/developer_cmds/rpcgen/Makefile
new file mode 100644
index 0000000..84e4400
--- /dev/null
+++ b/developer_cmds/rpcgen/Makefile
@@ -0,0 +1,13 @@
+PROG= rpcgen
+SRCS= rpc_clntout.c \
+ rpc_cout.c \
+ rpc_hout.c \
+ rpc_main.c \
+ rpc_parse.c \
+ rpc_sample.c \
+ rpc_scan.c \
+ rpc_svcout.c \
+ rpc_tblout.c \
+ rpc_util.c
+
+.include <bsd.prog.mk>
diff --git a/developer_cmds/unifdef/Makefile b/developer_cmds/unifdef/Makefile
new file mode 100644
index 0000000..2a5448b
--- /dev/null
+++ b/developer_cmds/unifdef/Makefile
@@ -0,0 +1,4 @@
+PROG= unifdef
+SCRTIPS= unifdefall.sh
+
+.include <bsd.prog.mk>
diff --git a/diskdev_cmds/Makefile b/diskdev_cmds/Makefile
new file mode 100644
index 0000000..0ea0640
--- /dev/null
+++ b/diskdev_cmds/Makefile
@@ -0,0 +1,18 @@
+SUBDIR= dev_mkdb.tproj \
+ edquota.tproj \
+ fdisk.tproj \
+ fsck.tproj \
+ fstyp.tproj \
+ fuser.tproj \
+ mount_devfs.tproj \
+ mount_fdesc.tproj \
+ mount.tproj \
+ quota.tproj \
+ quotacheck.tproj \
+ quotaon.tproj \
+ repquota.tproj \
+ setclass.tproj \
+ vndevice.tproj \
+ vsdbutil.tproj
+
+.include <bsd.subdir.mk>
diff --git a/diskdev_cmds/dev_mkdb.tproj/Makefile b/diskdev_cmds/dev_mkdb.tproj/Makefile
new file mode 100644
index 0000000..2871183
--- /dev/null
+++ b/diskdev_cmds/dev_mkdb.tproj/Makefile
@@ -0,0 +1,4 @@
+PROG= dev_mkdb
+MAN= dev_mkdb.8
+
+.include <bsd.prog.mk>
diff --git a/diskdev_cmds/disklib/preen.c b/diskdev_cmds/disklib/preen.c
index f7128e0..34a10a4 100644
--- a/diskdev_cmds/disklib/preen.c
+++ b/diskdev_cmds/disklib/preen.c
@@ -66,7 +66,6 @@
#include <string.h>
#include <TargetConditionals.h>
-#if TARGET_OS_OSX
struct part {
struct part *next; /* forward link of partitions on disk */
char *name; /* device name */
@@ -387,6 +386,3 @@ rawname(name)
(void)strlcat(rawbuf, &dp[1], sizeof(rawbuf));
return (rawbuf);
}
-
-#endif /* TARGET_OS_OSX */
-
diff --git a/diskdev_cmds/edquota.tproj/Makefile b/diskdev_cmds/edquota.tproj/Makefile
new file mode 100644
index 0000000..c45697f
--- /dev/null
+++ b/diskdev_cmds/edquota.tproj/Makefile
@@ -0,0 +1,4 @@
+PROG= edquota
+MAN= edquota.8
+
+.include <bsd.prog.mk>
diff --git a/diskdev_cmds/edt_fstab/edt_fstab.h b/diskdev_cmds/edt_fstab/edt_fstab.h
index 1fd4926..ef69480 100644
--- a/diskdev_cmds/edt_fstab/edt_fstab.h
+++ b/diskdev_cmds/edt_fstab/edt_fstab.h
@@ -29,8 +29,6 @@
#ifndef edt_fstab_h
#define edt_fstab_h
-#include <TargetConditionals.h>
-
#if (TARGET_OS_IPHONE && !TARGET_OS_SIMULATOR)
#define RAMDISK_FS_SPEC "ramdisk"
diff --git a/diskdev_cmds/fdisk.tproj/Makefile b/diskdev_cmds/fdisk.tproj/Makefile
new file mode 100644
index 0000000..c4b5f79
--- /dev/null
+++ b/diskdev_cmds/fdisk.tproj/Makefile
@@ -0,0 +1,14 @@
+PROG= fdisk
+MAN= fdisk.8
+SRCS= auto.c \
+ cmd.c \
+ disk.c \
+ fdisk.c \
+ getrawpartition.c \
+ mbr.c \
+ misc.c \
+ opendev.c \
+ part.c \
+ user.c
+
+.include <bsd.prog.mk>
diff --git a/diskdev_cmds/fsck.tproj/Makefile b/diskdev_cmds/fsck.tproj/Makefile
new file mode 100644
index 0000000..8ac15de
--- /dev/null
+++ b/diskdev_cmds/fsck.tproj/Makefile
@@ -0,0 +1,6 @@
+PROG= fsck
+MAN= fsck.8
+
+CFLAGS+=-DTARGET_OS_SIMULATOR -DTARGET_OS_IPHONE=0
+
+.include <bsd.prog.mk>
diff --git a/diskdev_cmds/fsck.tproj/fsck.c b/diskdev_cmds/fsck.tproj/fsck.c
index dc44e77..9d2114b 100644
--- a/diskdev_cmds/fsck.tproj/fsck.c
+++ b/diskdev_cmds/fsck.tproj/fsck.c
@@ -72,8 +72,6 @@
#include <sys/time.h>
#include <signal.h>
-#include <TargetConditionals.h>
-
#include "fsck.h"
#include "../edt_fstab/edt_fstab.h"
diff --git a/diskdev_cmds/fstyp.tproj/Makefile b/diskdev_cmds/fstyp.tproj/Makefile
new file mode 100644
index 0000000..66f4830
--- /dev/null
+++ b/diskdev_cmds/fstyp.tproj/Makefile
@@ -0,0 +1,19 @@
+all:
+ (${MAKE} ${.MAKEFLAGS} -f progs.mk PROG=fstyp_msdos MAN=fstyp_msdos.8 all)
+ (${MAKE} ${.MAKEFLAGS} -f progs.mk PROG=fstyp_ntfs MAN=fstyp_ntfs.8 all)
+ (${MAKE} ${.MAKEFLAGS} -f progs.mk PROG=fstyp_udf MAN=fstyp_udf.8 all)
+ (${MAKE} ${.MAKEFLAGS} -f progs.mk PROG=fstyp MAN=fstyp.8 all)
+
+clean:
+ (${MAKE} ${.MAKEFLAGS} -f progs.mk PROG=fstyp_msdos MAN=fstyp_msdos.8 clean)
+ (${MAKE} ${.MAKEFLAGS} -f progs.mk PROG=fstyp_ntfs MAN=fstyp_ntfs.8 clean)
+ (${MAKE} ${.MAKEFLAGS} -f progs.mk PROG=fstyp_udf MAN=fstyp_udf.8 clean)
+ (${MAKE} ${.MAKEFLAGS} -f progs.mk PROG=fstyp MAN=fstyp.8 clean)
+
+install:
+ (${MAKE} ${.MAKEFLAGS} -f progs.mk PROG=fstyp_msdos MAN=fstyp_msdos.8 install)
+ (${MAKE} ${.MAKEFLAGS} -f progs.mk PROG=fstyp_ntfs MAN=fstyp_ntfs.8 install)
+ (${MAKE} ${.MAKEFLAGS} -f progs.mk PROG=fstyp_udf MAN=fstyp_udf.8 install)
+ (${MAKE} ${.MAKEFLAGS} -f progs.mk PROG=fstyp MAN=fstyp.8 install)
+
+.PHONY: all clean install
diff --git a/diskdev_cmds/fstyp.tproj/progs.mk b/diskdev_cmds/fstyp.tproj/progs.mk
new file mode 100644
index 0000000..1fe9f5f
--- /dev/null
+++ b/diskdev_cmds/fstyp.tproj/progs.mk
@@ -0,0 +1 @@
+.include <bsd.prog.mk>
diff --git a/diskdev_cmds/fuser.tproj/Makefile b/diskdev_cmds/fuser.tproj/Makefile
new file mode 100644
index 0000000..a7ea1b6
--- /dev/null
+++ b/diskdev_cmds/fuser.tproj/Makefile
@@ -0,0 +1,3 @@
+SCRIPTS= fuser.pl
+
+.include <bsd.prog.mk>
diff --git a/diskdev_cmds/mount.tproj/Makefile b/diskdev_cmds/mount.tproj/Makefile
new file mode 100644
index 0000000..cc671bf
--- /dev/null
+++ b/diskdev_cmds/mount.tproj/Makefile
@@ -0,0 +1,3 @@
+MAN= fstab.5
+
+.include <bsd.prog.mk>
diff --git a/diskdev_cmds/mount_devfs.tproj/Makefile b/diskdev_cmds/mount_devfs.tproj/Makefile
new file mode 100644
index 0000000..d1d34aa
--- /dev/null
+++ b/diskdev_cmds/mount_devfs.tproj/Makefile
@@ -0,0 +1,6 @@
+PROG= mount_devfs
+MAN=
+
+LDADD=-lutil
+
+.include <bsd.prog.mk>
diff --git a/diskdev_cmds/mount_fdesc.tproj/Makefile b/diskdev_cmds/mount_fdesc.tproj/Makefile
new file mode 100644
index 0000000..ac71999
--- /dev/null
+++ b/diskdev_cmds/mount_fdesc.tproj/Makefile
@@ -0,0 +1,6 @@
+PROG= mount_fdesc
+MAN= mount_fdesc.8
+
+LDADD=-lutil
+
+.include <bsd.prog.mk>
diff --git a/diskdev_cmds/quota.tproj/Makefile b/diskdev_cmds/quota.tproj/Makefile
new file mode 100644
index 0000000..6cf0042
--- /dev/null
+++ b/diskdev_cmds/quota.tproj/Makefile
@@ -0,0 +1,4 @@
+PROG= quota
+MAN= quota.1
+
+.include <bsd.prog.mk>
diff --git a/diskdev_cmds/quotacheck.tproj/Makefile b/diskdev_cmds/quotacheck.tproj/Makefile
new file mode 100644
index 0000000..bb4bc11
--- /dev/null
+++ b/diskdev_cmds/quotacheck.tproj/Makefile
@@ -0,0 +1,9 @@
+PROG= quotacheck
+MAN= quotacheck.8
+SRCS= quotacheck.c \
+ hfs_quotacheck.c \
+ preen.c
+
+.PATH: ../disklib
+
+.include <bsd.prog.mk>
diff --git a/diskdev_cmds/quotaon.tproj/Makefile b/diskdev_cmds/quotaon.tproj/Makefile
new file mode 100644
index 0000000..7ab7ff7
--- /dev/null
+++ b/diskdev_cmds/quotaon.tproj/Makefile
@@ -0,0 +1,4 @@
+PROG= quotaon
+MAN= quotaon.8
+
+.include <bsd.prog.mk>
diff --git a/diskdev_cmds/repquota.tproj/Makefile b/diskdev_cmds/repquota.tproj/Makefile
new file mode 100644
index 0000000..f86e6f8
--- /dev/null
+++ b/diskdev_cmds/repquota.tproj/Makefile
@@ -0,0 +1,4 @@
+PROG= repquota
+MAN= repquota.8
+
+.include <bsd.prog.mk>
diff --git a/diskdev_cmds/setclass.tproj/Makefile b/diskdev_cmds/setclass.tproj/Makefile
new file mode 100644
index 0000000..d8d1d79
--- /dev/null
+++ b/diskdev_cmds/setclass.tproj/Makefile
@@ -0,0 +1,4 @@
+PROG= setclass
+MAN= setclass.8
+
+.include <bsd.prog.mk>
diff --git a/diskdev_cmds/vndevice.tproj/Makefile b/diskdev_cmds/vndevice.tproj/Makefile
new file mode 100644
index 0000000..9f1583d
--- /dev/null
+++ b/diskdev_cmds/vndevice.tproj/Makefile
@@ -0,0 +1,4 @@
+PROG= vndevice
+MAN=
+
+.include <bsd.prog.mk>
diff --git a/diskdev_cmds/vsdbutil.tproj/Makefile b/diskdev_cmds/vsdbutil.tproj/Makefile
new file mode 100644
index 0000000..6e16426
--- /dev/null
+++ b/diskdev_cmds/vsdbutil.tproj/Makefile
@@ -0,0 +1,8 @@
+PROG= vsdbutil
+MAN= vsdbutil.8
+SRCS= vsdbutil_main.c \
+ mount_flags.c
+
+.PATH: ../mount_flags_dir
+
+.include <bsd.prog.mk>
diff --git a/doc_cmds/Makefile b/doc_cmds/Makefile
new file mode 100644
index 0000000..ea362db
--- /dev/null
+++ b/doc_cmds/Makefile
@@ -0,0 +1,5 @@
+SUBDIR= checknr \
+ colcrt \
+ makewhatis
+
+.include <bsd.subdir.mk>
diff --git a/doc_cmds/checknr/Makefile b/doc_cmds/checknr/Makefile
new file mode 100644
index 0000000..b5cf5d3
--- /dev/null
+++ b/doc_cmds/checknr/Makefile
@@ -0,0 +1,3 @@
+PROG= checknr
+
+.include <bsd.prog.mk>
diff --git a/doc_cmds/colcrt/Makefile b/doc_cmds/colcrt/Makefile
new file mode 100644
index 0000000..923684c
--- /dev/null
+++ b/doc_cmds/colcrt/Makefile
@@ -0,0 +1,3 @@
+PROG= colcrt
+
+.include <bsd.prog.mk>
diff --git a/doc_cmds/makewhatis/Makefile b/doc_cmds/makewhatis/Makefile
new file mode 100644
index 0000000..af5e87e
--- /dev/null
+++ b/doc_cmds/makewhatis/Makefile
@@ -0,0 +1,8 @@
+PROG= makewhatis
+MAN= makewhatis.8 makewhatis.local.8
+SCRIPTS= makewhatis.local.sh
+SCRIPTSDIR=/usr/libexec/
+
+LDADD=-lz
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/Makefile b/file_cmds/Makefile
new file mode 100644
index 0000000..d1f3031
--- /dev/null
+++ b/file_cmds/Makefile
@@ -0,0 +1,30 @@
+SUBDIR= chflags \
+ chmod \
+ chown \
+ cksum \
+ compress \
+ cp \
+ dd \
+ df \
+ du \
+ gzip \
+ install \
+ ipcrm \
+ ipcs \
+ ln \
+ ls \
+ mkdir \
+ mkfifo \
+ mknod \
+ mtree \
+ mv \
+ pathchk \
+ pax \
+ rm \
+ rmdir \
+ rmt \
+ shar \
+ stat \
+ touch
+
+.include <bsd.subdir.mk>
diff --git a/file_cmds/chflags/Makefile b/file_cmds/chflags/Makefile
new file mode 100644
index 0000000..287e327
--- /dev/null
+++ b/file_cmds/chflags/Makefile
@@ -0,0 +1,3 @@
+PROG= chflags
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/chmod/Makefile b/file_cmds/chmod/Makefile
new file mode 100644
index 0000000..c134e4a
--- /dev/null
+++ b/file_cmds/chmod/Makefile
@@ -0,0 +1,5 @@
+PROG= chmod
+SRCS= chmod.c \
+ chmod_acl.c
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/chown/Makefile b/file_cmds/chown/Makefile
new file mode 100644
index 0000000..be9d786
--- /dev/null
+++ b/file_cmds/chown/Makefile
@@ -0,0 +1,8 @@
+PROG= chown
+MAN= chown.8 chgrp.1
+
+BINDIR=/usr/sbin
+
+LINKS= ${BINDIR}/chown /usr/bin/chgrp
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/cksum/Makefile b/file_cmds/cksum/Makefile
new file mode 100644
index 0000000..c5c38fa
--- /dev/null
+++ b/file_cmds/cksum/Makefile
@@ -0,0 +1,10 @@
+PROG= cksum
+MAN= cksum.1 sum.1
+SRCS= cksum.c \
+ crc.c \
+ crc32.c \
+ print.c \
+ sum1.c \
+ sum2.c
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/compress/Makefile b/file_cmds/compress/Makefile
new file mode 100644
index 0000000..2f87c36
--- /dev/null
+++ b/file_cmds/compress/Makefile
@@ -0,0 +1,6 @@
+PROG= compress
+MAN= compress.1 uncompress.1 zopen.3
+SRCS= compress.c zopen.c
+SCRIPTS= zcat.sh
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/cp/Makefile b/file_cmds/cp/Makefile
new file mode 100644
index 0000000..e5fb6a8
--- /dev/null
+++ b/file_cmds/cp/Makefile
@@ -0,0 +1,4 @@
+PROG= cp
+SRCS= cp.c utils.c
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/dd/Makefile b/file_cmds/dd/Makefile
new file mode 100644
index 0000000..7e90f72
--- /dev/null
+++ b/file_cmds/dd/Makefile
@@ -0,0 +1,4 @@
+PROG= dd
+SRCS= args.c conv_tab.c conv.c dd.c misc.c position.c
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/df/Makefile b/file_cmds/df/Makefile
new file mode 100644
index 0000000..5d8456d
--- /dev/null
+++ b/file_cmds/df/Makefile
@@ -0,0 +1,6 @@
+PROG= df
+SRCS= df.c vfslist.c
+
+LDADD=-lutil
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/du/Makefile b/file_cmds/du/Makefile
new file mode 100644
index 0000000..ab61aa3
--- /dev/null
+++ b/file_cmds/du/Makefile
@@ -0,0 +1,3 @@
+PROG= du
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/gzip/Makefile b/file_cmds/gzip/Makefile
new file mode 100644
index 0000000..760cb20
--- /dev/null
+++ b/file_cmds/gzip/Makefile
@@ -0,0 +1,15 @@
+PROG= gzip
+SRCS= futimens.c \
+ gzip.c
+MAN= gzexe.1 gzip.1 zdiff.1 zforce.1 zmore.1 znew.1
+SCRIPTS= gzexe \
+ gzip \
+ zdiff \
+ zforce \
+ zmore \
+ znew
+
+CFLAGS+=-DGZIP_APPLE_VERSION=\"321.40.3\"
+LDADD=-llzma -lz -lbz2
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/install/Makefile b/file_cmds/install/Makefile
new file mode 100644
index 0000000..41bdd0d
--- /dev/null
+++ b/file_cmds/install/Makefile
@@ -0,0 +1,4 @@
+PROG= install
+SRCS= xinstall.c
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/ipcrm/Makefile b/file_cmds/ipcrm/Makefile
new file mode 100644
index 0000000..c3dc182
--- /dev/null
+++ b/file_cmds/ipcrm/Makefile
@@ -0,0 +1,3 @@
+PROG= ipcrm
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/ipcs/Makefile b/file_cmds/ipcs/Makefile
new file mode 100644
index 0000000..b26436a
--- /dev/null
+++ b/file_cmds/ipcs/Makefile
@@ -0,0 +1,3 @@
+PROG= ipcs
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/ln/Makefile b/file_cmds/ln/Makefile
new file mode 100644
index 0000000..674541a
--- /dev/null
+++ b/file_cmds/ln/Makefile
@@ -0,0 +1,5 @@
+PROG= ln
+MAN= link.1 ln.1 symlink.7
+LINKS= ${BINDIR}/ln ${BINDIR}/link
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/ls/Makefile b/file_cmds/ls/Makefile
new file mode 100644
index 0000000..8edb47a
--- /dev/null
+++ b/file_cmds/ls/Makefile
@@ -0,0 +1,6 @@
+PROG= ls
+SRCS= cmp.c ls.c print.c util.c
+
+LDADD=-lutil
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/ls/ls.c b/file_cmds/ls/ls.c
index e079333..50fb91c 100644
--- a/file_cmds/ls/ls.c
+++ b/file_cmds/ls/ls.c
@@ -75,7 +75,6 @@ __RCSID("$FreeBSD: src/bin/ls/ls.c,v 1.66 2002/09/21 01:28:36 wollman Exp $");
#include <sys/param.h>
#include <get_compat.h>
#include <sys/sysctl.h>
-#include <System/sys/fsctl.h>
#else
#define COMPAT_MODE(a,b) (1)
#endif /* __APPLE__ */
diff --git a/file_cmds/mkdir/Makefile b/file_cmds/mkdir/Makefile
new file mode 100644
index 0000000..baa4bc3
--- /dev/null
+++ b/file_cmds/mkdir/Makefile
@@ -0,0 +1,3 @@
+PROG= mkdir
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/mkfifo/Makefile b/file_cmds/mkfifo/Makefile
new file mode 100644
index 0000000..aa19b2a
--- /dev/null
+++ b/file_cmds/mkfifo/Makefile
@@ -0,0 +1,3 @@
+PROG= mkfifo
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/mknod/Makefile b/file_cmds/mknod/Makefile
new file mode 100644
index 0000000..0eae59b
--- /dev/null
+++ b/file_cmds/mknod/Makefile
@@ -0,0 +1,4 @@
+PROG= mknod
+MAN= mknod.8
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/mtree/Makefile b/file_cmds/mtree/Makefile
new file mode 100644
index 0000000..aedc899
--- /dev/null
+++ b/file_cmds/mtree/Makefile
@@ -0,0 +1,19 @@
+PROG= mtree
+MAN= mtree.8
+SRCS= commoncrypto.c \
+ compare.c \
+ create.c \
+ excludes.c \
+ metrics.c \
+ misc.c \
+ mtree.c \
+ spec.c \
+ specspec.c \
+ verify.c \
+ crc.c
+
+.PATH: ../cksum
+
+LDADD=-framework CoreFoundation
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/mtree/commoncrypto.c b/file_cmds/mtree/commoncrypto.c
index 11e97ce..36cfcb8 100644
--- a/file_cmds/mtree/commoncrypto.c
+++ b/file_cmds/mtree/commoncrypto.c
@@ -12,7 +12,7 @@
#include <unistd.h>
#include <sys/xattr.h>
#include <sys/mount.h>
-#include <apfs/apfs_fsctl.h>
+//#include <apfs/apfs_fsctl.h>
#include "commoncrypto.h"
#include "extern.h"
@@ -255,6 +255,7 @@ get_xdstream_privateid(char *path, char *buf) {
nextName += strlen(name) + 1;
}
+#ifdef APFSIOC_XDSTREAM_OBJ_ID
for (int i = 0; i < xattrIndex; i++) {
char *name = xattrs[i];
// System volume has stream based xattrs only in form of resource forks
@@ -276,6 +277,7 @@ get_xdstream_privateid(char *path, char *buf) {
}
}
}
+#endif
ai->xdstream_priv_id = xd_obj_id;
// insert a dummy value as digest is not used in presence of mflag
diff --git a/file_cmds/mv/Makefile b/file_cmds/mv/Makefile
new file mode 100644
index 0000000..b7be72c
--- /dev/null
+++ b/file_cmds/mv/Makefile
@@ -0,0 +1,3 @@
+PROG= mv
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/pathchk/Makefile b/file_cmds/pathchk/Makefile
new file mode 100644
index 0000000..a3ea46c
--- /dev/null
+++ b/file_cmds/pathchk/Makefile
@@ -0,0 +1,3 @@
+PROG= pathchk
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/pax/Makefile b/file_cmds/pax/Makefile
new file mode 100644
index 0000000..fe5902c
--- /dev/null
+++ b/file_cmds/pax/Makefile
@@ -0,0 +1,21 @@
+PROG= pax
+MAN= cpio.1 pax.1
+SRCS= ar_io.c \
+ ar_subs.c \
+ buf_subs.c \
+ cache.c \
+ cpio.c \
+ file_subs.c \
+ ftree.c \
+ gen_subs.c \
+ getoldopt.c \
+ options.c \
+ pat_rep.c \
+ pax_format.c \
+ pax.c \
+ sel_subs.c \
+ tables.c \
+ tar.c \
+ tty_subs.c
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/pax/extern.h b/file_cmds/pax/extern.h
index 16d3195..d2823de 100644
--- a/file_cmds/pax/extern.h
+++ b/file_cmds/pax/extern.h
@@ -203,7 +203,7 @@ int opt_add(const char *);
int bad_opt(void);
int pax_format_opt_add(char *);
int pax_opt(void);
-char *chdname;
+extern char *chdname;
/*
* pat_rep.c
diff --git a/file_cmds/pax/options.c b/file_cmds/pax/options.c
index 0544e5e..2d968bd 100644
--- a/file_cmds/pax/options.c
+++ b/file_cmds/pax/options.c
@@ -65,6 +65,8 @@ __used static const char rcsid[] = "$OpenBSD: options.c,v 1.70 2008/06/11 00:49:
#include "tar.h"
#include "extern.h"
+char *chdname;
+
/*
* Routines which handle command line options
*/
diff --git a/file_cmds/rm/Makefile b/file_cmds/rm/Makefile
new file mode 100644
index 0000000..29b0c5b
--- /dev/null
+++ b/file_cmds/rm/Makefile
@@ -0,0 +1,4 @@
+PROG= rm
+MAN= rm.1 unlink.1
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/rmdir/Makefile b/file_cmds/rmdir/Makefile
new file mode 100644
index 0000000..a05d665
--- /dev/null
+++ b/file_cmds/rmdir/Makefile
@@ -0,0 +1,3 @@
+PROG= rmdir
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/rmt/Makefile b/file_cmds/rmt/Makefile
new file mode 100644
index 0000000..1e515ee
--- /dev/null
+++ b/file_cmds/rmt/Makefile
@@ -0,0 +1,4 @@
+PROG= rmt
+MAN= rmt.8
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/shar/Makefile b/file_cmds/shar/Makefile
new file mode 100644
index 0000000..261ee43
--- /dev/null
+++ b/file_cmds/shar/Makefile
@@ -0,0 +1,4 @@
+SCRIPTS= shar.sh
+MAN= shar.1
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/stat/Makefile b/file_cmds/stat/Makefile
new file mode 100644
index 0000000..71d9ee0
--- /dev/null
+++ b/file_cmds/stat/Makefile
@@ -0,0 +1,4 @@
+PROG= stat
+MAN= readlink.1 stat.1
+
+.include <bsd.prog.mk>
diff --git a/file_cmds/touch/Makefile b/file_cmds/touch/Makefile
new file mode 100644
index 0000000..fcb8859
--- /dev/null
+++ b/file_cmds/touch/Makefile
@@ -0,0 +1,3 @@
+PROG= touch
+
+.include <bsd.prog.mk>
diff --git a/mail_cmds/Makefile b/mail_cmds/Makefile
index 127d0a7..d7ac950 100644
--- a/mail_cmds/Makefile
+++ b/mail_cmds/Makefile
@@ -1,5 +1,7 @@
-Project = mail_cmds
+SUBDIR= biff \
+ comsat \
+ from \
+ mail \
+ msgs
-SubProjects = biff comsat from mail msgs
-
-include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+.include <bsd.subdir.mk>
diff --git a/mail_cmds/biff/Makefile b/mail_cmds/biff/Makefile
index 2672505..6ba1615 100644
--- a/mail_cmds/biff/Makefile
+++ b/mail_cmds/biff/Makefile
@@ -1,10 +1,3 @@
-Project = biff
-Install_Dir = /usr/bin
+PROG= biff
-CFILES = biff.c
-MANPAGES = biff.1
-
-Extra_CC_Flags = -Wall -Werror -mdynamic-no-pic
-Extra_LD_Flags = -dead_strip
-
-include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+.include <bsd.prog.mk>
diff --git a/mail_cmds/comsat/Makefile b/mail_cmds/comsat/Makefile
index fd52e66..3f349ab 100644
--- a/mail_cmds/comsat/Makefile
+++ b/mail_cmds/comsat/Makefile
@@ -1,11 +1,4 @@
-Project = comsat
-Install_Dir = /usr/libexec
+PROG= comsat
+MAN= comsat.8
-CFILES = comsat.c
-MANPAGES = comsat.8
-LAUNCHD_PLISTS = comsat.plist
-
-Extra_CC_Flags = -Wall -Werror -mdynamic-no-pic
-Extra_LD_Flags = -dead_strip
-
-include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+.include <bsd.prog.mk>
diff --git a/mail_cmds/from/Makefile b/mail_cmds/from/Makefile
index b0c5bd7..c27be3f 100644
--- a/mail_cmds/from/Makefile
+++ b/mail_cmds/from/Makefile
@@ -1,10 +1,3 @@
-Project = from
-Install_Dir = /usr/bin
+PROG= from
-CFILES = from.c
-MANPAGES = from.1
-
-Extra_CC_Flags = -Wall -Werror -mdynamic-no-pic
-Extra_LD_Flags = -dead_strip
-
-include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+.include <bsd.prog.mk>
diff --git a/mail_cmds/mail/Makefile b/mail_cmds/mail/Makefile
index bd82ec4..5e3872f 100644
--- a/mail_cmds/mail/Makefile
+++ b/mail_cmds/mail/Makefile
@@ -1,24 +1,23 @@
-Project = mail
-Install_Dir = /usr/bin
+# @(#)Makefile 8.2 (Berkeley) 1/25/94
+# $FreeBSD$
-CFILES = aux.c cmd1.c cmd2.c cmd3.c cmdtab.c collect.c \
- edit.c fio.c getname.c head.c lex.c list.c main.c names.c\
- popen.c quit.c send.c strings.c temp.c tty.c v7.local.c\
- vars.c version.c
-MANPAGES = mail.1 mailx.1
+CONFS= misc/mail.rc
+PROG= mail
+SRCS= aux.c cmd1.c cmd2.c cmd3.c cmdtab.c collect.c \
+ edit.c fio.c getname.c head.c lex.c list.c main.c names.c\
+ popen.c quit.c send.c strings.c temp.c tty.c v7.local.c\
+ vars.c version.c
+FILES= mail.help mail.tildehelp
+FILESDIR= ${SHAREDIR}/misc
+EFILES= mail.rc
+LINKS= ${BINDIR}/mail ${BINDIR}/Mail ${BINDIR}/mail ${BINDIR}/mailx
+MAN= mail.1 mailx.1
+MLINKS= mail.1 Mail.1
-Extra_CC_Flags = -Wall -Werror -mdynamic-no-pic
-Extra_LD_Flags = -dead_strip
+.PATH: ${.CURDIR}/misc
-include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+etc-mailrc:
+ cd ${.CURDIR}/misc; ${INSTALL} -o root -g wheel \
+ -m 644 ${EFILES} ${DESTDIR}/private/etc
-ETCDIR=$(DSTROOT)/private/etc
-MISCDIR=$(DSTROOT)/usr/share/misc
-
-after_install:
- $(INSTALL_DIRECTORY) $(MISCDIR)
- $(INSTALL_FILE) -c misc/mail.help misc/mail.tildehelp $(MISCDIR)
- $(INSTALL_DIRECTORY) $(ETCDIR)
- $(INSTALL_FILE) -c -m 644 misc/mail.rc $(ETCDIR)/mail.rc
- $(LN) -f $(DSTROOT)$(Install_Dir)/mail \
- $(DSTROOT)$(Install_Dir)/mailx
+.include <bsd.prog.mk>
diff --git a/mail_cmds/msgs/Makefile b/mail_cmds/msgs/Makefile
index 3319b01..a0d558d 100644
--- a/mail_cmds/msgs/Makefile
+++ b/mail_cmds/msgs/Makefile
@@ -1,11 +1,5 @@
-Project = msgs
-Install_Dir = /usr/bin
+PROG= msgs
-CFILES = msgs.c
-MANPAGES = msgs.1
+LDADD=-lncursesw
-Extra_CC_Flags = -Wall -Werror -mdynamic-no-pic
-Extra_LD_Flags = -dead_strip \
- -lcurses
-
-include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+.include <bsd.prog.mk>
diff --git a/misc_cmds/Makefile b/misc_cmds/Makefile
new file mode 100644
index 0000000..4110807
--- /dev/null
+++ b/misc_cmds/Makefile
@@ -0,0 +1,7 @@
+SUBDIR= calendar \
+ leave \
+ ncal \
+ tsort \
+ units
+
+.include <bsd.subdir.mk>
diff --git a/misc_cmds/calendar/Makefile b/misc_cmds/calendar/Makefile
new file mode 100644
index 0000000..f98beae
--- /dev/null
+++ b/misc_cmds/calendar/Makefile
@@ -0,0 +1,10 @@
+# @(#)Makefile 8.1 (Berkeley) 6/6/93
+# $FreeBSD$
+
+PROG= calendar
+SRCS= calendar.c day.c io.c ostern.c paskha.c
+
+FILES= calendars/calendar.freebsd
+FILESDIR= ${SHAREDIR}/calendar
+
+.include <bsd.prog.mk>
diff --git a/misc_cmds/leave/Makefile b/misc_cmds/leave/Makefile
new file mode 100644
index 0000000..1a08221
--- /dev/null
+++ b/misc_cmds/leave/Makefile
@@ -0,0 +1,3 @@
+PROG= leave
+
+.include <bsd.prog.mk>
diff --git a/misc_cmds/leave/leave.c b/misc_cmds/leave/leave.c
index c1db136..69cd3fb 100644
--- a/misc_cmds/leave/leave.c
+++ b/misc_cmds/leave/leave.c
@@ -45,6 +45,7 @@ static char sccsid[] = "@(#)leave.c 8.1 (Berkeley) 6/6/93";
#include <sys/cdefs.h>
__FBSDID("$FreeBSD: src/usr.bin/leave/leave.c,v 1.12 2002/09/04 23:29:03 dwmalone Exp $");
+#include <sys/types.h>
#include <err.h>
#include <ctype.h>
#include <locale.h>
diff --git a/misc_cmds/ncal/Makefile b/misc_cmds/ncal/Makefile
new file mode 100644
index 0000000..96408c6
--- /dev/null
+++ b/misc_cmds/ncal/Makefile
@@ -0,0 +1,6 @@
+PROG= ncal
+SRCS= calendar.c easter.c ncal.c
+
+LDADD=-lncursesw
+
+.include <bsd.prog.mk>
diff --git a/misc_cmds/ncal/ncal.c b/misc_cmds/ncal/ncal.c
index 5a5cbc3..105fa95 100644
--- a/misc_cmds/ncal/ncal.c
+++ b/misc_cmds/ncal/ncal.c
@@ -27,7 +27,7 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
-#include <calendar.h>
+#include "calendar.h"
#include <ctype.h>
#include <err.h>
#include <langinfo.h>
diff --git a/misc_cmds/tsort/Makefile b/misc_cmds/tsort/Makefile
new file mode 100644
index 0000000..44c9898
--- /dev/null
+++ b/misc_cmds/tsort/Makefile
@@ -0,0 +1,3 @@
+PROG= tsort
+
+.include <bsd.prog.mk>
diff --git a/misc_cmds/units/Makefile b/misc_cmds/units/Makefile
new file mode 100644
index 0000000..e9f84b8
--- /dev/null
+++ b/misc_cmds/units/Makefile
@@ -0,0 +1,5 @@
+PROG= units
+FILES= units.lib
+FILESDIR= ${SHAREDIR}/misc
+
+.include <bsd.prog.mk>
diff --git a/patch_cmds/Makefile b/patch_cmds/Makefile
new file mode 100644
index 0000000..db429c5
--- /dev/null
+++ b/patch_cmds/Makefile
@@ -0,0 +1,4 @@
+SUBDIR= patch \
+ diffstat
+
+.include <bsd.subdir.mk>
diff --git a/patch_cmds/diffstat/Makefile b/patch_cmds/diffstat/Makefile
new file mode 100644
index 0000000..ae9c6ca
--- /dev/null
+++ b/patch_cmds/diffstat/Makefile
@@ -0,0 +1,5 @@
+PROG= diffstat
+
+CFLAGS+=-DHAVE_CONFIG_H
+
+.include <bsd.prog.mk>
diff --git a/patch_cmds/diffstat/diffstat.c b/patch_cmds/diffstat/diffstat.c
index 7027ba3..c09f585 100644
--- a/patch_cmds/diffstat/diffstat.c
+++ b/patch_cmds/diffstat/diffstat.c
@@ -171,7 +171,7 @@ static const char *Id = "$Id: diffstat.c,v 1.55 2012/01/03 09:44:24 tom Exp $";
*/
#if defined(HAVE_CONFIG_H)
-#include <config.h>
+#include "config.h"
#endif
#if defined(WIN32) && !defined(HAVE_CONFIG_H)
diff --git a/patch_cmds/patch/Makefile b/patch_cmds/patch/Makefile
index d7071a4..ec33186 100644
--- a/patch_cmds/patch/Makefile
+++ b/patch_cmds/patch/Makefile
@@ -1,6 +1,4 @@
-# $OpenBSD: Makefile,v 1.4 2005/05/16 15:22:46 espie Exp $
-
PROG= patch
-SRCS= patch.c pch.c inp.c util.c backupfile.c mkpath.c
+SRCS= backupfile.c inp.c mkpath.c patch.c pch.c util.c
.include <bsd.prog.mk>
diff --git a/remote_cmds/Makefile b/remote_cmds/Makefile
index 7347ea8..1ffac6f 100644
--- a/remote_cmds/Makefile
+++ b/remote_cmds/Makefile
@@ -1,12 +1,6 @@
-Project = remote_cmds
+SUBDIR= \
+ logger.tproj\
+ talk.tproj talkd.tproj telnet.tproj telnetd.tproj tftp.tproj\
+ tftpd.tproj wall.tproj
-ifeq "$(RC_TARGET_CONFIG)" "iPhone"
-SubProjects = telnetd.tproj
-else
-SubProjects = \
- logger.tproj\
- talk.tproj talkd.tproj telnet.tproj telnetd.tproj tftp.tproj\
- tftpd.tproj wall.tproj
-endif
-
-include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+.include <bsd.subdir.mk>
diff --git a/remote_cmds/logger.tproj/Makefile b/remote_cmds/logger.tproj/Makefile
index 002cb56..b913354 100644
--- a/remote_cmds/logger.tproj/Makefile
+++ b/remote_cmds/logger.tproj/Makefile
@@ -1,11 +1,3 @@
-Project = logger
-Install_Dir = /usr/bin
+PROG= logger
-CFILES = logger.c
-MANPAGES = logger.1
-
-Extra_CC_Flags = -Wall -Werror -mdynamic-no-pic
-Extra_CC_Flags += -D__FBSDID=__RCSID
-Extra_LD_Flags = -dead_strip
-
-include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+.include <bsd.prog.mk>
diff --git a/remote_cmds/talk.tproj/Makefile b/remote_cmds/talk.tproj/Makefile
index 47e3631..ea9860e 100644
--- a/remote_cmds/talk.tproj/Makefile
+++ b/remote_cmds/talk.tproj/Makefile
@@ -1,14 +1,8 @@
-Project = talk
-Install_Dir = /usr/bin
+PROG= talk
+SRCS= ctl_transact.c ctl.c display.c get_addrs.c \
+ get_iface.c get_names.c init_disp.c invite.c \
+ io.c look_up.c msgs.c talk.c
-HFILES = talk.h talk_ctl.h
-CFILES = ctl.c ctl_transact.c display.c get_addrs.c get_names.c\
- get_iface.c init_disp.c invite.c io.c look_up.c msgs.c talk.c
-MANPAGES = talk.1
+LDADD=-lncursesw
-Extra_CC_Flags = -Wall -Werror -fPIE
-Extra_LD_Flags = -dead_strip -pie
-
-Extra_LD_Libraries = -lcurses
-
-include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+.include <bsd.prog.mk>
diff --git a/remote_cmds/talkd.tproj/Makefile b/remote_cmds/talkd.tproj/Makefile
index f67b40b..dd14031 100644
--- a/remote_cmds/talkd.tproj/Makefile
+++ b/remote_cmds/talkd.tproj/Makefile
@@ -1,14 +1,8 @@
-Project = ntalkd
-Install_Dir = /usr/libexec
+PROG= talkd
+MAN= ntalkd.8
+SRCS= announce.c print.c process.c \
+ table.c talkd.c ttymsg.c
-HFILES = talkd.h
-CFILES = announce.c print.c process.c table.c talkd.c ../wall.tproj/ttymsg.c
-MANPAGES = ntalkd.8
-LAUNCHD_PLISTS = ntalk.plist
+.PATH: ../wall.tproj
-Extra_CC_Flags = -Wall -Werror -fPIE
-Extra_LD_Flags = -dead_strip -pie
-
-Extra_CC_Flags += -D__FBSDID=__RCSID
-
-include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+.include <bsd.prog.mk>
diff --git a/remote_cmds/telnet.tproj/Makefile b/remote_cmds/telnet.tproj/Makefile
index dc8569b..281feaf 100644
--- a/remote_cmds/telnet.tproj/Makefile
+++ b/remote_cmds/telnet.tproj/Makefile
@@ -1,18 +1,14 @@
-Project = telnet
-Install_Dir = /usr/local/bin
+PROG= telnet
+SRCS= authenc.c commands.c main.c network.c \
+ ring.c sys_bsd.c telnet.c terminal.c tn3270.c \
+ utilities.c genget.c auth.c misc.c
-HFILES = externs.h fdset.h general.h krb4-proto.h ring.h types.h\
- defines.h misc.h misc-proto.h
-CFILES = authenc.c commands.c main.c network.c ring.c sys_bsd.c\
- telnet.c terminal.c tn3270.c utilities.c
+CFLAGS+=-DTERMCAP -DKLUDGELINEMODE -DUSE_TERMIO -DENV_HACK \
+ -DAUTHENTICATION -DSKEY -DIPSEC -DINET6 -DFORWARD \
+ -I${.CURDIR}/../../lib
+ # -DENCRYPTION -DKRB4
+LDADD=-lncursesw -lipsec
-Extra_CC_Flags = -Wall -Werror -Wno-string-plus-int -fPIE
-Extra_CC_Flags += -D__FBSDID=__RCSID
-Extra_LD_Flags = -dead_strip -pie
+.PATH: ../../lib/libtelnet
-Extra_CC_Flags += -DTERMCAP -DKLUDGELINEMODE -DUSE_TERMIO -DENV_HACK \
- -DAUTHENTICATION -DKRB5 -DSKEY -DIPSEC -DINET6 -DFORWARD
- # -DENCRYPTION -DKRB4
-Extra_LD_Libraries = -lcurses -lkrb4 -lkrb5 -lipsec -ltelnet
-
-include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+.include <bsd.prog.mk>
diff --git a/remote_cmds/telnet.tproj/telnet.c b/remote_cmds/telnet.tproj/telnet.c
index 541cf9b..2e63f8d 100644
--- a/remote_cmds/telnet.tproj/telnet.c
+++ b/remote_cmds/telnet.tproj/telnet.c
@@ -667,7 +667,7 @@ is_unique(char *name, char **as, char **ae)
return (1);
}
-#ifdef TERMCAP
+#ifndef TERMCAP
char termbuf[1024];
/*ARGSUSED*/
diff --git a/remote_cmds/telnetd.tproj/Makefile b/remote_cmds/telnetd.tproj/Makefile
index c3f7feb..356d977 100644
--- a/remote_cmds/telnetd.tproj/Makefile
+++ b/remote_cmds/telnetd.tproj/Makefile
@@ -1,50 +1,16 @@
-Project = telnetd
-ifeq "$(RC_TARGET_CONFIG)" "iPhone"
-Install_Dir = /usr/libexec
-else
-Install_Dir = /usr/local/libexec
-endif
+PROG= telnetd
+MAN= telnetd.8
-HFILES = defs.h ext.h pathnames.h telnetd.h
-CFILES = global.c slc.c state.c sys_term.c telnetd.c\
- termstat.c utility.c
-ifeq "$(RC_TARGET_CONFIG)" "iPhone"
-LAUNCHD_PLISTS = telnet.plist
-endif
+SRCS= global.c slc.c state.c sys_term.c telnetd.c \
+ termstat.c utility.c getent.c
-Extra_CC_Flags = -Wall -Werror -Wno-string-plus-int -fPIE
-Extra_CC_Flags += -D__FBSDID=__RCSID
-Extra_LD_Flags = -dead_strip -pie
+BINDIR=/usr/libexec
-Extra_CC_Flags += -DNO_UTMP -DLINEMODE -DKLUDGELINEMODE -DUSE_TERMIO \
- -DDIAGNOSTICS -DOLD_ENVIRON -DENV_HACK -DINET6 \
- # -DAUTHENTICATION -DENCRYPTION
-Extra_LD_Libraries = -lcurses -ltelnet
+CFLAGS+= -DNO_UTMP -DLINEMODE -DKLUDGELINEMODE -DUSE_TERMIO \
+ -DDIAGNOSTICS -DOLD_ENVIRON -DENV_HACK -DINET6 \
+ -I${.CURDIR}/../../lib
+LDADD=-lncursesw
-include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+.PATH: ../../lib/libtelnet
-after_install:
-ifeq "$(RC_TARGET_CONFIG)" "iPhone"
- /usr/libexec/PlistBuddy -x \
- -c "Delete :Disabled" \
- -c "Add :PosixSpawnType string Interactive" \
- -c "Delete :SessionCreate" \
- -c "Set :Sockets:Listeners:Bonjour false" \
- -c "Add :Sockets:Listeners:SockFamily string IPv4" \
- -c "Add :Sockets:Listeners:SockNodeName string localhost" \
- "$(DSTROOT)/System/Library/LaunchDaemons/telnet.plist"
-ifeq "$(RC_PLATFORM_NAME)" "BridgeOS"
- /usr/libexec/PlistBuddy -x \
- -c "Delete :Sockets:Listeners:SockNodeName" \
- -c "Delete :Sockets:Listeners:SockFamily" \
- "$(DSTROOT)/System/Library/LaunchDaemons/telnet.plist"
-endif
- plutil -convert binary1 "$(DSTROOT)/System/Library/LaunchDaemons/$(LAUNCHD_PLISTS)"
-endif
- /usr/bin/codesign --force --sign - --entitlements entitlements.plist $(DSTROOT)$(Install_Dir)/$(Project)
-
-# Install a special launchd plist for the DebugDiskImage (38885624)
-ifeq "$(RC_TARGET_CONFIG)" "iPhone"
- plutil -replace ProgramArguments -json '["/var/personalized_debug/usr/libexec/telnetd","-p","/var/personalized_debug/usr/bin/login"]' -o "$(DSTROOT)/System/Library/LaunchDaemons/telnet.debug.plist" "$(DSTROOT)/System/Library/LaunchDaemons/telnet.plist"
- plutil -replace Label -string com.apple.telnetd.debug "$(DSTROOT)/System/Library/LaunchDaemons/telnet.debug.plist"
-endif
+.include <bsd.prog.mk>
diff --git a/remote_cmds/telnetd.tproj/sys_term.c b/remote_cmds/telnetd.tproj/sys_term.c
index 23da55b..d47d541 100644
--- a/remote_cmds/telnetd.tproj/sys_term.c
+++ b/remote_cmds/telnetd.tproj/sys_term.c
@@ -423,7 +423,7 @@ spcset(int func, cc_t *valp, cc_t **valpp)
* Returns the file descriptor of the opened pty.
*/
char alpha[] = "0123456789abcdefghijklmnopqrstuv";
-char line[16];
+//char line[16];
int
getpty(int *ptynum __unused, int *slavepty)
diff --git a/remote_cmds/tftp.tproj/Makefile b/remote_cmds/tftp.tproj/Makefile
index 6ed62a0..b6ea090 100644
--- a/remote_cmds/tftp.tproj/Makefile
+++ b/remote_cmds/tftp.tproj/Makefile
@@ -1,12 +1,6 @@
-Project = tftp
+PROG= tftp
+SRCS= main.c tftp.c tftpsubs.c
-HFILES = extern.h tftpsubs.h
-CFILES = main.c tftp.c tftpsubs.c
-MANPAGES = tftp.1
+LDADD=-ledit
-Extra_CC_Flags = -Wall -Werror -fPIE
-Extra_CC_Flags += -D__FBSDID=__RCSID
-Extra_LD_Flags = -dead_strip -pie
-Extra_LD_Flags += -ledit
-
-include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
+.include <bsd.prog.mk>
diff --git a/remote_cmds/tftpd.tproj/Makefile b/remote_cmds/tftpd.tproj/Makefile
index e48f484..60b2853 100644
--- a/remote_cmds/tftpd.tproj/Makefile
+++ b/remote_cmds/tftpd.tproj/Makefile
@@ -1,16 +1,9 @@
-Project = tftpd
-Install_Dir = /usr/libexec
+PROG= tftpd
+SRCS= tftpd.c tftpsubs.c
+MAN= tftpd.8
-HFILES = tftpsubs.h
-CFILES = tftpd.c ../tftp.tproj/tftpsubs.c
-MANPAGES = tftpd.8
-LAUNCHD_PLISTS = tftp.plist
+BINDIR=/usr/libexec
-Extra_CC_Flags = -Wall -Werror -fPIE
-Extra_CC_Flags += -D__FBSDID=__RCSID
-Extra_LD_Flags = -dead_strip -pie
+.PATH: ../tftp.tproj
-include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
-
-after_install:
- $(MKDIR) "$(DSTROOT)/private/tftpboot"
+.include <bsd.prog.mk>
diff --git a/remote_cmds/wall.tproj/Makefile b/remote_cmds/wall.tproj/Makefile
index 08da621..06e0547 100644
--- a/remote_cmds/wall.tproj/Makefile
+++ b/remote_cmds/wall.tproj/Makefile
@@ -1,16 +1,4 @@
-Project = wall
-Install_Dir = /usr/bin
+PROG= wall
+SRCS= ttymsg.c wall.c
-HFILES = ttymsg.h
-CFILES = ttymsg.c wall.c
-MANPAGES = wall.1
-
-Extra_CC_Flags = -Wall -Werror -mdynamic-no-pic
-Extra_LD_Flags = -dead_strip
-
-Extra_CC_Flags += -D__FBSDID=__RCSID
-
-include $(MAKEFILEPATH)/CoreOS/ReleaseControl/BSDCommon.make
-
-#Install_Program_Mode = 02555
-#Install_Program_Group = tty
+.include <bsd.prog.mk>
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>