From owner-svn-src-head@FreeBSD.ORG Tue Oct 29 21:07:28 2013 Return-Path: Delivered-To: svn-src-head@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 E0B117C4; Tue, 29 Oct 2013 21:07:28 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-ob0-x22f.google.com (mail-ob0-x22f.google.com [IPv6:2607:f8b0:4003:c01::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7AAFA278D; Tue, 29 Oct 2013 21:07:28 +0000 (UTC) Received: by mail-ob0-f175.google.com with SMTP id wm4so529342obc.20 for ; Tue, 29 Oct 2013 14:07:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Tg1KCW9DmhQco0ovmeM5aG5VaB4xFHMIrCTnClLNQPg=; b=Wj9ruTh8grXwNvzy46Iz9TiW3NFoqOCy+SeRCb7vCYE7P85kBEU0rW9TeMAAiyobYE NgA8p4Yp6eIo5Bdf0++i2GxNCwHwzFWlFZgtkZW20J9CIqO9UPTxLyo7YRboAdmrFaWy jjc72HcQFWMpgd1Zo8hGh8vNY1zMmSCVr0gRjgPKquYc5C+23vtJtSAoqDqBiR2xLRIb Qp2spYG846ThRDvaY7iz7i/XDBBGXR6tylpYv7mkSFNVXaAG5Y+EY8vfCQFDZsftuJzY xrKzNEoPssgnQPy9Zd/s6q3sRB8yG2gVAWjUnSMihr+G3KylYUswBiq4U4EinyrerEwl a5+A== MIME-Version: 1.0 X-Received: by 10.60.52.1 with SMTP id p1mr1221387oeo.41.1383080847702; Tue, 29 Oct 2013 14:07:27 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.182.110.195 with HTTP; Tue, 29 Oct 2013 14:07:27 -0700 (PDT) In-Reply-To: <201310291746.r9THkR6D065382@svn.freebsd.org> References: <201310291746.r9THkR6D065382@svn.freebsd.org> Date: Tue, 29 Oct 2013 14:07:27 -0700 X-Google-Sender-Auth: nyNstsGq-AffkXIUpMOXUebHRzM Message-ID: Subject: Re: svn commit: r257350 - head From: Matthew Fleming To: Xin LI Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Oct 2013 21:07:29 -0000 On Tue, Oct 29, 2013 at 10:46 AM, Xin LI wrote: > Author: delphij > Date: Tue Oct 29 17:46:26 2013 > New Revision: 257350 > URL: http://svnweb.freebsd.org/changeset/base/257350 > > Log: > 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. > > Tested by: gjb > MFC after: 5 days > > Modified: > head/Makefile.inc1 > > Modified: head/Makefile.inc1 > > ============================================================================== > --- head/Makefile.inc1 Tue Oct 29 17:38:13 2013 (r257349) > +++ head/Makefile.inc1 Tue Oct 29 17:46:26 2013 (r257350) > @@ -1686,6 +1686,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 | \ > Here and below, wouldn't passing -C {.CURDIR} to make be safer? I admit I don't know make that well, so I may be wrong here. Thanks, matthew