Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 4 Oct 2013 16:43:14 +0000 (UTC)
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r329337 - head/Mk
Message-ID:  <201310041643.r94GhE8G096130@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bapt
Date: Fri Oct  4 16:43:13 2013
New Revision: 329337
URL: http://svnweb.freebsd.org/changeset/ports/329337

Log:
  MTREE_FILE is not yet defined bsd.stage.mk is parsed let the shell script test it.

Modified:
  head/Mk/bsd.stage.mk

Modified: head/Mk/bsd.stage.mk
==============================================================================
--- head/Mk/bsd.stage.mk	Fri Oct  4 16:38:03 2013	(r329336)
+++ head/Mk/bsd.stage.mk	Fri Oct  4 16:43:13 2013	(r329337)
@@ -72,14 +72,11 @@ add-plist-info:
 
 .if !target(makeplist)
 makeplist: stage
-.if !empty(MTREE_FILE)
-	@{ ${ECHO_CMD} "#mtree"; ${CAT} ${MTREE_FILE}; } | ${TAR} tf - | \
+	@if [ -n "${MTREE_FILE}" ]; then \
+	{ ${ECHO_CMD} "#mtree"; ${CAT} ${MTREE_FILE}; } | ${TAR} tf - | \
 		awk '{ sub(/^\.$$/, "", $$1); \
-		if ($$1 == "") print "${PREFIX}"; else print "${PREFIX}/"$$1; }' \
-		> ${WRKDIR}/.mtree
-.else
-	@: > ${WRKDIR}/.mtree
-.endif
+		if ($$1 == "") print "${PREFIX}"; else print "${PREFIX}/"$$1; }' ; \
+	fi > ${WRKDIR}/.mtree
 	@a=${PREFIX}; \
 		while :; do \
 			a=$${a%/*} ; \
@@ -123,14 +120,11 @@ check-orphans: stage
 		*) ${ECHO_CMD} $$cwd/$$line ;; \
 		esac ; \
 	done < ${TMPPLIST} > ${WRKDIR}/.expanded-plist
-.if !empty(MTREE_FILE)
-	@{ ${ECHO_CMD} "#mtree"; ${CAT} ${MTREE_FILE}; } | ${TAR} tf - | \
+	@if [ -n "${MTREE_FILE}" ]; then \
+		{ ${ECHO_CMD} "#mtree"; ${CAT} ${MTREE_FILE}; } | ${TAR} tf - | \
 		awk '{ sub(/^\.$$/, "", $$1); \
-		if ($$1 == "") print "${PREFIX}"; else print "${PREFIX}/"$$1; }' \
-		> ${WRKDIR}/.mtree
-.else
-	@: > ${WRKDIR}/.mtree
-.endif
+		if ($$1 == "") print "${PREFIX}"; else print "${PREFIX}/"$$1; }' ; \
+	fi > ${WRKDIR}/.mtree
 	@a=${PREFIX}; \
 		while :; do \
 			a=$${a%/*} ; \



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