NetBSD/usr.sbin/mtree/Makefile

20 lines
468 B
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.21 2001/11/10 07:10:11 lukem Exp $
1997-10-17 09:24:29 +04:00
# from: @(#)Makefile 8.2 (Berkeley) 4/27/95
1993-03-21 12:45:37 +03:00
PROG= mtree
1997-10-25 10:57:53 +04:00
#CPPFLAGS+=-DDEBUG
1994-12-22 14:32:57 +03:00
MAN= mtree.8
User interface changes from (or inspired by) FreeBSD: - Add -L to walk the tree `logically', by following symbolic links in the heirarchy. - Add -P to walk the tree `physically'. This is the current behaviour, and the default. - Add "-X excludes-file" to give mtree the ability to exclude files and directories from its traversal. excludes-file contains fnmatch(3) patterns to exclude from the walk. - Add "md5digest" synonym for "md5". - Add "rmd160" keyword for RMD-160 message digest, and "rmd160digest" synonym. - Add "sha1" keyword for SHA-1 message digest, and "sha1digest" synonym. - Don't try to compare() other attributes if the type doesn't match; it's nothing but trouble, and no use anyway. - In -c, only emit "/set" records if something has changed since the previous one. User interface changes by me: - Check a device's parameters before checking uid/gid/mode. - If updating (-u), modify the following to match the specification: - Device type (retaining existing ownership). - Symlink target. Fixes from (or inspired by) FreeBSD: - Use p->ftslevel instead of own code to keep track of the level ourself. The previous code got majorly confused if fts(3) couldn't descend into a subdir, resulting in leaf nodes getting attached to the wrong directory. XXX: This new method is much much more robust, even though it's not 100% perfect; it might result in a couple of following entries in the spec to be incorrectly tagged as missing. - Pass a useful pathname to rlink(), so that logical (-L) traversal doesn't confuse symlink checking. - Consistently use MAXPATHLEN+1 sized buffers for pathnames, so that there's room for the NUL. - Use mtree_err() and strerror(p->fts_errno) to report errors during the fts(3) walk. Fixes by me: - Remove now-unused `const char *name' argument from compare(). - Change crc_total from an int to a u_int32_t, to match usr.bin/cksum/crc.c. - Remove trailing whitespace. - Remove unnecessary (void) casts on functions. - Reorder entries in the getopt() switch. - Replace strtoq() with strtoll(), and use strtoul() appropriately. - Renumber F_ flags to be in alphabetical order.
2001-11-07 11:01:51 +03:00
SRCS= compare.c crc.c create.c excludes.c misc.c mtree.c spec.c verify.c \
stat_flags.c pack_dev.c
WARNS?= 2
LDADD+= -lutil
DPADD+= ${LIBUTIL}
CPPFLAGS+= -I${.CURDIR}/../../bin/ls -I${.CURDIR}/../../sbin/mknod
.PATH: ${.CURDIR}/../../bin/ls ${.CURDIR}/../../sbin/mknod
1993-03-21 12:45:37 +03:00
.ifndef HOSTPROG
1993-03-21 12:45:37 +03:00
.include <bsd.prog.mk>
.endif