From owner-svn-src-all@FreeBSD.ORG Tue Aug 21 05:39:48 2012 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D9747106564A; Tue, 21 Aug 2012 05:39:48 +0000 (UTC) (envelope-from sjg@juniper.net) Received: from exprod7og105.obsmtp.com (exprod7og105.obsmtp.com [64.18.2.163]) by mx1.freebsd.org (Postfix) with ESMTP id 4173B8FC08; Tue, 21 Aug 2012 05:39:46 +0000 (UTC) Received: from P-EMHUB02-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob105.postini.com ([64.18.6.12]) with SMTP ID DSNKUDMfIVaMn9lfTwDUVXYGhzqr/yn0H0Tf@postini.com; Mon, 20 Aug 2012 22:39:47 PDT Received: from magenta.juniper.net (172.17.27.123) by P-EMHUB02-HQ.jnpr.net (172.24.192.33) with Microsoft SMTP Server (TLS) id 8.3.213.0; Mon, 20 Aug 2012 22:35:20 -0700 Received: from chaos.jnpr.net (chaos.jnpr.net [172.24.29.229]) by magenta.juniper.net (8.11.3/8.11.3) with ESMTP id q7L5ZKh69766; Mon, 20 Aug 2012 22:35:20 -0700 (PDT) (envelope-from sjg@juniper.net) Received: from chaos.jnpr.net (localhost [127.0.0.1]) by chaos.jnpr.net (Postfix) with ESMTP id BD5A158085; Mon, 20 Aug 2012 22:35:19 -0700 (PDT) To: Ruslan Ermilov In-Reply-To: <20120726084903.GA48240@lo0.su> References: <201207180557.q6I5vheM034018@svn.freebsd.org> <20120726084903.GA48240@lo0.su> Comments: In-reply-to: Ruslan Ermilov message dated "Thu, 26 Jul 2012 12:49:03 +0400." From: "Simon J. Gerraty" X-Mailer: MH-E 7.82+cvs; nmh 1.3; GNU Emacs 22.3.1 Date: Mon, 20 Aug 2012 22:35:19 -0700 Message-ID: <20120821053519.BD5A158085@chaos.jnpr.net> MIME-Version: 1.0 Content-Type: text/plain Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, "David E. O'Brien" , sjg@juniper.net Subject: Re: svn commit: r238563 - head/gnu/usr.bin/groff/tmac X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Aug 2012 05:39:48 -0000 Hi, sorry about the slow response. On Thu, 26 Jul 2012 12:49:03 +0400, Ruslan Ermilov writes: >On Wed, Jul 18, 2012 at 05:57:43AM +0000, David E. O'Brien wrote: >> Author: obrien >> Date: Wed Jul 18 05:57:42 2012 >> New Revision: 238563 >> URL: http://svn.freebsd.org/changeset/base/238563 >> >> Log: >> a ";" tells make we want the shell to be used >> >> Submitted by: Simon Gerraty >> >> Modified: >> head/gnu/usr.bin/groff/tmac/Makefile > >I don't quite understand what this change does, could you elaborate? Sure. This is a consequence of bmake trying to be clever. >Without -jN (in backwards compatibility mode), the "cd" is a no-op >(whether it's terminated by `;' or not) because make will execute a >single shell per command, with cwd set to ${.OBJDIR}. Except on very weird systems, bmake is built in what NetBSD call "native" mode, and even in compat mode will attempt to avoid the overhead of all those shells. Thus, unless it spots a shell meta char, it will try and skip the shell. Shell builtins like 'cd' or 'chdir' cannot be directly invoked, but make doesn't know that. Simply adding the ';' convinces it to use a shell. It is still a no-op. >With -jN, "cd" becomes necessary because all commands are executed as >a script by one shell (the reason it was added in the first place), >but adding `;' is a no-op because commands are on separate lines. A better way to construct targets like this is to put any excursion out of .OBJDIR inside (): (cd ${.CURDIR} && \ ${INSTALL} -o ${TMACOWN} -g ${TMACGRP} -m ${TMACMODE} \ koi8-r.tmac hyphen.ru ${DESTDIR}${TMACDIR}) then the cd ${.OBJDIR} isn't needed at all. note use of && rather than ; which can be very dangerous --sjg