From owner-svn-src-stable@FreeBSD.ORG Sun Nov 3 07:31:55 2013 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id F118ACF; Sun, 3 Nov 2013 07:31:54 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CE3F02192; Sun, 3 Nov 2013 07:31:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rA37VsUd060104; Sun, 3 Nov 2013 07:31:54 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id rA37Vsjx060103; Sun, 3 Nov 2013 07:31:54 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201311030731.rA37Vsjx060103@svn.freebsd.org> From: Xin LI Date: Sun, 3 Nov 2013 07:31:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r257563 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Nov 2013 07:31:55 -0000 Author: delphij Date: Sun Nov 3 07:31:54 2013 New Revision: 257563 URL: http://svnweb.freebsd.org/changeset/base/257563 Log: MFC r257350: In r257079, SRCDIR is pointed to ${.CURDIR} when not set. However, Makefile.inc1 is being called in sub-make's where make(1) would, by default, implicitly chdir(2) to ${.OBJDIR} before executing any targets. This would make some targets, like delete-old, when trying to derive various variables introduced by change r256921 using ``make -f Makefile.inc1'' that also rely on SRCDIR to fail. This changeset adds an explicit cd ${.CURDIR} before these unwrapped make calls, making them in line with the other ones that are already being wrapped with the explicit chdir's. Approved by: re (hrs) Modified: stable/10/Makefile.inc1 (contents, props changed) Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Sat Nov 2 23:20:56 2013 (r257562) +++ stable/10/Makefile.inc1 Sun Nov 3 07:31:54 2013 (r257563) @@ -1679,6 +1679,7 @@ delete-old-files: # argument list will get too long. Using .for/.endfor make "loops" will make # the Makefile parser segfault. @exec 3<&0; \ + cd ${.CURDIR}; \ ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ -V OLD_FILES -V "OLD_FILES:Musr/share/*.gz:R" | xargs -n1 | \ while read file; do \ @@ -1701,7 +1702,8 @@ delete-old-files: check-old-files: @echo ">>> Checking for old files" - @${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ + @cd ${.CURDIR}; \ + ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ -V OLD_FILES -V "OLD_FILES:Musr/share/*.gz:R" | xargs -n1 | \ while read file; do \ if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \ @@ -1722,6 +1724,7 @@ delete-old-libs: @echo ">>> Removing old libraries" @echo "${OLD_LIBS_MESSAGE}" | fmt @exec 3<&0; \ + cd ${.CURDIR}; \ ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ -V OLD_LIBS | xargs -n1 | \ while read file; do \ @@ -1741,7 +1744,8 @@ delete-old-libs: check-old-libs: @echo ">>> Checking for old libraries" - @${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ + @cd ${.CURDIR}; \ + ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ -V OLD_LIBS | xargs -n1 | \ while read file; do \ if [ -f "${DESTDIR}/$${file}" -o -L "${DESTDIR}/$${file}" ]; then \ @@ -1756,7 +1760,8 @@ check-old-libs: delete-old-dirs: @echo ">>> Removing old directories" - @${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ + @cd ${.CURDIR}; \ + ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ -V OLD_DIRS | xargs -n1 | sort -r | \ while read dir; do \ if [ -d "${DESTDIR}/$${dir}" ]; then \ @@ -1769,7 +1774,8 @@ delete-old-dirs: check-old-dirs: @echo ">>> Checking for old directories" - @${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ + @cd ${.CURDIR}; \ + ${MAKE} -f ${.CURDIR}/Makefile.inc1 ${.MAKEFLAGS} ${.TARGET} \ -V OLD_DIRS | xargs -n1 | \ while read dir; do \ if [ -d "${DESTDIR}/$${dir}" ]; then \