svn commit: r245634 - in projects/mtree: . etc

Brooks Davis brooks at FreeBSD.org
Fri Jan 18 23:59:23 UTC 2013


Author: brooks
Date: Fri Jan 18 23:59:22 2013
New Revision: 245634
URL: http://svnweb.freebsd.org/changeset/base/245634

Log:
  Move a few bits around so NO_ROOT is more concentrated in the makefile.
  A few minor cleanups.

Modified:
  projects/mtree/Makefile.inc1
  projects/mtree/etc/Makefile

Modified: projects/mtree/Makefile.inc1
==============================================================================
--- projects/mtree/Makefile.inc1	Fri Jan 18 23:54:27 2013	(r245633)
+++ projects/mtree/Makefile.inc1	Fri Jan 18 23:59:22 2013	(r245634)
@@ -350,13 +350,6 @@ LIB32IMAKE=	${LIB32WMAKE:NINSTALL=*:NDES
 		${IMAKE_INSTALL}
 .endif
 
-.if defined(NO_ROOT)
-METALOG?=	${DESTDIR}/${DISTDIR}/METALOG
-INSTALL_DDIR=	${DESTDIR}/${DISTDIR}
-INSTALLFLAGS=	-U -M ${METALOG} -D ${INSTALL_DDIR:S://:/:g:S:${DISTBASE}$$::}
-MTREEFLAGS=	-W
-.endif
-
 IMAKEENV=	${CROSSENV:N_LDSCRIPTROOT=*}
 IMAKE=		${IMAKEENV} ${MAKE} -f Makefile.inc1 \
 		${IMAKE_INSTALL} ${IMAKE_MTREE}
@@ -368,12 +361,20 @@ IMAKE+=		__MAKE_SHELL=${INSTALLTMP}/sh
 .else
 IMAKEENV+=	PATH=${TMPPATH}:${INSTALLTMP}
 .endif
+.if defined(DB_FROM_SRC)
+INSTALLFLAGS+=	-N ${.CURDIR}/etc
+MTREEFLAGS+=	-N ${.CURDIR}/etc
+.endif
 .if defined(NO_ROOT)
+METALOG?=	${DESTDIR}/${DISTDIR}/METALOG
 IMAKE+=		-DNO_ROOT METALOG=${METALOG}
+INSTALL_DDIR=	${DESTDIR}/${DISTDIR}
+INSTALLFLAGS+=	-U -M ${METALOG} -D ${INSTALL_DDIR:S://:/:g}
+MTREEFLAGS+=	-W
 .endif
 .if defined(DB_FROM_SRC) || defined(NO_ROOT)
-IMAKE_INSTALL=	INSTALL="install -N ${.CURDIR}/etc ${INSTALLFLAGS}"
-IMAKE_MTREE=	MTREE_CMD="nmtree -N ${.CURDIR}/etc ${MTREEFLAGS}"
+IMAKE_INSTALL=	INSTALL="install ${INSTALLFLAGS}"
+IMAKE_MTREE=	MTREE_CMD="nmtree ${MTREEFLAGS}"
 .endif
 
 # kernel stage
@@ -741,7 +742,7 @@ distributeworld installworld: installche
 	-mkdir ${DESTDIR}/${DISTDIR}/base
 	cd ${.CURDIR}/etc; ${CROSSENV} PATH=${TMPPATH} ${MAKE} \
 	    METALOG=${METALOG} ${IMAKE_INSTALL} ${IMAKE_MTREE} \
-	    DISTBASE=${DISTBASE} DESTDIR=${DESTDIR}/${DISTDIR}/base \
+	    DISTBASE=/base DESTDIR=${DESTDIR}/${DISTDIR}/base \
 	    LOCAL_MTREE=${LOCAL_MTREE} distrib-dirs
 .endif
 	${_+_}cd ${.CURDIR}; ${IMAKE} re${.TARGET:S/world$//}; \

Modified: projects/mtree/etc/Makefile
==============================================================================
--- projects/mtree/etc/Makefile	Fri Jan 18 23:54:27 2013	(r245633)
+++ projects/mtree/etc/Makefile	Fri Jan 18 23:59:22 2013	(r245634)
@@ -328,7 +328,6 @@ distrib-dirs:
 		${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f $$m -p $$d; \
 	done; true
 .if defined(NO_ROOT)
-	${ECHO} DISTBASE=${DISTBASE}
 	@set ${MTREES}; \
 	while test $$# -ge 2; do \
 		m=${.CURDIR}/$$1; \


More information about the svn-src-projects mailing list