Merge from head

This commit is contained in:
bapt 2015-06-15 10:56:01 +00:00
commit 35a6f0a11c
2719 changed files with 74707 additions and 8031 deletions

View File

@ -99,6 +99,11 @@
#
# For more information, see the build(7) manual page.
#
.if ${MK_META_MODE:Uno} == "yes"
# targets/Makefile plays the role of top-level
.include "targets/Makefile"
.else
TGTS= all all-man buildenv buildenvvars buildkernel buildworld \
check-old check-old-dirs check-old-files check-old-libs \
checkdpadd clean cleandepend cleandir \
@ -517,10 +522,22 @@ universe_epilogue:
buildLINT:
${MAKE} -C ${.CURDIR}/sys/${_TARGET}/conf LINT
.if defined(.PARSEDIR)
# This makefile does not run in meta mode
.MAKE.MODE= normal
# Normally the things we run from here don't either.
# Using -DWITH_META_FILES
# we can buildworld with meta files created which are useful
# for debugging, but without any of the rest of a meta mode build.
MK_META_MODE= no
MK_STAGING= no
# tell meta.autodep.mk to not even think about updating anything.
UPDATE_DEPENDFILE= NO
.export MK_META_MODE MK_STAGING UPDATE_DEPENDFILE
.if make(universe)
# we do not want a failure of one branch abort all.
MAKE_JOB_ERROR_TOKEN= no
.export MAKE_JOB_ERROR_TOKEN
.endif
.endif
.endif # META_MODE

View File

@ -1400,8 +1400,8 @@ _sed= usr.bin/sed
.endif
.if ${BOOTSTRAPPING} < 1000002
_m4= lib/libohash \
usr.bin/m4
_libohash= lib/libohash
_m4= usr.bin/m4
${_bt}-usr.bin/m4: ${_bt}-lib/libohash
.endif
@ -1487,6 +1487,15 @@ _kerberos5_bootstrap_tools= \
.ORDER: ${_kerberos5_bootstrap_tools:C/^/${_bt}-/g}
.endif
.if ${MK_MANDOCDB} != "no"
_libohash?= lib/libohash
_makewhatis= lib/libsqlite3 \
usr.bin/mandoc
${_bt}-usr.bin/mandoc: ${_bt}-lib/libohash ${_bt}-lib/libsqlite3
.else
_makewhatis=usr.bin/makewhatis
.endif
# Rebuild up-to-date libmd for xinstall
${_bt}-usr.bin/xinstall: ${_bt}-lib/libmd
@ -1507,7 +1516,8 @@ bootstrap-tools: .PHONY
${_awk} \
${_cat} \
usr.bin/lorder \
usr.bin/makewhatis \
${_libohash} \
${_makewhatis} \
usr.bin/rpcgen \
${_sed} \
${_yacc} \
@ -1930,9 +1940,10 @@ kerberos5/lib/libroken__L: lib/libcrypt__L
kerberos5/lib/libwind__L: kerberos5/lib/libroken__L lib/libcom_err__L
kerberos5/lib/libheimbase__L: lib/libthr__L
kerberos5/lib/libheimipcc__L: kerberos5/lib/libroken__L kerberos5/lib/libheimbase__L lib/libthr__L
lib/libsqlite3__L: lib/libthr__L
.endif
lib/libsqlite3__L: lib/libthr__L
.if ${MK_GSSAPI} != "no"
_lib_libgssapi= lib/libgssapi
.endif

View File

@ -38,6 +38,10 @@
# xargs -n1 | sort | uniq -d;
# done
# 20150528: PCI IOV device driver methods moved to a separate kobj interface.
OLD_FILES+=usr/share/man/man9/PCI_ADD_VF.9
OLD_FILES+=usr/share/man/man9/PCI_INIT_IOV.9
OLD_FILES+=usr/share/man/man9/PCI_UNINIT_IOV.9
# 20150525: new clang import which bumps version from 3.6.0 to 3.6.1.
OLD_FILES+=usr/lib/clang/3.6.0/include/__stddef_max_align_t.h
OLD_FILES+=usr/lib/clang/3.6.0/include/__wmmintrin_aes.h

View File

@ -31,6 +31,45 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11.x IS SLOW:
disable the most expensive debugging functionality run
"ln -s 'abort:false,junk:false' /etc/malloc.conf".)
20150614:
ALLOW_DEPRECATED_ATF_TOOLS/ATFFILE support has been removed from
atf.test.mk (included from bsd.test.mk). Please upgrade devel/atf
and devel/kyua to version 0.20+ and adjust any calling code to work
with Kyuafile and kyua.
20150614:
The import of openssl to address the FreeBSD-SA-15:10.openssl
security advisory includes a change which rejects handshakes
with DH parameters below 768 bits. sendmail releases prior
to 8.15.2 (not yet released), defaulted to a 512 bit
DH parameter setting for client connections. To work around
this interoperability, sendmail can be configured to use a
2048 bit DH parameter by:
1. Edit /etc/mail/`hostname`.mc
2. If a setting for confDH_PARAMETERS does not exist or
exists and is set to a string beginning with '5',
replace it with '2'.
3. If a setting for confDH_PARAMETERS exists and is set to
a file path, create a new file with:
openssl dhparam -out /path/to/file 2048
4. Rebuild the .cf file:
cd /etc/mail/; make; make install
5. Restart sendmail:
cd /etc/mail/; make restart
A sendmail patch is coming, at which time this file will be
updated.
20150604:
Generation of legacy formatted entries have been disabled by default
in pwd_mkdb(8), as all base system consumers of the legacy formatted
entries were converted to use the new format by default when the new,
machine independent format have been added and supported since FreeBSD
5.x.
Please see the pwd_mkdb(8) manual page for further details.
20150525:
Clang and llvm have been upgraded to 3.6.1 release. Please see the
20141231 entry below for information about prerequisites and upgrading,

18
bin/cat/Makefile.depend Normal file
View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

18
bin/chio/Makefile.depend Normal file
View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

