summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorbrooks <brooks@FreeBSD.org>2013-01-09 21:07:08 +0000
committerbrooks <brooks@FreeBSD.org>2013-01-09 21:07:08 +0000
commit8ab7717e288b7ee92b94499b85a61b53eaece449 (patch)
tree0a67e5deea12a9f24841c71093ee658bdb79f011 /usr.sbin
parent20f8f82daf3917d7ace388a468798b6088fb2938 (diff)
downloadFreeBSD-src-8ab7717e288b7ee92b94499b85a61b53eaece449.zip
FreeBSD-src-8ab7717e288b7ee92b94499b85a61b53eaece449.tar.gz
Always install our mtree as /usr/sbin/fmtree and link it as
/usr/sbin/mtree by default. Add a src.conf option WITH_NMTREE that causes NetBSD's mtree to be linked as /usr/sbin/mtree as well as /usr/sbin/nmtree.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/mtree/Makefile16
-rw-r--r--usr.sbin/nmtree/Makefile7
2 files changed, 21 insertions, 2 deletions
diff --git a/usr.sbin/mtree/Makefile b/usr.sbin/mtree/Makefile
index cbc4fd9..c378455 100644
--- a/usr.sbin/mtree/Makefile
+++ b/usr.sbin/mtree/Makefile
@@ -1,10 +1,12 @@
# From: @(#)Makefile 8.1 (Berkeley) 6/6/93
# $FreeBSD$
+.include <bsd.own.mk>
+
.PATH: ${.CURDIR}/../../usr.bin/cksum
-PROG= mtree
-MAN= mtree.8 mtree.5
+PROG= fmtree
+MAN= fmtree.8 mtree.5
SRCS= compare.c crc.c create.c excludes.c misc.c mtree.c spec.c verify.c
SRCS+= specspec.c
@@ -12,4 +14,14 @@ CFLAGS+= -DMD5 -DSHA1 -DRMD160 -DSHA256
DPADD= ${LIBMD}
LDADD= -lmd
+.if ${MK_NMTREE} == "no"
+LINKS= ${BINDIR}/fmtree ${BINDIR}/mtree
+MLINKS= fmtree.8 mtree.8
+.endif
+
+CLEANFILES+= fmtree.8
+
+fmtree.8: mtree.8
+ cp ${.ALLSRC} ${.TARGET}
+
.include <bsd.prog.mk>
diff --git a/usr.sbin/nmtree/Makefile b/usr.sbin/nmtree/Makefile
index 58e46ea..1b8cc01 100644
--- a/usr.sbin/nmtree/Makefile
+++ b/usr.sbin/nmtree/Makefile
@@ -20,6 +20,13 @@ LIBNETBSD= ${LIBNETBSDDIR}/libnetbsd.a
DPADD+= ${LIBNETBSD}
LDADD+= ${LIBNETBSD}
+.if ${MK_NMTREE} != "no"
+LINKS= ${BINDIR}/nmtree ${BINDIR}/mtree
+MLINKS= nmtree.8 mtree.8
+.endif
+
+CLEANFILES+= nmtree.8
+
nmtree.8: mtree.8
cp ${.ALLSRC} ${.TARGET}
OpenPOWER on IntegriCloud