From owner-svn-ports-head@FreeBSD.ORG Wed May 22 11:28:37 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 9B0ACBCE; Wed, 22 May 2013 11:28:37 +0000 (UTC) Date: Wed, 22 May 2013 11:28:37 +0000 From: Alexey Dokuchaev To: Boris Samorodov Subject: Re: svn commit: r318592 - head/benchmarks/mdtest Message-ID: <20130522112837.GA54767@FreeBSD.org> References: <201305201043.r4KAhCKv031239@svn.freebsd.org> <20130521023448.GA3541@FreeBSD.org> <519BA0B0.7010700@passap.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <519BA0B0.7010700@passap.ru> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, Boris Samorodov , ports-committers@freebsd.org X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 May 2013 11:28:37 -0000 On Tue, May 21, 2013 at 08:28:32PM +0400, Boris Samorodov wrote: > First of all this particular commit was not a blind one. And I suspected > that a discussion may take place. Noted, sorry; actually, I was not implying you. > Then I'd say that for me the current state of Makefile is more readable > and more logical: > ----- > do-build: > (cd ${WRKSRC} && ${MPICC} ${CFLAGS} -o ${PORTNAME} ${PORTNAME}.c > -lm) > > do-install: > (cd ${WRKSRC} && ${INSTALL_PROGRAM} ${PORTNAME} ${PREFIX}/bin) > (cd ${WRKSRC} && ${INSTALL_MAN} ${PORTNAME}.1 ${MANPREFIX}/man/man1) These examples are not quite the same: compiler will generate the file in (relative to) the current directory unless given absolute name, thus here cd is slightly less useless: it helps to void specifying ${WRKSRC} twice: "... -o ${WRKSRC}/${PORTNAME} ${WRKSRC}/${PORTNAME}.c". Same goes for complicated targets like do-configure and do-build: there are probably configure scripts that silently, bogusly assume that they would be run from the current directory, given how widespread was "./configure && make && make install" mantra in the old days. Now, speaking of single INSTALL_* or CP command, preceding cd'ing does no real good: it does not shorten command line (cf. the MPICC example above), it does not help readability (only sabotages it), it makes two commands out of one, and safety braces would require a subshell spawn. If there would be several source files in the args, I could agree, but it's hardly worth for single one (like in the ones quoted). ./danfe