18
bin/chmod/Makefile.depend Normal file
View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -162,14 +162,16 @@ done: argv += optind;
atflag = AT_SYMLINK_NOFOLLOW;
switch (p->fts_info) {
case FTS_D: /* Change it at FTS_DP. */
case FTS_D:
if (!Rflag)
fts_set(ftsp, p, FTS_SKIP);
continue;
break;
case FTS_DNR: /* Warn, chmod. */
warnx("%s: %s", p->fts_path, strerror(p->fts_errno));
rval = 1;
break;
case FTS_DP: /* Already changed at FTS_D. */
continue;
case FTS_ERR: /* Warn, continue. */
case FTS_NS:
warnx("%s: %s", p->fts_path, strerror(p->fts_errno));

18
bin/cp/Makefile.depend Normal file
View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -32,7 +32,7 @@
.\" @(#)cp.1 8.3 (Berkeley) 4/18/94
.\" $FreeBSD$
.\"
.Dd March 15, 2013
.Dd June 6, 2015
.Dt CP 1
.Os
.Sh NAME
@ -45,7 +45,7 @@
.Op Fl H | Fl L | Fl P
.Oc
.Op Fl f | i | n
.Op Fl alpvx
.Op Fl alpsvx
.Ar source_file target_file
.Nm
.Oo
@ -53,7 +53,7 @@
.Op Fl H | Fl L | Fl P
.Oc
.Op Fl f | i | n
.Op Fl alpvx
.Op Fl alpsvx
.Ar source_file ... target_directory
.Sh DESCRIPTION
In the first synopsis form, the
@ -179,6 +179,8 @@ If the source file has both its set-user-ID and set-group-ID bits on,
and either the user ID or group ID cannot be preserved, neither
the set-user-ID nor set-group-ID bits are preserved in the copy's
permissions.
.It Fl s
Create symbolic links to regular files in a hierarchy instead of copying.
.It Fl v
Cause
.Nm
@ -298,7 +300,10 @@ differ as they copy special files as normal
files while recreating a hierarchy.
.Pp
The
.Fl v
.Fl l,
.Fl s,
.Fl v,
.Fl x
and
.Fl n
options are non-standard and their use in scripts is not recommended.

View File

@ -75,15 +75,15 @@ __FBSDID("$FreeBSD$");
#include "extern.h"
#define STRIP_TRAILING_SLASH(p) { \
while ((p).p_end > (p).p_path + 1 && (p).p_end[-1] == '/') \
*--(p).p_end = 0; \
while ((p).p_end > (p).p_path + 1 && (p).p_end[-1] == '/') \
*--(p).p_end = 0; \
}
static char emptystring[] = "";
PATH_T to = { to.p_path, emptystring, "" };
int fflag, iflag, lflag, nflag, pflag, vflag;
int fflag, iflag, lflag, nflag, pflag, sflag, vflag;
static int Rflag, rflag;
volatile sig_atomic_t info;
@ -102,7 +102,7 @@ main(int argc, char *argv[])
fts_options = FTS_NOCHDIR | FTS_PHYSICAL;
Hflag = Lflag = 0;
while ((ch = getopt(argc, argv, "HLPRafilnprvx")) != -1)
while ((ch = getopt(argc, argv, "HLPRafilnprsvx")) != -1)
switch (ch) {
case 'H':
Hflag = 1;
@ -145,6 +145,9 @@ main(int argc, char *argv[])
rflag = Lflag = 1;
Hflag = 0;
break;
case 's':
sflag = 1;
break;
case 'v':
vflag = 1;
break;
@ -163,6 +166,8 @@ main(int argc, char *argv[])
if (Rflag && rflag)
errx(1, "the -R and -r options may not be specified together");
if (lflag && sflag)
errx(1, "the -l and -s options may not be specified together");
if (rflag)
Rflag = 1;
if (Rflag) {
@ -183,7 +188,7 @@ main(int argc, char *argv[])
if (strlcpy(to.p_path, target, sizeof(to.p_path)) >= sizeof(to.p_path))
errx(1, "%s: name too long", target);
to.p_end = to.p_path + strlen(to.p_path);
if (to.p_path == to.p_end) {
if (to.p_path == to.p_end) {
*to.p_end++ = '.';
*to.p_end = 0;
}
@ -240,10 +245,10 @@ main(int argc, char *argv[])
type = FILE_TO_FILE;
if (have_trailing_slash && type == FILE_TO_FILE) {
if (r == -1)
if (r == -1) {
errx(1, "directory %s does not exist",
to.p_path);
else
to.p_path);
} else
errx(1, "%s is not a directory", to.p_path);
}
} else
@ -294,8 +299,8 @@ copy(char *argv[], enum op type, int fts_options)
/*
* If we are in case (2) or (3) above, we need to append the
* source name to the target name.
*/
* source name to the target name.
*/
if (type != FILE_TO_FILE) {
/*
* Need to remember the roots of traversals to create
@ -374,7 +379,8 @@ copy(char *argv[], enum op type, int fts_options)
mode = curr->fts_statp->st_mode;
if ((mode & (S_ISUID | S_ISGID | S_ISTXT)) ||
((mode | S_IRWXU) & mask) != (mode & mask))
if (chmod(to.p_path, mode & mask) != 0){
if (chmod(to.p_path, mode & mask) !=
0) {
warn("chmod: %s", to.p_path);
rval = 1;
}
@ -382,7 +388,7 @@ copy(char *argv[], enum op type, int fts_options)
continue;
}
/* Not an error but need to remember it happened */
/* Not an error but need to remember it happened. */
if (stat(to.p_path, &to_stat) == -1)
dne = 1;
else {
@ -408,7 +414,7 @@ copy(char *argv[], enum op type, int fts_options)
switch (curr->fts_statp->st_mode & S_IFMT) {
case S_IFLNK:
/* Catch special case of a non-dangling symlink */
/* Catch special case of a non-dangling symlink. */
if ((fts_options & FTS_LOGICAL) ||
((fts_options & FTS_COMFOLLOW) &&
curr->fts_level == 0)) {
@ -433,7 +439,7 @@ copy(char *argv[], enum op type, int fts_options)
* modified by the umask. Trade-off between being
* able to write the directory (if from directory is
* 555) and not causing a permissions race. If the
* umask blocks owner writes, we fail..
* umask blocks owner writes, we fail.
*/
if (dne) {
if (mkdir(to.p_path,
@ -452,7 +458,7 @@ copy(char *argv[], enum op type, int fts_options)
break;
case S_IFBLK:
case S_IFCHR:
if (Rflag) {
if (Rflag && !sflag) {
if (copy_special(curr->fts_statp, !dne))
badcp = rval = 1;
} else {
@ -462,10 +468,10 @@ copy(char *argv[], enum op type, int fts_options)
break;
case S_IFSOCK:
warnx("%s is a socket (not copied).",
curr->fts_path);
curr->fts_path);
break;
case S_IFIFO:
if (Rflag) {
if (Rflag && !sflag) {
if (copy_fifo(curr->fts_statp, !dne))
badcp = rval = 1;
} else {

View File

@ -37,7 +37,7 @@ typedef struct {
} PATH_T;
extern PATH_T to;
extern int fflag, iflag, lflag, nflag, pflag, vflag;
extern int fflag, iflag, lflag, nflag, pflag, sflag, vflag;
extern volatile sig_atomic_t info;
__BEGIN_DECLS

View File

@ -57,15 +57,19 @@ __FBSDID("$FreeBSD$");
#define cp_pct(x, y) ((y == 0) ? 0 : (int)(100.0 * (x) / (y)))
/* Memory strategy threshold, in pages: if physmem is larger then this, use a
* large buffer */
/*
* Memory strategy threshold, in pages: if physmem is larger then this, use a
* large buffer.
*/
#define PHYSPAGES_THRESHOLD (32*1024)
/* Maximum buffer size in bytes - do not allow it to grow larger than this */
/* Maximum buffer size in bytes - do not allow it to grow larger than this. */
#define BUFSIZE_MAX (2*1024*1024)
/* Small (default) buffer size in bytes. It's inefficient for this to be
* smaller than MAXPHYS */
/*
* Small (default) buffer size in bytes. It's inefficient for this to be
* smaller than MAXPHYS.
*/
#define BUFSIZE_SMALL (MAXPHYS)
int
@ -77,13 +81,15 @@ copy_file(const FTSENT *entp, int dne)
ssize_t wcount;
size_t wresid;
off_t wtotal;
int ch, checkch, from_fd = 0, rcount, rval, to_fd = 0;
int ch, checkch, from_fd, rcount, rval, to_fd;
char *bufp;
#ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED
char *p;
#endif
if ((from_fd = open(entp->fts_path, O_RDONLY, 0)) == -1) {
from_fd = to_fd = -1;
if (!lflag && !sflag &&
(from_fd = open(entp->fts_path, O_RDONLY, 0)) == -1) {
warn("%s", entp->fts_path);
return (1);
}
@ -103,63 +109,65 @@ copy_file(const FTSENT *entp, int dne)
if (nflag) {
if (vflag)
printf("%s not overwritten\n", to.p_path);
(void)close(from_fd);
return (1);
rval = 1;
goto done;
} else if (iflag) {
(void)fprintf(stderr, "overwrite %s? %s",
to.p_path, YESNO);
to.p_path, YESNO);
checkch = ch = getchar();
while (ch != '\n' && ch != EOF)
ch = getchar();
if (checkch != 'y' && checkch != 'Y') {
(void)close(from_fd);
(void)fprintf(stderr, "not overwritten\n");
return (1);
rval = 1;
goto done;
}
}
if (fflag) {
/* remove existing destination file name,
* create a new file */
(void)unlink(to.p_path);
if (!lflag)
to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT,
fs->st_mode & ~(S_ISUID | S_ISGID));
} else {
if (!lflag)
/* overwrite existing destination file name */
to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0);
/*
* Remove existing destination file name create a new
* file.
*/
(void)unlink(to.p_path);
if (!lflag && !sflag) {
to_fd = open(to.p_path,
O_WRONLY | O_TRUNC | O_CREAT,
fs->st_mode & ~(S_ISUID | S_ISGID));
}
} else if (!lflag && !sflag) {
/* Overwrite existing destination file name. */
to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0);
}
} else {
if (!lflag)
to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT,
fs->st_mode & ~(S_ISUID | S_ISGID));
} else if (!lflag && !sflag) {
to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT,
fs->st_mode & ~(S_ISUID | S_ISGID));
}
if (to_fd == -1) {
if (!lflag && !sflag && to_fd == -1) {
warn("%s", to.p_path);
(void)close(from_fd);
return (1);
rval = 1;
goto done;
}
rval = 0;
if (!lflag) {
if (!lflag && !sflag) {
/*
* Mmap and write if less than 8M (the limit is so we don't totally
* trash memory on big files. This is really a minor hack, but it
* wins some CPU back.
* Mmap and write if less than 8M (the limit is so we don't
* totally trash memory on big files. This is really a minor
* hack, but it wins some CPU back.
* Some filesystems, such as smbnetfs, don't support mmap,
* so this is a best-effort attempt.
*/
#ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED
if (S_ISREG(fs->st_mode) && fs->st_size > 0 &&
fs->st_size <= 8 * 1024 * 1024 &&
fs->st_size <= 8 * 1024 * 1024 &&
(p = mmap(NULL, (size_t)fs->st_size, PROT_READ,
MAP_SHARED, from_fd, (off_t)0)) != MAP_FAILED) {
wtotal = 0;
for (bufp = p, wresid = fs->st_size; ;
bufp += wcount, wresid -= (size_t)wcount) {
bufp += wcount, wresid -= (size_t)wcount) {
wcount = write(to_fd, bufp, wresid);
if (wcount <= 0)
break;
@ -204,7 +212,7 @@ copy_file(const FTSENT *entp, int dne)
wtotal = 0;
while ((rcount = read(from_fd, buf, bufsize)) > 0) {
for (bufp = buf, wresid = rcount; ;
bufp += wcount, wresid -= wcount) {
bufp += wcount, wresid -= wcount) {
wcount = write(to_fd, bufp, wresid);
if (wcount <= 0)
break;
@ -230,13 +238,18 @@ copy_file(const FTSENT *entp, int dne)
rval = 1;
}
}
} else {
} else if (lflag) {
if (link(entp->fts_path, to.p_path)) {
warn("%s", to.p_path);
rval = 1;
}
} else if (sflag) {
if (symlink(entp->fts_path, to.p_path)) {
warn("%s", to.p_path);
rval = 1;
}
}
/*
* Don't remove the target even after an error. The target might
* not be a regular file, or its attributes might be important,
@ -244,7 +257,7 @@ copy_file(const FTSENT *entp, int dne)
* to remove it if we created it and its length is 0.
*/
if (!lflag) {
if (!lflag && !sflag) {
if (pflag && setfile(fs, to_fd))
rval = 1;
if (pflag && preserve_fd_acls(from_fd, to_fd) != 0)
@ -255,8 +268,9 @@ copy_file(const FTSENT *entp, int dne)
}
}
(void)close(from_fd);
done:
if (from_fd != -1)
(void)close(from_fd);
return (rval);
}
@ -338,7 +352,7 @@ setfile(struct stat *fs, int fd)
fdval = fd != -1;
islink = !fdval && S_ISLNK(fs->st_mode);
fs->st_mode &= S_ISUID | S_ISGID | S_ISVTX |
S_IRWXU | S_IRWXG | S_IRWXO;
S_IRWXU | S_IRWXG | S_IRWXO;
tspec[0] = fs->st_atim;
tspec[1] = fs->st_mtim;
@ -353,7 +367,7 @@ setfile(struct stat *fs, int fd)
else {
gotstat = 1;
ts.st_mode &= S_ISUID | S_ISGID | S_ISVTX |
S_IRWXU | S_IRWXG | S_IRWXO;
S_IRWXU | S_IRWXG | S_IRWXO;
}
/*
* Changing the ownership probably won't succeed, unless we're root
@ -477,7 +491,7 @@ preserve_dir_acls(struct stat *fs, char *source_dir, char *dest_dir)
return (0);
/*
* If the file is a link we will not follow it
* If the file is a link we will not follow it.
*/
if (S_ISLNK(fs->st_mode)) {
aclgetf = acl_get_link_np;
@ -536,8 +550,10 @@ usage(void)
{
(void)fprintf(stderr, "%s\n%s\n",
"usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file target_file",
" cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpvx] source_file ... "
"target_directory");
"usage: cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] "
"source_file target_file",
" cp [-R [-H | -L | -P]] [-f | -i | -n] [-alpsvx] "
"source_file ... "
"target_directory");
exit(EX_USAGE);
}

243
bin/csh/Makefile.depend Normal file
View File

@ -0,0 +1,243 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/arpa \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libcrypt \
lib/ncurses/ncursesw \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
ed.chared.o: ed.defns.h
ed.chared.o: sh.err.h
ed.chared.o: tc.const.h
ed.chared.po: ed.defns.h
ed.chared.po: sh.err.h
ed.chared.po: tc.const.h
ed.defns.o: sh.err.h
ed.defns.o: tc.const.h
ed.defns.po: sh.err.h
ed.defns.po: tc.const.h
ed.init.o: ed.defns.h
ed.init.o: sh.err.h
ed.init.o: tc.const.h
ed.init.po: ed.defns.h
ed.init.po: sh.err.h
ed.init.po: tc.const.h
ed.inputl.o: ed.defns.h
ed.inputl.o: sh.err.h
ed.inputl.o: tc.const.h
ed.inputl.po: ed.defns.h
ed.inputl.po: sh.err.h
ed.inputl.po: tc.const.h
ed.refresh.o: sh.err.h
ed.refresh.o: tc.const.h
ed.refresh.po: sh.err.h
ed.refresh.po: tc.const.h
ed.screen.o: ed.defns.h
ed.screen.o: sh.err.h
ed.screen.o: tc.const.h
ed.screen.po: ed.defns.h
ed.screen.po: sh.err.h
ed.screen.po: tc.const.h
ed.term.o: sh.err.h
ed.term.o: tc.const.h
ed.term.po: sh.err.h
ed.term.po: tc.const.h
ed.xmap.o: ed.defns.h
ed.xmap.o: sh.err.h
ed.xmap.o: tc.const.h
ed.xmap.po: ed.defns.h
ed.xmap.po: sh.err.h
ed.xmap.po: tc.const.h
glob.o: sh.err.h
glob.o: tc.const.h
glob.po: sh.err.h
glob.po: tc.const.h
mi.termios.o: sh.err.h
mi.termios.o: tc.const.h
mi.termios.po: sh.err.h
mi.termios.po: tc.const.h
sh.char.o: sh.err.h
sh.char.o: tc.const.h
sh.char.po: sh.err.h
sh.char.po: tc.const.h
sh.dir.o: sh.err.h
sh.dir.o: tc.const.h
sh.dir.po: sh.err.h
sh.dir.po: tc.const.h
sh.dol.o: sh.err.h
sh.dol.o: tc.const.h
sh.dol.po: sh.err.h
sh.dol.po: tc.const.h
sh.err.o: sh.err.h
sh.err.o: tc.const.h
sh.err.po: sh.err.h
sh.err.po: tc.const.h
sh.exec.o: sh.err.h
sh.exec.o: tc.const.h
sh.exec.po: sh.err.h
sh.exec.po: tc.const.h
sh.exp.o: sh.err.h
sh.exp.o: tc.const.h
sh.exp.po: sh.err.h
sh.exp.po: tc.const.h
sh.file.o: sh.err.h
sh.file.o: tc.const.h
sh.file.po: sh.err.h
sh.file.po: tc.const.h
sh.func.o: sh.err.h
sh.func.o: tc.const.h
sh.func.po: sh.err.h
sh.func.po: tc.const.h
sh.glob.o: sh.err.h
sh.glob.o: tc.const.h
sh.glob.po: sh.err.h
sh.glob.po: tc.const.h
sh.hist.o: sh.err.h
sh.hist.o: tc.const.h
sh.hist.po: sh.err.h
sh.hist.po: tc.const.h
sh.init.o: sh.err.h
sh.init.o: tc.const.h
sh.init.po: sh.err.h
sh.init.po: tc.const.h
sh.lex.o: sh.err.h
sh.lex.o: tc.const.h
sh.lex.po: sh.err.h
sh.lex.po: tc.const.h
sh.misc.o: sh.err.h
sh.misc.o: tc.const.h
sh.misc.po: sh.err.h
sh.misc.po: tc.const.h
sh.o: sh.err.h
sh.o: tc.const.h
sh.parse.o: sh.err.h
sh.parse.o: tc.const.h
sh.parse.po: sh.err.h
sh.parse.po: tc.const.h
sh.po: sh.err.h
sh.po: tc.const.h
sh.print.o: sh.err.h
sh.print.o: tc.const.h
sh.print.po: sh.err.h
sh.print.po: tc.const.h
sh.proc.o: sh.err.h
sh.proc.o: tc.const.h
sh.proc.po: sh.err.h
sh.proc.po: tc.const.h
sh.sem.o: sh.err.h
sh.sem.o: tc.const.h
sh.sem.po: sh.err.h
sh.sem.po: tc.const.h
sh.set.o: sh.err.h
sh.set.o: tc.const.h
sh.set.po: sh.err.h
sh.set.po: tc.const.h
sh.time.o: sh.err.h
sh.time.o: tc.const.h
sh.time.po: sh.err.h
sh.time.po: tc.const.h
tc.alloc.o: sh.err.h
tc.alloc.o: tc.const.h
tc.alloc.po: sh.err.h
tc.alloc.po: tc.const.h
tc.bind.o: ed.defns.h
tc.bind.o: sh.err.h
tc.bind.o: tc.const.h
tc.bind.po: ed.defns.h
tc.bind.po: sh.err.h
tc.bind.po: tc.const.h
tc.const.o: sh.err.h
tc.const.o: tc.const.h
tc.const.po: sh.err.h
tc.const.po: tc.const.h
tc.defs.o: sh.err.h
tc.defs.o: tc.const.h
tc.defs.o: tc.defs.c
tc.defs.po: sh.err.h
tc.defs.po: tc.const.h
tc.defs.po: tc.defs.c
tc.disc.o: sh.err.h
tc.disc.o: tc.const.h
tc.disc.po: sh.err.h
tc.disc.po: tc.const.h
tc.func.o: ed.defns.h
tc.func.o: sh.err.h
tc.func.o: tc.const.h
tc.func.po: ed.defns.h
tc.func.po: sh.err.h
tc.func.po: tc.const.h
tc.nls.o: sh.err.h
tc.nls.o: tc.const.h
tc.nls.po: sh.err.h
tc.nls.po: tc.const.h
tc.os.o: ed.defns.h
tc.os.o: sh.err.h
tc.os.o: tc.const.h
tc.os.po: ed.defns.h
tc.os.po: sh.err.h
tc.os.po: tc.const.h
tc.printf.o: sh.err.h
tc.printf.o: tc.const.h
tc.printf.po: sh.err.h
tc.printf.po: tc.const.h
tc.prompt.o: sh.err.h
tc.prompt.o: tc.const.h
tc.prompt.po: sh.err.h
tc.prompt.po: tc.const.h
tc.sched.o: sh.err.h
tc.sched.o: tc.const.h
tc.sched.po: sh.err.h
tc.sched.po: tc.const.h
tc.sig.o: sh.err.h
tc.sig.o: tc.const.h
tc.sig.po: sh.err.h
tc.sig.po: tc.const.h
tc.str.o: sh.err.h
tc.str.o: tc.const.h
tc.str.po: sh.err.h
tc.str.po: tc.const.h
tc.vers.o: sh.err.h
tc.vers.o: tc.const.h
tc.vers.po: sh.err.h
tc.vers.po: tc.const.h
tc.who.o: sh.err.h
tc.who.o: tc.const.h
tc.who.po: sh.err.h
tc.who.po: tc.const.h
tw.color.o: sh.err.h
tw.color.o: tc.const.h
tw.color.po: sh.err.h
tw.color.po: tc.const.h
tw.comp.o: sh.err.h
tw.comp.o: tc.const.h
tw.comp.po: sh.err.h
tw.comp.po: tc.const.h
tw.help.o: sh.err.h
tw.help.o: tc.const.h
tw.help.po: sh.err.h
tw.help.po: tc.const.h
tw.init.o: sh.err.h
tw.init.o: tc.const.h
tw.init.po: sh.err.h
tw.init.po: tc.const.h
tw.parse.o: sh.err.h
tw.parse.o: tc.const.h
tw.parse.po: sh.err.h
tw.parse.po: tc.const.h
tw.spell.o: sh.err.h
tw.spell.o: tc.const.h
tw.spell.po: sh.err.h
tw.spell.po: tc.const.h
.endif

19
bin/date/Makefile.depend Normal file
View File

@ -0,0 +1,19 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/protocols \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

18
bin/dd/Makefile.depend Normal file
View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

20
bin/df/Makefile.depend Normal file
View File

@ -0,0 +1,20 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libutil \
lib/libxo \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

18
bin/echo/Makefile.depend Normal file
View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

19
bin/ed/Makefile.depend Normal file
View File

@ -0,0 +1,19 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
secure/lib/libcrypto \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

21
bin/expr/Makefile.depend Normal file
View File

@ -0,0 +1,21 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
usr.bin/yacc.host \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
expr.o: expr.c
expr.po: expr.c
.endif

View File

@ -0,0 +1,11 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

18
bin/kenv/Makefile.depend Normal file
View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

18
bin/kill/Makefile.depend Normal file
View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

18
bin/ln/Makefile.depend Normal file
View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -10,7 +10,7 @@ LIBADD= util
.if !defined(RELEASE_CRUNCH) && \
${MK_LS_COLORS} != no
CFLAGS+= -DCOLORLS
LIBADD+= termcapw
LIBADD+= termcapw xo
.endif
.include <bsd.prog.mk>

20
bin/ls/Makefile.depend Normal file
View File

@ -0,0 +1,20 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libutil \
lib/ncurses/ncursesw \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -45,14 +45,17 @@ int revsizecmp(const FTSENT *, const FTSENT *);
void printcol(const DISPLAY *);
void printlong(const DISPLAY *);
int printname(const char *);
int printname(const char *, const char *);
void printscol(const DISPLAY *);
void printstream(const DISPLAY *);
void usage(void);
int prn_normal(const char *);
int prn_normal(const char *, const char *);
char * getname(const char *);
size_t len_octal(const char *, int);
int prn_octal(const char *);
int prn_printable(const char *);
int prn_octal(const char *, const char *);
char * get_octal(const char *);
int prn_printable(const char *, const char *);
char * get_printable(const char *);
#ifdef COLORLS
void parsecolors(const char *cs);
void colorquit(int);

View File

@ -32,7 +32,7 @@
.\" @(#)ls.1 8.7 (Berkeley) 7/29/94
.\" $FreeBSD$
.\"
.Dd April 4, 2014
.Dd June 8, 2015
.Dt LS 1
.Os
.Sh NAME
@ -40,6 +40,7 @@
.Nd list directory contents
.Sh SYNOPSIS
.Nm
.Op Fl -libxo
.Op Fl ABCFGHILPRSTUWZabcdfghiklmnopqrstuwxy1,
.Op Fl D Ar format
.Op Ar
@ -797,9 +798,11 @@ specification.
.Xr getfacl 1 ,
.Xr sort 1 ,
.Xr xterm 1 ,
.Xr libxo 3 ,
.Xr localeconv 3 ,
.Xr strftime 3 ,
.Xr strmode 3 ,
.Xr xo_parse_args 3 ,
.Xr termcap 5 ,
.Xr maclabel 7 ,
.Xr sticky 7 ,

View File

@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$");
#include <termcap.h>
#include <signal.h>
#endif
#include <libxo/xo.h>
#include "ls.h"
#include "extern.h"
@ -185,6 +186,12 @@ main(int argc, char *argv[])
fts_options = FTS_PHYSICAL;
if (getenv("LS_SAMESORT"))
f_samesort = 1;
argc = xo_parse_args(argc, argv);
if (argc < 0)
return (1);
xo_set_flags(NULL, XOF_COLUMNS);
while ((ch = getopt(argc, argv,
"1ABCD:FGHILPRSTUWXZabcdfghiklmnopqrstuwxy,")) != -1) {
switch (ch) {
@ -381,7 +388,7 @@ main(int argc, char *argv[])
f_color = 1;
}
#else
warnx("color support not compiled in");
xo_warnx("color support not compiled in");
#endif /*COLORLS*/
#ifdef COLORLS
@ -413,9 +420,14 @@ main(int argc, char *argv[])
/*
* If not -F, -P, -d or -l options, follow any symbolic links listed on
* the command line.
* the command line, unless in color mode in which case we need to
* distinguish file type for a symbolic link itself and its target.
*/
if (!f_nofollow && !f_longform && !f_listdir && (!f_type || f_slash))
if (!f_nofollow && !f_longform && !f_listdir && (!f_type || f_slash)
#ifdef COLORLS
&& !f_color
#endif
)
fts_options |= FTS_COMFOLLOW;
/*
@ -474,10 +486,13 @@ main(int argc, char *argv[])
else
printfcn = printcol;
xo_open_container("file-information");
if (argc)
traverse(argc, argv, fts_options);
else
traverse(1, dotav, fts_options);
xo_close_container("file-information");
xo_finish();
exit(rval);
}
@ -495,10 +510,11 @@ traverse(int argc, char *argv[], int options)
FTS *ftsp;
FTSENT *p, *chp;
int ch_options;
int first = 1;
if ((ftsp =
fts_open(argv, options, f_nosort ? NULL : mastercmp)) == NULL)
err(1, "fts_open");
xo_err(1, "fts_open");
/*
* We ignore errors from fts_children here since they will be
@ -520,11 +536,11 @@ traverse(int argc, char *argv[], int options)
while ((p = fts_read(ftsp)) != NULL)
switch (p->fts_info) {
case FTS_DC:
warnx("%s: directory causes a cycle", p->fts_name);
xo_warnx("%s: directory causes a cycle", p->fts_name);
break;
case FTS_DNR:
case FTS_ERR:
warnx("%s: %s", p->fts_path, strerror(p->fts_errno));
xo_warnx("%s: %s", p->fts_path, strerror(p->fts_errno));
rval = 1;
break;
case FTS_D:
@ -532,31 +548,40 @@ traverse(int argc, char *argv[], int options)
p->fts_name[0] == '.' && !f_listdot)
break;
if (first) {
first = 0;
xo_open_list("directory");
}
xo_open_instance("directory");
/*
* If already output something, put out a newline as
* a separator. If multiple arguments, precede each
* directory with its name.
*/
if (output) {
putchar('\n');
(void)printname(p->fts_path);
puts(":");
xo_emit("\n");
(void)printname("path", p->fts_path);
xo_emit(":\n");
} else if (argc > 1) {
(void)printname(p->fts_path);
puts(":");
(void)printname("path", p->fts_path);
xo_emit(":\n");
output = 1;
}
chp = fts_children(ftsp, ch_options);
display(p, chp, options);
xo_close_instance("directory");
if (!f_recursive && chp != NULL)
(void)fts_set(ftsp, p, FTS_SKIP);
break;
default:
break;
}
if (!first)
xo_close_list("directory");
if (errno)
err(1, "fts_read");
xo_err(1, "fts_read");
}
/*
@ -603,7 +628,7 @@ display(const FTSENT *p, FTSENT *list, int options)
/* Fill-in "::" as "0:0:0" for the sake of scanf. */
jinitmax = malloc(strlen(initmax) * 2 + 2);
if (jinitmax == NULL)
err(1, "malloc");
xo_err(1, "malloc");
initmax2 = jinitmax;
if (*initmax == ':')
strcpy(initmax2, "0:"), initmax2 += 2;
@ -674,7 +699,7 @@ display(const FTSENT *p, FTSENT *list, int options)
flags = NULL;
for (cur = list, entries = 0; cur; cur = cur->fts_link) {
if (cur->fts_info == FTS_ERR || cur->fts_info == FTS_NS) {
warnx("%s: %s",
xo_warnx("%s: %s",
cur->fts_name, strerror(cur->fts_errno));
cur->fts_number = NO_PRINT;
rval = 1;
@ -740,7 +765,7 @@ display(const FTSENT *p, FTSENT *list, int options)
flags = strdup("-");
}
if (flags == NULL)
err(1, "fflagstostr");
xo_err(1, "fflagstostr");
flen = strlen(flags);
if (flen > (size_t)maxflags)
maxflags = flen;
@ -754,7 +779,7 @@ display(const FTSENT *p, FTSENT *list, int options)
error = mac_prepare_file_label(&label);
if (error == -1) {
warn("MAC label for %s/%s",
xo_warn("MAC label for %s/%s",
cur->fts_parent->fts_path,
cur->fts_name);
goto label_out;
@ -775,7 +800,7 @@ display(const FTSENT *p, FTSENT *list, int options)
error = mac_get_link(name,
label);
if (error == -1) {
warn("MAC label for %s/%s",
xo_warn("MAC label for %s/%s",
cur->fts_parent->fts_path,
cur->fts_name);
mac_free(label);
@ -785,7 +810,7 @@ display(const FTSENT *p, FTSENT *list, int options)
error = mac_to_text(label,
&labelstr);
if (error == -1) {
warn("MAC label for %s/%s",
xo_warn("MAC label for %s/%s",
cur->fts_parent->fts_path,
cur->fts_name);
mac_free(label);
@ -803,7 +828,7 @@ display(const FTSENT *p, FTSENT *list, int options)
if ((np = malloc(sizeof(NAMES) + labelstrlen +
ulen + glen + flen + 4)) == NULL)
err(1, "malloc");
xo_err(1, "malloc");
np->user = &np->data[0];
(void)strcpy(np->user, user);

View File

@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$");
#include <termcap.h>
#include <signal.h>
#endif
#include <libxo/xo.h>
#include "ls.h"
#include "extern.h"
@ -65,9 +66,9 @@ __FBSDID("$FreeBSD$");
static int printaname(const FTSENT *, u_long, u_long);
static void printdev(size_t, dev_t);
static void printlink(const FTSENT *);
static void printtime(time_t);
static void printtime(const char *, time_t);
static int printtype(u_int);
static void printsize(size_t, off_t);
static void printsize(const char *, size_t, off_t);
#ifdef COLORLS
static void endcolor(int);
static int colortype(mode_t);
@ -109,26 +110,46 @@ printscol(const DISPLAY *dp)
{
FTSENT *p;
xo_open_list("entry");
for (p = dp->list; p; p = p->fts_link) {
if (IS_NOPRINT(p))
continue;
xo_open_instance("entry");
(void)printaname(p, dp->s_inode, dp->s_block);
(void)putchar('\n');
xo_close_instance("entry");
xo_emit("\n");
}
xo_close_list("entry");
}
/*
* print name in current style
*/
int
printname(const char *name)
printname(const char *field, const char *name)
{
char fmt[BUFSIZ];
char *s = getname(name);
int rc;
snprintf(fmt, sizeof(fmt), "{:%s/%%hs}", field);
rc = xo_emit(fmt, s);
free(s);
return rc;
}
/*
* print name in current style
*/
char *
getname(const char *name)
{
if (f_octal || f_octal_escape)
return prn_octal(name);
return get_octal(name);
else if (f_nonprint)
return prn_printable(name);
return get_printable(name);
else
return prn_normal(name);
return strdup(name);
}
void
@ -144,46 +165,59 @@ printlong(const DISPLAY *dp)
if ((dp->list == NULL || dp->list->fts_level != FTS_ROOTLEVEL) &&
(f_longform || f_size)) {
(void)printf("total %lu\n", howmany(dp->btotal, blocksize));
xo_emit("{L:total} {:total-blocks/%lu}\n",
howmany(dp->btotal, blocksize));
}
xo_open_list("entry");
for (p = dp->list; p; p = p->fts_link) {
char *name;
if (IS_NOPRINT(p))
continue;
xo_open_instance("entry");
sp = p->fts_statp;
name = getname(p->fts_name);
if (name)
xo_emit("{ke:name}", name);
if (f_inode)
(void)printf("%*ju ",
xo_emit("{:inode/%*ju} ",
dp->s_inode, (uintmax_t)sp->st_ino);
if (f_size)
(void)printf("%*jd ",
xo_emit("{:blocks/%*jd} ",
dp->s_block, howmany(sp->st_blocks, blocksize));
strmode(sp->st_mode, buf);
aclmode(buf, p);
np = p->fts_pointer;
(void)printf("%s %*u %-*s %-*s ", buf, dp->s_nlink,
sp->st_nlink, dp->s_user, np->user, dp->s_group,
np->group);
xo_attr("value", "%03o", (int) sp->st_mode & ALLPERMS);
xo_emit("{t:mode/%s} {:links/%*u} {:user/%-*s} {:group/%-*s} ",
buf, dp->s_nlink, sp->st_nlink,
dp->s_user, np->user, dp->s_group, np->group);
if (f_flags)
(void)printf("%-*s ", dp->s_flags, np->flags);
xo_emit("{:flags/%-*s} ", dp->s_flags, np->flags);
if (f_label)
(void)printf("%-*s ", dp->s_label, np->label);
xo_emit("{:label/%-*s} ", dp->s_label, np->label);
if (S_ISCHR(sp->st_mode) || S_ISBLK(sp->st_mode))
printdev(dp->s_size, sp->st_rdev);
else
printsize(dp->s_size, sp->st_size);
printsize("size", dp->s_size, sp->st_size);
if (f_accesstime)
printtime(sp->st_atime);
printtime("access-time", sp->st_atime);
else if (f_birthtime)
printtime(sp->st_birthtime);
printtime("birth-time", sp->st_birthtime);
else if (f_statustime)
printtime(sp->st_ctime);
printtime("change-time", sp->st_ctime);
else
printtime(sp->st_mtime);
printtime("modify-time", sp->st_mtime);
#ifdef COLORLS
if (f_color)
color_printed = colortype(sp->st_mode);
#endif
(void)printname(p->fts_name);
if (name) {
xo_emit("{dk:name}", name);
free(name);
}
#ifdef COLORLS
if (f_color && color_printed)
endcolor(0);
@ -192,8 +226,10 @@ printlong(const DISPLAY *dp)
(void)printtype(sp->st_mode);
if (S_ISLNK(sp->st_mode))
printlink(p);
(void)putchar('\n');
xo_close_instance("entry");
xo_emit("\n");
}
xo_close_list("entry");
}
void
@ -208,17 +244,17 @@ printstream(const DISPLAY *dp)
/* XXX strlen does not take octal escapes into account. */
if (strlen(p->fts_name) + chcnt +
(p->fts_link ? 2 : 0) >= (unsigned)termwidth) {
putchar('\n');
xo_emit("\n");
chcnt = 0;
}
chcnt += printaname(p, dp->s_inode, dp->s_block);
if (p->fts_link) {
printf(", ");
xo_emit(", ");
chcnt += 2;
}
}
if (chcnt)
putchar('\n');
xo_emit("\n");
}
void
@ -252,7 +288,6 @@ printcol(const DISPLAY *dp)
if (dp->entries > lastentries) {
if ((narray =
realloc(array, dp->entries * sizeof(FTSENT *))) == NULL) {
warn(NULL);
printscol(dp);
return;
}
@ -283,17 +318,21 @@ printcol(const DISPLAY *dp)
if ((dp->list == NULL || dp->list->fts_level != FTS_ROOTLEVEL) &&
(f_longform || f_size)) {
(void)printf("total %lu\n", howmany(dp->btotal, blocksize));
xo_emit("{L:total} {:total-blocks/%lu}\n",
howmany(dp->btotal, blocksize));
}
xo_open_list("entry");
base = 0;
for (row = 0; row < numrows; ++row) {
endcol = colwidth;
if (!f_sortacross)
base = row;
for (col = 0, chcnt = 0; col < numcols; ++col) {
xo_open_instance("entry");
chcnt += printaname(array[base], dp->s_inode,
dp->s_block);
xo_close_instance("entry");
if (f_sortacross)
base++;
else
@ -304,13 +343,14 @@ printcol(const DISPLAY *dp)
<= endcol) {
if (f_sortacross && col + 1 >= numcols)
break;
(void)putchar(f_notabs ? ' ' : '\t');
xo_emit(f_notabs ? " " : "\t");
chcnt = cnt;
}
endcol += colwidth;
}
(void)putchar('\n');
xo_emit("\n");
}
xo_close_list("entry");
}
/*
@ -329,16 +369,16 @@ printaname(const FTSENT *p, u_long inodefield, u_long sizefield)
sp = p->fts_statp;
chcnt = 0;
if (f_inode)
chcnt += printf("%*ju ",
chcnt += xo_emit("{:inode/%*ju} ",
(int)inodefield, (uintmax_t)sp->st_ino);
if (f_size)
chcnt += printf("%*jd ",
chcnt += xo_emit("{:size/%*jd} ",
(int)sizefield, howmany(sp->st_blocks, blocksize));
#ifdef COLORLS
if (f_color)
color_printed = colortype(sp->st_mode);
#endif
chcnt += printname(p->fts_name);
chcnt += printname("name", p->fts_name);
#ifdef COLORLS
if (f_color && color_printed)
endcolor(0);
@ -354,14 +394,14 @@ printaname(const FTSENT *p, u_long inodefield, u_long sizefield)
static void
printdev(size_t width, dev_t dev)
{
(void)printf("%#*jx ", (u_int)width, (uintmax_t)dev);
xo_emit("{:device/%#*jx} ", (u_int)width, (uintmax_t)dev);
}
static void
printtime(time_t ftime)
printtime(const char *field, time_t ftime)
{
char longstring[80];
char fmt[BUFSIZ];
static time_t now = 0;
const char *format;
static int d_first = -1;
@ -384,8 +424,10 @@ printtime(time_t ftime)
/* mmm dd yyyy || dd mmm yyyy */
format = d_first ? "%e %b %Y" : "%b %e %Y";
strftime(longstring, sizeof(longstring), format, localtime(&ftime));
fputs(longstring, stdout);
fputc(' ', stdout);
snprintf(fmt, sizeof(fmt), "{:%s/%%s} ", field);
xo_attr("value", "%ld", (long) ftime);
xo_emit(fmt, longstring);
}
static int
@ -394,7 +436,7 @@ printtype(u_int mode)
if (f_slash) {
if ((mode & S_IFMT) == S_IFDIR) {
(void)putchar('/');
xo_emit("{D:\\/}{e:type/directory}");
return (1);
}
return (0);
@ -402,25 +444,25 @@ printtype(u_int mode)
switch (mode & S_IFMT) {
case S_IFDIR:
(void)putchar('/');
xo_emit("{D:/\\/}{e:type/directory}");
return (1);
case S_IFIFO:
(void)putchar('|');
xo_emit("{D:|}{e:type/fifo}");
return (1);
case S_IFLNK:
(void)putchar('@');
xo_emit("{D:@}{e:type/link}");
return (1);
case S_IFSOCK:
(void)putchar('=');
xo_emit("{D:=}{e:type/socket}");
return (1);
case S_IFWHT:
(void)putchar('%');
xo_emit("{D:%}{e:type/whiteout}");
return (1);
default:
break;
}
if (mode & (S_IXUSR | S_IXGRP | S_IXOTH)) {
(void)putchar('*');
xo_emit("{D:*}{e:executable/}");
return (1);
}
return (0);
@ -430,7 +472,7 @@ printtype(u_int mode)
static int
putch(int c)
{
(void)putchar(c);
xo_emit("{D:/%c}", c);
return 0;
}
@ -539,7 +581,7 @@ parsecolors(const char *cs)
if (c[j] >= '0' && c[j] <= '7') {
colors[i].num[j] = c[j] - '0';
if (!legacy_warn) {
warnx("LSCOLORS should use "
xo_warnx("LSCOLORS should use "
"characters a-h instead of 0-9 ("
"see the manual page)");
}
@ -552,7 +594,7 @@ parsecolors(const char *cs)
} else if (tolower((unsigned char)c[j]) == 'x')
colors[i].num[j] = -1;
else {
warnx("invalid character '%c' in LSCOLORS"
xo_warnx("invalid character '%c' in LSCOLORS"
" env var", c[j]);
colors[i].num[j] = -1;
}
@ -584,18 +626,19 @@ printlink(const FTSENT *p)
(void)snprintf(name, sizeof(name),
"%s/%s", p->fts_parent->fts_accpath, p->fts_name);
if ((lnklen = readlink(name, path, sizeof(path) - 1)) == -1) {
(void)fprintf(stderr, "\nls: %s: %s\n", name, strerror(errno));
xo_error("\nls: %s: %s\n", name, strerror(errno));
return;
}
path[lnklen] = '\0';
(void)printf(" -> ");
(void)printname(path);
xo_emit(" -> ");
(void)printname("target", path);
}
static void
printsize(size_t width, off_t bytes)
printsize(const char *field, size_t width, off_t bytes)
{
char fmt[BUFSIZ];
if (f_humanval) {
/*
* Reserve one space before the size and allocate room for
@ -605,13 +648,15 @@ printsize(size_t width, off_t bytes)
humanize_number(buf, sizeof(buf), (int64_t)bytes, "",
HN_AUTOSCALE, HN_B | HN_NOSPACE | HN_DECIMAL);
(void)printf("%*s ", (u_int)width, buf);
} else if (f_thousands) { /* with commas */
snprintf(fmt, sizeof(fmt), "{:%s/%%%ds} ", field, (int) width);
xo_attr("value", "%jd", (intmax_t) bytes);
xo_emit(fmt, buf);
} else { /* with commas */
/* This format assignment needed to work round gcc bug. */
const char *format = "%*j'd ";
(void)printf(format, (u_int)width, bytes);
} else
(void)printf("%*jd ", (u_int)width, bytes);
snprintf(fmt, sizeof(fmt), "{:%s/%%%dj%sd} ",
field, (int) width, f_thousands ? "'" : "");
xo_emit(fmt, (intmax_t) bytes);
}
}
/*
@ -654,7 +699,7 @@ aclmode(char *buf, const FTSENT *p)
type = ACL_TYPE_NFS4;
supports_acls = 1;
} else if (ret < 0 && errno != EINVAL) {
warn("%s", name);
xo_warn("%s", name);
return;
}
if (supports_acls == 0) {
@ -663,7 +708,7 @@ aclmode(char *buf, const FTSENT *p)
type = ACL_TYPE_ACCESS;
supports_acls = 1;
} else if (ret < 0 && errno != EINVAL) {
warn("%s", name);
xo_warn("%s", name);
return;
}
}
@ -672,12 +717,12 @@ aclmode(char *buf, const FTSENT *p)
return;
facl = acl_get_link_np(name, type);
if (facl == NULL) {
warn("%s", name);
xo_warn("%s", name);
return;
}
if (acl_is_trivial_np(facl, &trivial)) {
acl_free(facl);
warn("%s", name);
xo_warn("%s", name);
return;
}
if (!trivial)

View File

@ -50,13 +50,19 @@ __FBSDID("$FreeBSD$");
#include <string.h>
#include <wchar.h>
#include <wctype.h>
#include <libxo/xo.h>
#include "ls.h"
#include "extern.h"
int
prn_normal(const char *s)
prn_normal(const char *field, const char *s)
{
char fmt[_POSIX2_LINE_MAX];
snprintf(fmt, sizeof(fmt), "{:%s/%%hs}", field);
return xo_emit(fmt, s);
#if 0
mbstate_t mbs;
wchar_t wc;
int i, n;
@ -83,43 +89,47 @@ prn_normal(const char *s)
n += wcwidth(wc);
}
return (n);
#endif
}
int
prn_printable(const char *s)
char *
get_printable(const char *s)
{
mbstate_t mbs;
wchar_t wc;
int i, n;
size_t clen;
int slen = strlen(s);
char *buf = alloca(slen + 1), *bp = buf;
memset(&mbs, 0, sizeof(mbs));
n = 0;
while ((clen = mbrtowc(&wc, s, MB_LEN_MAX, &mbs)) != 0) {
if (clen == (size_t)-1) {
putchar('?');
*bp++ = '?';
s++;
n++;
memset(&mbs, 0, sizeof(mbs));
continue;
}
if (clen == (size_t)-2) {
putchar('?');
*bp++ = '?';
n++;
break;
}
if (!iswprint(wc)) {
putchar('?');
*bp++ = '?';
s += clen;
n++;
continue;
}
for (i = 0; i < (int)clen; i++)
putchar((unsigned char)s[i]);
*bp++ = (unsigned char)s[i];
s += clen;
n += wcwidth(wc);
}
return (n);
*bp = '\0';
return strdup(buf);
}
/*
@ -165,8 +175,8 @@ len_octal(const char *s, int len)
return (r);
}
int
prn_octal(const char *s)
char *
get_octal(const char *s)
{
static const char esc[] = "\\\\\"\"\aa\bb\ff\nn\rr\tt\vv";
const char *p;
@ -175,6 +185,8 @@ prn_octal(const char *s)
size_t clen;
unsigned char ch;
int goodchar, i, len, prtlen;
int slen = strlen(s);
char *buf = alloca(slen * 4 + 1), *bp = buf;
memset(&mbs, 0, sizeof(mbs));
len = 0;
@ -182,7 +194,7 @@ prn_octal(const char *s)
goodchar = clen != (size_t)-1 && clen != (size_t)-2;
if (goodchar && iswprint(wc) && wc != L'\"' && wc != L'\\') {
for (i = 0; i < (int)clen; i++)
putchar((unsigned char)s[i]);
*bp++ = (unsigned char)s[i];
len += wcwidth(wc);
} else if (goodchar && f_octal_escape &&
#if WCHAR_MIN < 0
@ -190,8 +202,8 @@ prn_octal(const char *s)
#endif
wc <= (wchar_t)UCHAR_MAX &&
(p = strchr(esc, (char)wc)) != NULL) {
putchar('\\');
putchar(p[1]);
*bp ++ = '\\';
*bp++ = p[1];
len += 2;
} else {
if (goodchar)
@ -202,10 +214,10 @@ prn_octal(const char *s)
prtlen = strlen(s);
for (i = 0; i < prtlen; i++) {
ch = (unsigned char)s[i];
putchar('\\');
putchar('0' + (ch >> 6));
putchar('0' + ((ch >> 3) & 7));
putchar('0' + (ch & 7));
*bp++ = '\\';
*bp++ = '0' + (ch >> 6);
*bp++ = '0' + ((ch >> 3) & 7);
*bp++ = '0' + (ch & 7);
len += 4;
}
}
@ -217,13 +229,15 @@ prn_octal(const char *s)
} else
s += clen;
}
return (len);
*bp = '\0';
return strdup(buf);
}
void
usage(void)
{
(void)fprintf(stderr,
xo_error(
#ifdef COLORLS
"usage: ls [-ABCFGHILPRSTUWZabcdfghiklmnopqrstuwxy1,] [-D format]"
#else

18
bin/mkdir/Makefile.depend Normal file
View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

18
bin/mv/Makefile.depend Normal file
View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

18
bin/pax/Makefile.depend Normal file
View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

19
bin/pkill/Makefile.depend Normal file
View File

@ -0,0 +1,19 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libkvm \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

22
bin/ps/Makefile.depend Normal file
View File

@ -0,0 +1,22 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libjail \
lib/libkvm \
lib/libxo \
lib/msun \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -180,7 +180,7 @@ main(int argc, char *argv[])
KINFO_STR *ks;
struct varent *vent;
struct winsize ws = { .ws_row = 0 };
const char *nlistf, *memf, *fmtstr, *str;
const char *nlistf, *memf, *str;
char *cols;
int all, ch, elem, flag, _fmt, i, lineno, linelen, left;
int descendancy, nentries, nkept, nselectors;
@ -649,11 +649,6 @@ main(int argc, char *argv[])
linelen = 0;
xo_open_instance("process");
STAILQ_FOREACH(vent, &varlist, next_ve) {
if (vent->var->flag & LJUST)
fmtstr = "%-*s";
else
fmtstr = "%*s";
ks = STAILQ_FIRST(&kinfo[i].ki_ks);
STAILQ_REMOVE_HEAD(&kinfo[i].ki_ks, ks_next);
/* Truncate rightmost column if necessary. */

18
bin/pwait/Makefile.depend Normal file
View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

18
bin/pwd/Makefile.depend Normal file
View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

18
bin/rcp/Makefile.depend Normal file
View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,17 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

18
bin/rm/Makefile.depend Normal file
View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

22
bin/rmail/Makefile.depend Normal file
View File

@ -0,0 +1,22 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libsm \
lib/libutil \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
rmail.o: sm_os.h
rmail.po: sm_os.h
.endif

18
bin/rmdir/Makefile.depend Normal file
View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

114
bin/sh/Makefile.depend Normal file
View File

@ -0,0 +1,114 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libedit \
lib/ncurses/ncursesw \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
alias.o: builtins.h
alias.po: builtins.h
arith_yylex.o: syntax.h
arith_yylex.po: syntax.h
builtins.o: builtins.c
builtins.o: builtins.h
builtins.po: builtins.c
builtins.po: builtins.h
cd.o: builtins.h
cd.o: nodes.h
cd.po: builtins.h
cd.po: nodes.h
echo.o: builtins.h
echo.po: builtins.h
error.o: nodes.h
error.po: nodes.h
eval.o: builtins.h
eval.o: nodes.h
eval.o: syntax.h
eval.po: builtins.h
eval.po: nodes.h
eval.po: syntax.h
exec.o: builtins.h
exec.o: nodes.h
exec.o: syntax.h
exec.po: builtins.h
exec.po: nodes.h
exec.po: syntax.h
expand.o: builtins.h
expand.o: nodes.h
expand.o: syntax.h
expand.po: builtins.h
expand.po: nodes.h
expand.po: syntax.h
histedit.o: builtins.h
histedit.po: builtins.h
input.o: syntax.h
input.po: syntax.h
jobs.o: builtins.h
jobs.o: nodes.h
jobs.o: syntax.h
jobs.po: builtins.h
jobs.po: nodes.h
jobs.po: syntax.h
kill.o: builtins.h
kill.po: builtins.h
main.o: builtins.h
main.o: nodes.h
main.po: builtins.h
main.po: nodes.h
miscbltin.o: syntax.h
miscbltin.po: syntax.h
mystring.o: syntax.h
mystring.po: syntax.h
nodes.o: nodes.c
nodes.o: nodes.h
nodes.po: nodes.c
nodes.po: nodes.h
options.o: builtins.h
options.o: nodes.h
options.po: builtins.h
options.po: nodes.h
output.o: syntax.h
output.po: syntax.h
parser.o: nodes.h
parser.o: syntax.h
parser.o: token.h
parser.po: nodes.h
parser.po: syntax.h
parser.po: token.h
printf.o: builtins.h
printf.po: builtins.h
redir.o: nodes.h
redir.po: nodes.h
show.o: nodes.h
show.po: nodes.h
syntax.o: syntax.c
syntax.o: syntax.h
syntax.po: syntax.c
syntax.po: syntax.h
test.o: builtins.h
test.po: builtins.h
trap.o: builtins.h
trap.o: nodes.h
trap.o: syntax.h
trap.po: builtins.h
trap.po: nodes.h
trap.po: syntax.h
var.o: builtins.h
var.o: nodes.h
var.o: syntax.h
var.po: builtins.h
var.po: nodes.h
var.po: syntax.h
.endif

18
bin/sleep/Makefile.depend Normal file
View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

18
bin/stty/Makefile.depend Normal file
View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

17
bin/sync/Makefile.depend Normal file
View File

@ -0,0 +1,17 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

18
bin/test/Makefile.depend Normal file
View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,17 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -157,14 +157,22 @@ static ls_event_info_t g_event_info[LS_MAX_EVENTS] = {
"lockstat:::rw-block", "arg2 != 0 && arg3 == 1" },
{ 'C', "Lock", "R/W reader blocked by write wanted", "nsec",
"lockstat:::rw-block", "arg2 != 0 && arg3 == 0 && arg4" },
{ 'C', "Lock", "Unknown event (type 8)", "units" },
{ 'C', "Lock", "Unknown event (type 9)", "units" },
{ 'C', "Lock", "Unknown event (type 10)", "units" },
{ 'C', "Lock", "Unknown event (type 11)", "units" },
{ 'C', "Lock", "Unknown event (type 12)", "units" },
{ 'C', "Lock", "Unknown event (type 13)", "units" },
{ 'C', "Lock", "Unknown event (type 14)", "units" },
{ 'C', "Lock", "Unknown event (type 15)", "units" },
{ 'C', "Lock", "R/W writer spin on writer", "nsec",
"lockstat:::rw-spin", "arg2 == 0 && arg3 == 1" },
{ 'C', "Lock", "R/W writer spin on readers", "nsec",
"lockstat:::rw-spin", "arg2 == 0 && arg3 == 0 && arg4" },
{ 'C', "Lock", "R/W reader spin on writer", "nsec",
"lockstat:::rw-spin", "arg2 != 0 && arg3 == 1" },
{ 'C', "Lock", "R/W reader spin on write wanted", "nsec",
"lockstat:::rw-spin", "arg2 != 0 && arg3 == 0 && arg4" },
{ 'C', "Lock", "SX exclusive block", "nsec",
"lockstat:::sx-block", "arg2 == 0" },
{ 'C', "Lock", "SX shared block", "nsec",
"lockstat:::sx-block", "arg2 != 0" },
{ 'C', "Lock", "SX exclusive spin", "nsec",
"lockstat:::sx-spin", "arg2 == 0" },
{ 'C', "Lock", "SX shared spin", "nsec",
"lockstat:::sx-spin", "arg2 != 0" },
{ 'C', "Lock", "Unknown event (type 16)", "units" },
{ 'C', "Lock", "Unknown event (type 17)", "units" },
{ 'C', "Lock", "Unknown event (type 18)", "units" },
@ -188,13 +196,17 @@ static ls_event_info_t g_event_info[LS_MAX_EVENTS] = {
"lockstat:::spin-release", NULL,
"lockstat:::spin-acquire" },
{ 'H', "Lock", "R/W writer hold", "nsec",
"lockstat:::rw-release", "arg1 == 0",
"lockstat:::rw-acquire" },
"lockstat::rw_wunlock:rw-release", NULL,
"lockstat::rw_wlock:rw-acquire" },
{ 'H', "Lock", "R/W reader hold", "nsec",
"lockstat:::rw-release", "arg1 != 0",
"lockstat:::rw-acquire" },
{ 'H', "Lock", "Unknown event (type 36)", "units" },
{ 'H', "Lock", "Unknown event (type 37)", "units" },
"lockstat::rw_runlock:rw-release", NULL,
"lockstat::rw_rlock:rw-acquire" },
{ 'H', "Lock", "SX shared hold", "nsec",
"lockstat::sx_sunlock:sx-release", NULL,
"lockstat::sx_slock:sx-acquire" },
{ 'H', "Lock", "SX exclusive hold", "nsec",
"lockstat::sx_xunlock:sx-release", NULL,
"lockstat::sx_xlock:sx-acquire" },
{ 'H', "Lock", "Unknown event (type 38)", "units" },
{ 'H', "Lock", "Unknown event (type 39)", "units" },
{ 'H', "Lock", "Unknown event (type 40)", "units" },

View File

@ -90,10 +90,10 @@ uint8_t dump_opt[256];
typedef void object_viewer_t(objset_t *, uint64_t, void *data, size_t size);
extern void dump_intent_log(zilog_t *);
uint64_t *zopt_object = NULL;
int zopt_objects = 0;
libzfs_handle_t *g_zfs;
uint64_t max_inflight = 1000;
static uint64_t *zopt_object = NULL;
static int zopt_objects = 0;
static libzfs_handle_t *g_zfs;
static uint64_t max_inflight = 1000;
/*
* These libumem hooks provide a reasonable set of defaults for the allocator's
@ -1488,16 +1488,14 @@ dump_deadlist(dsl_deadlist_t *dl)
dle = AVL_NEXT(&dl->dl_tree, dle)) {
if (dump_opt['d'] >= 5) {
char buf[128];
(void) snprintf(buf, sizeof (buf), "mintxg %llu -> ",
(longlong_t)dle->dle_mintxg,
(void) snprintf(buf, sizeof (buf), "mintxg %llu -> "
"obj %llu", (longlong_t)dle->dle_mintxg,
(longlong_t)dle->dle_bpobj.bpo_object);
dump_bpobj(&dle->dle_bpobj, buf, 0);
} else {
(void) printf("mintxg %llu -> obj %llu\n",
(longlong_t)dle->dle_mintxg,
(longlong_t)dle->dle_bpobj.bpo_object);
}
}
}

View File

@ -592,6 +592,17 @@ finish_progress(char *done)
pt_header = NULL;
}
/*
* Check if the dataset is mountable and should be automatically mounted.
*/
static boolean_t
should_auto_mount(zfs_handle_t *zhp)
{
if (!zfs_prop_valid_for_type(ZFS_PROP_CANMOUNT, zfs_get_type(zhp)))
return (B_FALSE);
return (zfs_prop_get_int(zhp, ZFS_PROP_CANMOUNT) == ZFS_CANMOUNT_ON);
}
/*
* zfs clone [-p] [-o prop=value] ... <snap> <fs | vol>
*
@ -677,9 +688,22 @@ zfs_do_clone(int argc, char **argv)
clone = zfs_open(g_zfs, argv[1], ZFS_TYPE_DATASET);
if (clone != NULL) {
if (zfs_get_type(clone) != ZFS_TYPE_VOLUME)
if ((ret = zfs_mount(clone, NULL, 0)) == 0)
ret = zfs_share(clone);
/*
* If the user doesn't want the dataset
* automatically mounted, then skip the mount/share
* step.
*/
if (should_auto_mount(clone)) {
if ((ret = zfs_mount(clone, NULL, 0)) != 0) {
(void) fprintf(stderr, gettext("clone "
"successfully created, "
"but not mounted\n"));
} else if ((ret = zfs_share(clone)) != 0) {
(void) fprintf(stderr, gettext("clone "
"successfully created, "
"but not shared\n"));
}
}
zfs_close(clone);
}
}
@ -728,7 +752,6 @@ zfs_do_create(int argc, char **argv)
int ret = 1;
nvlist_t *props;
uint64_t intval;
int canmount = ZFS_CANMOUNT_OFF;
if (nvlist_alloc(&props, NV_UNIQUE_NAME, 0) != 0)
nomem();
@ -868,19 +891,15 @@ zfs_do_create(int argc, char **argv)
goto error;
ret = 0;
/*
* if the user doesn't want the dataset automatically mounted,
* then skip the mount/share step
*/
if (zfs_prop_valid_for_type(ZFS_PROP_CANMOUNT, type))
canmount = zfs_prop_get_int(zhp, ZFS_PROP_CANMOUNT);
/*
* Mount and/or share the new filesystem as appropriate. We provide a
* verbose error message to let the user know that their filesystem was
* in fact created, even if we failed to mount or share it.
* If the user doesn't want the dataset automatically mounted,
* then skip the mount/share step altogether.
*/
if (!nomount && canmount == ZFS_CANMOUNT_ON) {
if (!nomount && should_auto_mount(zhp)) {
if (zfs_mount(zhp, NULL, 0) != 0) {
(void) fprintf(stderr, gettext("filesystem "
"successfully created, but not mounted\n"));

View File

@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2014 by Delphix. All rights reserved.
* Copyright (c) 2011, 2015 by Delphix. All rights reserved.
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2012 Martin Matuska <mm@FreeBSD.org>. All rights reserved.
* Copyright (c) 2013 Steven Hartland. All rights reserved.
@ -969,21 +969,6 @@ ztest_random_spa_version(uint64_t initial_version)
return (version);
}
/*
* Find the largest ashift used
*/
static uint64_t
ztest_spa_get_ashift() {
uint64_t i;
uint64_t ashift = SPA_MINBLOCKSHIFT;
vdev_t *rvd = ztest_spa->spa_root_vdev;
for (i = 0; i < rvd->vdev_children; i++) {
ashift = MAX(ashift, rvd->vdev_child[i]->vdev_ashift);
}
return (ashift);
}
static int
ztest_random_blocksize(void)
{
@ -995,7 +980,7 @@ ztest_random_blocksize(void)
int maxbs = SPA_OLD_MAXBLOCKSHIFT;
if (spa_maxblocksize(ztest_spa) == SPA_MAXBLOCKSIZE)
maxbs = 20;
block_shift = ztest_random(maxbs - ztest_spa_get_ashift() + 1);
block_shift = ztest_random(maxbs - ztest_spa->spa_max_ashift + 1);
return (1 << (SPA_MINBLOCKSHIFT + block_shift));
}

View File

@ -156,6 +156,21 @@ typedef struct dt_module {
#define DT_DM_KERNEL 0x2 /* module is associated with a kernel object */
#define DT_DM_PRIMARY 0x4 /* module is a krtld primary kernel object */
#ifdef __FreeBSD__
/*
* A representation of a FreeBSD kernel module, used when checking module
* dependencies. This differs from dt_module_t, which refers to a KLD in the
* case of kernel probes. Since modules can be identified regardless of whether
* they've been compiled into the kernel, we use them to identify DTrace
* modules.
*/
typedef struct dt_kmodule {
struct dt_kmodule *dkm_next; /* hash table entry */
char *dkm_name; /* string name of module */
dt_module_t *dkm_module; /* corresponding KLD module */
} dt_kmodule_t;
#endif
typedef struct dt_provmod {
char *dp_name; /* name of provider module */
struct dt_provmod *dp_next; /* next module */
@ -235,6 +250,9 @@ struct dtrace_hdl {
dt_idhash_t *dt_tls; /* hash table of thread-local identifiers */
dt_list_t dt_modlist; /* linked list of dt_module_t's */
dt_module_t **dt_mods; /* hash table of dt_module_t's */
#ifdef __FreeBSD__
dt_kmodule_t **dt_kmods; /* hash table of dt_kmodule_t's */
#endif
uint_t dt_modbuckets; /* number of module hash buckets */
uint_t dt_nmods; /* number of modules in hash and list */
dt_provmod_t *dt_provmod; /* linked list of provider modules */

View File

@ -37,6 +37,7 @@
#else
#include <sys/param.h>
#include <sys/linker.h>
#include <sys/module.h>
#include <sys/stat.h>
#endif
@ -542,6 +543,22 @@ dt_module_lookup_by_ctf(dtrace_hdl_t *dtp, ctf_file_t *ctfp)
return (ctfp ? ctf_getspecific(ctfp) : NULL);
}
#ifdef __FreeBSD__
dt_kmodule_t *
dt_kmodule_lookup(dtrace_hdl_t *dtp, const char *name)
{
uint_t h = dt_strtab_hash(name, NULL) % dtp->dt_modbuckets;
dt_kmodule_t *dkmp;
for (dkmp = dtp->dt_kmods[h]; dkmp != NULL; dkmp = dkmp->dkm_next) {
if (strcmp(dkmp->dkm_name, name) == 0)
return (dkmp);
}
return (NULL);
}
#endif
static int
dt_module_load_sect(dtrace_hdl_t *dtp, dt_module_t *dmp, ctf_sect_t *ctsp)
{
@ -1124,6 +1141,12 @@ dt_module_update(dtrace_hdl_t *dtp, struct kld_file_stat *k_stat)
char fname[MAXPATHLEN];
struct stat64 st;
int fd, err, bits;
#ifdef __FreeBSD__
struct module_stat ms;
dt_kmodule_t *dkmp;
uint_t h;
int modid;
#endif
dt_module_t *dmp;
const char *s;
@ -1270,6 +1293,33 @@ dt_module_update(dtrace_hdl_t *dtp, struct kld_file_stat *k_stat)
if (dmp->dm_info.objfs_info_primary)
dmp->dm_flags |= DT_DM_PRIMARY;
#ifdef __FreeBSD__
ms.version = sizeof(ms);
for (modid = kldfirstmod(k_stat->id); modid > 0;
modid = modnext(modid)) {
if (modstat(modid, &ms) != 0) {
dt_dprintf("modstat failed for id %d in %s: %s\n",
modid, k_stat->name, strerror(errno));
continue;
}
if (dt_kmodule_lookup(dtp, ms.name) != NULL)
continue;
dkmp = malloc(sizeof (*dkmp));
if (dkmp == NULL) {
dt_dprintf("failed to allocate memory\n");
dt_module_destroy(dtp, dmp);
return;
}
h = dt_strtab_hash(ms.name, NULL) % dtp->dt_modbuckets;
dkmp->dkm_next = dtp->dt_kmods[h];
dkmp->dkm_name = strdup(ms.name);
dkmp->dkm_module = dmp;
dtp->dt_kmods[h] = dkmp;
}
#endif
dt_dprintf("opened %d-bit module %s (%s) [%d]\n",
bits, dmp->dm_name, dmp->dm_file, dmp->dm_modid);
}

View File

@ -44,6 +44,10 @@ extern void dt_module_destroy(dtrace_hdl_t *, dt_module_t *);
extern dt_module_t *dt_module_lookup_by_name(dtrace_hdl_t *, const char *);
extern dt_module_t *dt_module_lookup_by_ctf(dtrace_hdl_t *, ctf_file_t *);
#ifdef __FreeBSD__
extern dt_kmodule_t *dt_kmodule_lookup(dtrace_hdl_t *, const char *);
#endif
extern int dt_module_hasctf(dtrace_hdl_t *, dt_module_t *);
extern ctf_file_t *dt_module_getctf(dtrace_hdl_t *, dt_module_t *);
extern dt_ident_t *dt_module_extern(dtrace_hdl_t *, dt_module_t *,

View File

@ -1178,6 +1178,9 @@ dt_vopen(int version, int flags, int *errp,
#endif
dtp->dt_modbuckets = _dtrace_strbuckets;
dtp->dt_mods = calloc(dtp->dt_modbuckets, sizeof (dt_module_t *));
#ifdef __FreeBSD__
dtp->dt_kmods = calloc(dtp->dt_modbuckets, sizeof (dt_module_t *));
#endif
dtp->dt_provbuckets = _dtrace_strbuckets;
dtp->dt_provs = calloc(dtp->dt_provbuckets, sizeof (dt_provider_t *));
dt_proc_hash_create(dtp);
@ -1199,6 +1202,7 @@ dt_vopen(int version, int flags, int *errp,
if (dtp->dt_mods == NULL || dtp->dt_provs == NULL ||
dtp->dt_procs == NULL || dtp->dt_ld_path == NULL ||
#ifdef __FreeBSD__
dtp->dt_kmods == NULL ||
dtp->dt_objcopy_path == NULL ||
#endif
dtp->dt_cpp_path == NULL || dtp->dt_cpp_argv == NULL)
@ -1621,6 +1625,10 @@ dtrace_close(dtrace_hdl_t *dtp)
dtrace_prog_t *pgp;
dt_xlator_t *dxp;
dt_dirpath_t *dirp;
#ifdef __FreeBSD__
dt_kmodule_t *dkm;
uint_t h;
#endif
int i;
if (dtp->dt_procs != NULL)
@ -1648,6 +1656,15 @@ dtrace_close(dtrace_hdl_t *dtp)
if (dtp->dt_tls != NULL)
dt_idhash_destroy(dtp->dt_tls);
#ifdef __FreeBSD__
for (h = 0; h < dtp->dt_modbuckets; h++)
while ((dkm = dtp->dt_kmods[h]) != NULL) {
dtp->dt_kmods[h] = dkm->dkm_next;
free(dkm->dkm_name);
free(dkm);
}
#endif
while ((dmp = dt_list_next(&dtp->dt_modlist)) != NULL)
dt_module_destroy(dtp, dmp);
@ -1697,6 +1714,9 @@ dtrace_close(dtrace_hdl_t *dtp)
#endif
free(dtp->dt_mods);
#ifdef __FreeBSD__
free(dtp->dt_kmods);
#endif
free(dtp->dt_provs);
free(dtp);
}

View File

@ -278,6 +278,14 @@ dt_pragma_depends(const char *prname, dt_node_t *cnp)
} else if (strcmp(cnp->dn_string, "module") == 0) {
dt_module_t *mp = dt_module_lookup_by_name(dtp, nnp->dn_string);
found = mp != NULL && dt_module_getctf(dtp, mp) != NULL;
#ifdef __FreeBSD__
if (!found) {
dt_kmodule_t *dkmp = dt_kmodule_lookup(dtp,
nnp->dn_string);
found = dkmp != NULL &&
dt_module_getctf(dtp, dkmp->dkm_module) != NULL;
}
#endif
} else if (strcmp(cnp->dn_string, "library") == 0) {
if (yypcb->pcb_cflags & DTRACE_C_CTL) {
assert(dtp->dt_filetag != NULL);

View File

@ -23,6 +23,7 @@
* Copyright 2015 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013 by Delphix. All rights reserved.
* Copyright 2015 RackTop Systems.
*/
/*
@ -1094,11 +1095,7 @@ zpool_open_func(void *arg)
}
(void) close(fd);
rn->rn_config = config;
if (config != NULL) {
assert(rn->rn_nozpool == B_FALSE);
}
}
/*

View File

@ -0,0 +1,14 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
include \
include/xlocale \
lib/libelf \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
usr.bin/xinstall.host \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,21 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libelf \
lib/libz \
usr.bin/xinstall.host \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,53 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
cddl/lib/libctf \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/arpa \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libelf \
lib/libproc \
lib/librtld_db \
lib/libthr \
usr.bin/xinstall.host \
usr.bin/yacc.host \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
dt_cc.So: dt_grammar.h
dt_cc.o: dt_grammar.h
dt_cc.po: dt_grammar.h
dt_cg.So: dt_grammar.h
dt_cg.o: dt_grammar.h
dt_cg.po: dt_grammar.h
dt_errtags.So: dt_errtags.c
dt_errtags.o: dt_errtags.c
dt_errtags.po: dt_errtags.c
dt_grammar.So: dt_grammar.c
dt_grammar.o: dt_grammar.c
dt_grammar.po: dt_grammar.c
dt_lex.So: dt_grammar.h
dt_lex.So: dt_lex.c
dt_lex.o: dt_grammar.h
dt_lex.o: dt_lex.c
dt_lex.po: dt_grammar.h
dt_lex.po: dt_lex.c
dt_names.So: dt_names.c
dt_names.o: dt_names.c
dt_names.po: dt_names.c
dt_parser.So: dt_grammar.h
dt_parser.o: dt_grammar.h
dt_parser.po: dt_grammar.h
dt_xlator.So: dt_grammar.h
dt_xlator.o: dt_grammar.h
dt_xlator.po: dt_grammar.h
.endif

View File

@ -0,0 +1,20 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/msun \
usr.bin/xinstall.host \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,18 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
usr.bin/xinstall.host \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,19 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
usr.bin/xinstall.host \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,30 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
cddl/lib/libavl \
cddl/lib/libnvpair \
cddl/lib/libumem \
cddl/lib/libuutil \
cddl/lib/libzfs_core \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libexpat \
lib/libgeom \
lib/libmd \
lib/libthr \
lib/libutil \
lib/msun \
usr.bin/xinstall.host \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,21 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
cddl/lib/libnvpair \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/msun \
usr.bin/xinstall.host \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,26 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
cddl/lib/libavl \
cddl/lib/libnvpair \
cddl/lib/libumem \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libmd \
lib/libthr \
lib/libz \
lib/msun \
usr.bin/xinstall.host \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,32 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
cddl/lib/libavl \
cddl/lib/libnvpair \
cddl/lib/libumem \
cddl/lib/libuutil \
cddl/lib/libzfs \
cddl/lib/libzfs_core \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libexpat \
lib/libgeom \
lib/libjail \
lib/libmd \
lib/libsbuf \
lib/libthr \
lib/libutil \
lib/msun \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,31 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
cddl/lib/libavl \
cddl/lib/libnvpair \
cddl/lib/libumem \
cddl/lib/libuutil \
cddl/lib/libzfs \
cddl/lib/libzfs_core \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libexpat \
lib/libgeom \
lib/libmd \
lib/libsbuf \
lib/libthr \
lib/libutil \
lib/msun \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,26 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
DIRDEPS = \
cddl/lib/libctf \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libc_nonshared \
lib/libcompiler_rt \
lib/libdwarf \
lib/libelf \
lib/libthr \
lib/libz \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,24 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libc_nonshared \
lib/libcompiler_rt \
lib/libelf \
lib/libthr \
lib/libz \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,26 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
DIRDEPS = \
cddl/lib/libctf \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libc_nonshared \
lib/libcompiler_rt \
lib/libdwarf \
lib/libelf \
lib/libthr \
lib/libz \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,19 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libelf \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,33 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
cddl/lib/libavl \
cddl/lib/libnvpair \
cddl/lib/libumem \
cddl/lib/libuutil \
cddl/lib/libzfs \
cddl/lib/libzfs_core \
cddl/lib/libzpool \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libexpat \
lib/libgeom \
lib/libmd \
lib/libsbuf \
lib/libthr \
lib/libutil \
lib/libz \
lib/msun \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,26 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
cddl/lib/libavl \
cddl/lib/libnvpair \
cddl/lib/libumem \
cddl/lib/libzpool \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libmd \
lib/libthr \
lib/libz \
lib/msun \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,33 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
cddl/lib/libavl \
cddl/lib/libnvpair \
cddl/lib/libumem \
cddl/lib/libuutil \
cddl/lib/libzfs \
cddl/lib/libzfs_core \
cddl/lib/libzpool \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libexpat \
lib/libgeom \
lib/libmd \
lib/libsbuf \
lib/libthr \
lib/libutil \
lib/libz \
lib/msun \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,32 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
DIRDEPS = \
cddl/lib/libctf \
cddl/lib/libdtrace \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libc_nonshared \
lib/libcompiler_rt \
lib/libcxxrt \
lib/libelf \
lib/libproc \
lib/librtld_db \
lib/libthr \
lib/libutil \
lib/liby \
lib/libz \
usr.bin/lex/lib \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,13 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DEP_RELDIR := ${_PARSEDIR:S,${SRCTOP}/,,}
DIRDEPS = \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,28 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
cddl/lib/libctf \
cddl/lib/libdtrace \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libcxxrt \
lib/libelf \
lib/libproc \
lib/librt \
lib/librtld_db \
lib/libthr \
lib/libutil \
lib/libz \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,33 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
cddl/lib/libavl \
cddl/lib/libnvpair \
cddl/lib/libumem \
cddl/lib/libuutil \
cddl/lib/libzfs \
cddl/lib/libzfs_core \
cddl/lib/libzpool \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libexpat \
lib/libgeom \
lib/libmd \
lib/libsbuf \
lib/libthr \
lib/libutil \
lib/libz \
lib/msun \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -0,0 +1,33 @@
# $FreeBSD$
# Autogenerated - do NOT edit!
DIRDEPS = \
cddl/lib/libavl \
cddl/lib/libnvpair \
cddl/lib/libumem \
cddl/lib/libuutil \
cddl/lib/libzfs \
cddl/lib/libzfs_core \
cddl/lib/libzpool \
gnu/lib/csu \
gnu/lib/libgcc \
include \
include/xlocale \
lib/${CSU_DIR} \
lib/libc \
lib/libcompiler_rt \
lib/libexpat \
lib/libgeom \
lib/libmd \
lib/libsbuf \
lib/libthr \
lib/libutil \
lib/libz \
lib/msun \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
.endif

View File

@ -1,3 +1,9 @@
2015-06-06 Simon J. Gerraty <sjg@bad.crufty.net>
* Makefile (MAKE_VERSION): 20150606
Merge with NetBSD make, pick up
o make.1: document .OBJDIR target
2015-05-05 Simon J. Gerraty <sjg@bad.crufty.net>
* Makefile (MAKE_VERSION): 20150505

View File

@ -1,7 +1,7 @@
# $Id: Makefile,v 1.38 2015/05/05 21:58:05 sjg Exp $
# $Id: Makefile,v 1.39 2015/06/07 15:54:37 sjg Exp $
# Base version on src date
MAKE_VERSION= 20150505
MAKE_VERSION= 20150606
PROG= bmake

View File

@ -1,4 +1,4 @@
.\" $NetBSD: make.1,v 1.247 2015/04/10 08:43:32 wiz Exp $
.\" $NetBSD: make.1,v 1.249 2015/06/05 07:33:40 wiz Exp $
.\"
.\" Copyright (c) 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@ -29,7 +29,7 @@
.\"
.\" from: @(#)make.1 8.4 (Berkeley) 3/19/94
.\"
.Dd April 9, 2015
.Dd June 4, 2015
.Dt MAKE 1
.Os
.Sh NAME
@ -993,14 +993,15 @@ This is especially useful with
.Ql Ev MAKEOBJDIR .
.Pp
.Ql Va .OBJDIR
may be modified in the makefile as a global variable.
may be modified in the makefile via the special target
.Ql Ic .OBJDIR .
In all cases,
.Nm
will
.Xr chdir 2
to
to the specified directory if it exists, and set
.Ql Va .OBJDIR
and set
and
.Ql Ev PWD
to that directory before executing any targets.
.
@ -2001,6 +2002,15 @@ Disable parallel mode.
Synonym for
.Ic .NOTPARALLEL ,
for compatibility with other pmake variants.
.It Ic .OBJDIR
The source is a new value for
.Ql Va .OBJDIR .
If it exists,
.Nm
will
.Xr chdir 2
to it and update the value of
.Ql Va .OBJDIR .
.It Ic .ORDER
The named targets are made in sequence.
This ordering does not add targets to the list of targets to be made.

View File

@ -647,10 +647,10 @@ VVAARRIIAABBLLEE AASSSSIIGGNNMMEENNTTSS
may be used. This is especially useful with
`MAKEOBJDIR'.
`_._O_B_J_D_I_R' may be modified in the makefile as a global
variable. In all cases, bbmmaakkee will chdir(2) to `_._O_B_J_D_I_R'
and set `PWD' to that directory before executing any tar-
gets.
`_._O_B_J_D_I_R' may be modified in the makefile via the special
target `..OOBBJJDDIIRR'. In all cases, bbmmaakkee will chdir(2) to
the specified directory if it exists, and set `_._O_B_J_D_I_R'
and `PWD' to that directory before executing any targets.
_._P_A_R_S_E_D_I_R A path to the directory of the current `_M_a_k_e_f_i_l_e' being
parsed.
@ -1271,6 +1271,9 @@ SSPPEECCIIAALL TTAARRGGEETTSS
Synonym for ..NNOOTTPPAARRAALLLLEELL, for compatibility with other pmake
variants.
..OOBBJJDDIIRR The source is a new value for `_._O_B_J_D_I_R'. If it exists, bbmmaakkee
will chdir(2) to it and update the value of `_._O_B_J_D_I_R'.
..OORRDDEERR The named targets are made in sequence. This ordering does not
add targets to the list of targets to be made. Since the depen-
dents of a target do not get built until the target itself could
@ -1449,4 +1452,4 @@ BBUUGGSS
There is no way of escaping a space character in a filename.
NetBSD 5.1 April 9, 2015 NetBSD 5.1
NetBSD 5.1 June 4, 2015 NetBSD 5.1

View File

@ -1,4 +1,4 @@
.\" $NetBSD: make.1,v 1.247 2015/04/10 08:43:32 wiz Exp $
.\" $NetBSD: make.1,v 1.249 2015/06/05 07:33:40 wiz Exp $
.\"
.\" Copyright (c) 1990, 1993
.\" The Regents of the University of California. All rights reserved.
@ -29,7 +29,7 @@
.\"
.\" from: @(#)make.1 8.4 (Berkeley) 3/19/94
.\"
.Dd April 9, 2015
.Dd June 4, 2015
.Dt MAKE 1
.Os
.Sh NAME
@ -1004,14 +1004,15 @@ This is especially useful with
.Ql Ev MAKEOBJDIR .
.Pp
.Ql Va .OBJDIR
may be modified in the makefile as a global variable.
may be modified in the makefile via the special target
.Ql Ic .OBJDIR .
In all cases,
.Nm
will
.Xr chdir 2
to
to the specified directory if it exists, and set
.Ql Va .OBJDIR
and set
and
.Ql Ev PWD
to that directory before executing any targets.
.
@ -2012,6 +2013,15 @@ Disable parallel mode.
Synonym for
.Ic .NOTPARALLEL ,
for compatibility with other pmake variants.
.It Ic .OBJDIR
The source is a new value for
.Ql Va .OBJDIR .
If it exists,
.Nm
will
.Xr chdir 2
to it and update the value of
.Ql Va .OBJDIR .
.It Ic .ORDER
The named targets are made in sequence.
This ordering does not add targets to the list of targets to be made.

View File

@ -1,3 +1,29 @@
2015-06-06 Simon J. Gerraty <sjg@bad.crufty.net>
* install-mk (MK_VERSION): 20150606
* dirdeps.mk: don't rely on manually maintained Makefile.depend
to set DEP_RELDIR and reset DIRDEPS.
By setting DEP_RELDIR ourselves we can skip :tA
* gendirdeps.mk: skip setting DEP_RELDIR.
2015-05-24 Simon J. Gerraty <sjg@bad.crufty.net>
* dirdeps.mk: avoid wildcards like make(bootstrap*)
2015-05-20 Simon J. Gerraty <sjg@bad.crufty.net>
* install-mk (MK_VERSION): 20150520
* dirdeps.mk: when we are building dirdeps cache file we *want*
meta_oodate to look at all the Makefile.depend files, so
set .MAKE.DEPENDFILE to something that won't match.
* meta.stage.mk: for STAGE_AS_* basename of file may not be unique
so first use absolute path as key.
Also skip staging at level 0.
2015-04-30 Simon J. Gerraty <sjg@bad.crufty.net>
* install-mk (MK_VERSION): 20150430

View File

@ -1,4 +1,4 @@
# $Id: dirdeps.mk,v 1.51 2015/05/06 06:07:30 sjg Exp $
# $Id: dirdeps.mk,v 1.54 2015/06/08 20:55:11 sjg Exp $
# Copyright (c) 2010-2013, Juniper Networks, Inc.
# All rights reserved.
@ -383,6 +383,7 @@ ${DIRDEPS_CACHE}: .META .NOMETA_CMP
DIRDEPS="${DIRDEPS}" \
MAKEFLAGS= ${.MAKE} -C ${_CURDIR} -f ${BUILD_DIRDEPS_MAKEFILE} \
${BUILD_DIRDEPS_TARGETS} BUILD_DIRDEPS_CACHE=yes \
.MAKE.DEPENDFILE=.none \
3>&1 1>&2 | sed 's,${SRCTOP},$${SRCTOP},g' >> ${.TARGET}.new && \
mv ${.TARGET}.new ${.TARGET}
@ -587,6 +588,11 @@ _qm := ${_m:C;(\.depend)$;\1.${d:E};:${M_dep_qual_fixes:ts:}}
_DEP_TARGET_SPEC := ${d:E}
# some makefiles may still look at this
_DEP_MACHINE := ${d:E:C/,.*//}
# set this "just in case"
# we can skip :tA since we computed the path above
DEP_RELDIR := ${_m:H:S,${SRCTOP}/,,}
# and reset this
DIRDEPS =
.if ${_debug_reldir} && ${_qm} != ${_m}
.info loading ${_m} for ${d:E}
.endif
@ -602,13 +608,15 @@ _DEP_MACHINE := ${d:E:C/,.*//}
.elif ${.MAKE.LEVEL} > 42
.error You should have stopped recursing by now.
.else
_DEP_RELDIR := ${DEP_RELDIR}
# we are building something
DEP_RELDIR := ${RELDIR}
_DEP_RELDIR := ${RELDIR}
# pickup local dependencies
.-include <.depend>
.endif
# bootstrapping new dependencies made easy?
.if make(bootstrap*) && !target(bootstrap)
.if (make(bootstrap) || make(bootstrap-recurse)) && !target(bootstrap)
.if exists(${.CURDIR}/${.MAKE.DEPENDFILE:T})
# stop here

View File

@ -1,4 +1,4 @@
# $Id: gendirdeps.mk,v 1.26 2014/09/05 04:40:52 sjg Exp $
# $Id: gendirdeps.mk,v 1.27 2015/06/08 20:55:11 sjg Exp $
# Copyright (c) 2010-2013, Juniper Networks, Inc.
# All rights reserved.
@ -311,7 +311,6 @@ CAT_DEPEND ?= .depend
# to output _{VAR} tokens which we will turn into proper ${VAR} references.
${_DEPENDFILE}: ${CAT_DEPEND:M.depend} ${META_FILES:O:u:@m@${exists($m):?$m:}@} ${_this} ${META2DEPS}
@(echo '# Autogenerated - do NOT edit!'; echo; \
echo 'DEP_RELDIR := $${_PARSEDIR:S,$${SRCTOP}/,,}'; echo; \
echo 'DIRDEPS = \'; \
echo '${DIRDEPS:@d@ $d \\${.newline}@}'; echo; \
${_include_src_dirdeps} \
@ -332,7 +331,6 @@ all: ${_DEPENDFILE}
${_DEPENDFILE}: ${MAKEFILE} ${_this}
@(echo '# Autogenerated - do NOT edit!'; echo; \
echo 'DEP_RELDIR := $${_PARSEDIR:S,$${SRCTOP}/,,}'; echo; \
echo 'DIRDEPS = \'; \
echo '${DIRDEPS:@d@ $d \\${.newline}@}'; echo; \
echo '.include <dirdeps.mk>'; \

View File

@ -55,7 +55,7 @@
# Simon J. Gerraty <sjg@crufty.net>
# RCSid:
# $Id: install-mk,v 1.110 2015/05/01 06:37:49 sjg Exp $
# $Id: install-mk,v 1.112 2015/06/08 20:55:11 sjg Exp $
#
# @(#) Copyright (c) 1994 Simon J. Gerraty
#
@ -70,7 +70,7 @@
# sjg@crufty.net
#
MK_VERSION=20150430
MK_VERSION=20150606
OWNER=
GROUP=
MODE=444

View File

@ -1,4 +1,4 @@
# $Id: meta.stage.mk,v 1.34 2014/11/20 22:40:08 sjg Exp $
# $Id: meta.stage.mk,v 1.35 2015/05/20 06:40:33 sjg Exp $
#
# @(#) Copyright (c) 2011, Simon J. Gerraty
#
@ -218,7 +218,7 @@ STAGE_AS.$s ?= ${.ALLSRC:N.dirdep}
stage_as: stage_as.$s
stage_as.$s: .dirdep
@${STAGE_AS_SCRIPT}; StageAs ${FLAGS.$@} ${STAGE_FILES_DIR.$s:U${STAGE_DIR.$s}:${STAGE_DIR_FILTER}} ${STAGE_AS.$s:@f@$f ${STAGE_AS_${f:T}:U${f:T}}@}
@${STAGE_AS_SCRIPT}; StageAs ${FLAGS.$@} ${STAGE_FILES_DIR.$s:U${STAGE_DIR.$s}:${STAGE_DIR_FILTER}} ${STAGE_AS.$s:@f@$f ${STAGE_AS_${f:tA}:U${STAGE_AS_${f:T}:U${f:T}}}@}
@touch $@
.endfor
@ -238,7 +238,9 @@ staging:
# generally we want staging to wait until everything else is done
STAGING_WAIT ?= .WAIT
.if ${.MAKE.LEVEL} > 0
all: ${STAGING_WAIT} staging
.endif
.if exists(${.PARSEDIR}/stage-install.sh) && !defined(STAGE_INSTALL)
# this will run install(1) and then followup with .dirdep files.

View File

@ -1,4 +1,4 @@
# $Id: meta.sys.mk,v 1.20 2014/08/04 05:12:27 sjg Exp $
# $Id: meta.sys.mk,v 1.21 2015/06/01 22:43:49 sjg Exp $
#
# @(#) Copyright (c) 2010, Simon J. Gerraty
@ -108,11 +108,16 @@ _metaError: .NOMETA .NOTMAIN
.if ${.MAKE.MODE:Mmeta*} != ""
MKDEP_MK = meta.autodep.mk
# if we think we are updating dependencies,
# then filemon had better be present
.if ${UPDATE_DEPENDFILE:Uyes:tl} != "no" && !exists(/dev/filemon)
.if ${UPDATE_DEPENDFILE:Uyes:tl} != "no"
.if ${.MAKEFLAGS:Uno:M-k} != ""
# make this more obvious
.warning Setting UPDATE_DEPENDFILE=NO due to -k
UPDATE_DEPENDFILE= NO
.export UPDATE_DEPENDFILE
.elif !exists(/dev/filemon)
.error ${.newline}ERROR: The filemon module (/dev/filemon) is not loaded.
.endif
.endif
.if ${.MAKE.LEVEL} == 0
# make sure dirdeps target exists and do it first

Some files were not shown because too many files have changed in this diff Show More