diff options
author | asami <asami@FreeBSD.org> | 1997-08-20 03:44:14 +0000 |
---|---|---|
committer | asami <asami@FreeBSD.org> | 1997-08-20 03:44:14 +0000 |
commit | 4eef9897c4d8209710b6ff379252a5c911a3d7dc (patch) | |
tree | c2bfa0794bb5f49d4c75df4bcfe8a1c92ba1d58c /share | |
parent | 0408a54150aef9f1012a3152e885933d588d478c (diff) | |
download | FreeBSD-src-4eef9897c4d8209710b6ff379252a5c911a3d7dc.zip FreeBSD-src-4eef9897c4d8209710b6ff379252a5c911a3d7dc.tar.gz |
(1) Be nicer about mtree file missing. (Actually, just suggest where
you can get one from.)
(2) Use "reinstall" as DEPENDS_TARGET if target is "reinstall". In
particular, this will make it possible to do a "make reinstall" on
several NFS clients and have them install all dependencies
correctly.
Tested by: davidn
Diffstat (limited to 'share')
-rw-r--r-- | share/mk/bsd.port.mk | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/share/mk/bsd.port.mk b/share/mk/bsd.port.mk index 9e244f7..ea02f3e 100644 --- a/share/mk/bsd.port.mk +++ b/share/mk/bsd.port.mk @@ -1,7 +1,7 @@ #-*- mode: Fundamental; tab-width: 4; -*- # ex:ts=4 # -# $Id: bsd.port.mk,v 1.262 1997/07/10 02:29:51 asami Exp $ +# $Id: bsd.port.mk,v 1.263 1997/07/17 17:47:36 markm Exp $ # $NetBSD: $ # # bsd.port.mk - 940820 Jordan K. Hubbard. @@ -791,8 +791,12 @@ all: build .endif .if !defined(DEPENDS_TARGET) +.if make(reinstall) +DEPENDS_TARGET= reinstall +.else DEPENDS_TARGET= install .endif +.endif ################################################################ # The following are used to create easy dummy targets for @@ -1113,7 +1117,13 @@ _PORT_USE: .USE .if make(real-install) .if !defined(NO_MTREE) @if [ `id -u` = 0 ]; then \ - ${MTREE_CMD} ${MTREE_ARGS} ${PREFIX}/; \ + if [ ! -f ${MTREE_FILE} ]; then \ + ${ECHO_MSG} "Error: mtree file \"${MTREE_FILE}\" is missing."; \ + ${ECHO_MSG} "Copy it from a suitable location (e.g., /usr/src/etc/mtree) and try again."; \ + exit 1; \ + else \ + ${MTREE_CMD} ${MTREE_ARGS} ${PREFIX}/; \ + fi; \ else \ ${ECHO_MSG} "Warning: not superuser, can't run mtree."; \ ${ECHO_MSG} "Become root and try again to ensure correct permissions."; \ @@ -1252,7 +1262,7 @@ checkpatch: .if !target(reinstall) reinstall: @${RM} -f ${INSTALL_COOKIE} ${PACKAGE_COOKIE} - @${MAKE} install + @DEPENDS_TARGET=${DEPENDS_TARGET} ${MAKE} install .endif ################################################################ |