Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Nov 2018 06:47:21 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r340112 - head/etc
Message-ID:  <201811040647.wA46lLQp003718@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Sun Nov  4 06:47:21 2018
New Revision: 340112
URL: https://svnweb.freebsd.org/changeset/base/340112

Log:
  Simplify a bit distrib-dirs target
  
  Reviewed by:	bdrewery
  Differential Revision:	https://reviews.freebsd.org/D3915

Modified:
  head/etc/Makefile

Modified: head/etc/Makefile
==============================================================================
--- head/etc/Makefile	Sun Nov  4 06:39:01 2018	(r340111)
+++ head/etc/Makefile	Sun Nov  4 06:47:21 2018	(r340112)
@@ -157,35 +157,29 @@ distrib-cleanup: .PHONY
 	done
 
 distrib-dirs: ${MTREES:N/*} distrib-cleanup .PHONY
-	@set ${MTREES}; \
-	while test $$# -ge 2; do \
-		m=${.CURDIR}/$$1; \
-		shift; \
-		d=${DESTDIR}$$1; \
-		shift; \
-		test -d $$d || mkdir -p $$d; \
-		${ECHO} ${MTREE_CMD} -deU ${MTREE_FSCHG} \
-		    ${MTREE_FOLLOWS_SYMLINKS} -f $$m -p $$d; \
-		${MTREE_FILTER} $$m | \
-		${MTREE_CMD} -deU ${MTREE_FSCHG} ${MTREE_FOLLOWS_SYMLINKS} \
-		    -p $$d; \
-	done; true
+.for _m _d in ${MTREES}
+	@m=${.CURDIR}/${_m}; \
+	d=${DESTDIR}${_d}; \
+	test -d $$d || mkdir -p $$d; \
+	${ECHO} ${MTREE_CMD} -deU ${MTREE_FSCHG} \
+	    ${MTREE_FOLLOWS_SYMLINKS} -f $$m -p $$d; \
+	${MTREE_FILTER} $$m | \
+	${MTREE_CMD} -deU ${MTREE_FSCHG} ${MTREE_FOLLOWS_SYMLINKS} \
+	    -p $$d; \
+.endfor
 .if defined(NO_ROOT)
-	@set ${MTREES}; \
-	while test $$# -ge 2; do \
-		m=${.CURDIR}/$$1; \
-		shift; \
-		d=$$1; \
-		test "$$d" == "/" && d=""; \
-		d=${DISTBASE}$$d; \
-		shift; \
-		test -d ${DESTDIR}/$$d || mkdir -p ${DESTDIR}/$$d; \
-		${ECHO} "${MTREE_CMD:N-W} -C -f $$m -K all | " \
-		    "sed s#^\.#.$$d# | ${METALOG.add}" ; \
-		${MTREE_FILTER} $$m | \
-		${MTREE_CMD:N-W} -C -K all | sed s#^\.#.$$d# | \
-		    ${METALOG.add} ; \
-	done; true
+.for _m _d in ${MTREES}
+	@m=${.CURDIR}/${_m}; \
+	d=${_d}; \
+	test "$$d" == "/" && d=""; \
+	d=${DISTBASE}$$d; \
+	test -d ${DESTDIR}/$$d || mkdir -p ${DESTDIR}/$$d; \
+	${ECHO} "${MTREE_CMD:N-W} -C -f $$m -K all | " \
+	    "sed s#^\.#.$$d# | ${METALOG.add}" ; \
+	${MTREE_FILTER} $$m | \
+	${MTREE_CMD:N-W} -C -K all | sed s#^\.#.$$d# | \
+	    ${METALOG.add} ; \
+.endfor
 .endif
 .if ${MK_NLS} != "no"
 	set - `grep "^[a-zA-Z]" ${.CURDIR}/nls.alias`; \



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201811040647.wA46lLQp003718>