From owner-freebsd-hackers@FreeBSD.ORG Mon Jul 12 06:11:53 2010 Return-Path: Delivered-To: hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A540F1065672 for ; Mon, 12 Jul 2010 06:11:53 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from mail.vega.ru (mail.vega.ru [90.156.167.5]) by mx1.freebsd.org (Postfix) with ESMTP id 628388FC1A for ; Mon, 12 Jul 2010 06:11:53 +0000 (UTC) Received: from [10.100.124.99] (helo=edoofus.dev.vega.ru) by mail.vega.ru with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.71 (FreeBSD)) (envelope-from ) id 1OYC3z-000Fe5-AL; Mon, 12 Jul 2010 10:00:23 +0400 Date: Mon, 12 Jul 2010 09:59:33 +0400 From: Ruslan Ermilov To: Garrett Cooper Message-ID: <20100712055933.GA3885@edoofus.dev.vega.ru> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Cc: hackers@FreeBSD.org Subject: Re: [patch] SUBDIR_OVERRIDE `optimization' X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 06:11:53 -0000 On Fri, Jul 09, 2010 at 07:56:37AM -0700, Garrett Cooper wrote: > (Let's try this again with the right email address) >    Something simple that I noticed a while back when I was reviewing > the Makefile.inc1 code. The SUBDIR_OVERRIDE code is executed after the > conditional feature checks, which sets the value of SUBDIRS to the > user defined value. So instead of going through the conditionals, one > could just cut to the chase and set SUBDIRS to SUBDIRS_OVERRIDE, > otherwise detect the conditional directories to include in > Makefile.inc1. > Thanks! > -Garrett > > Index: Makefile.inc1 > =================================================================== > --- Makefile.inc1 (revision 209684) > +++ Makefile.inc1 (working copy) > @@ -41,6 +41,9 @@ > # use that new version. And the new (dynamically-linked) /bin/sh > # will expect to find appropriate libraries in /lib and /libexec. > # > +.if defined(SUBDIR_OVERRIDE) > +SUBDIR= ${SUBDIR_OVERRIDE} > +.else > SUBDIR= share/info lib libexec > SUBDIR+=bin > .if ${MK_GAMES} != "no" > @@ -79,8 +82,6 @@ > .endif > .endfor > > -.if defined(SUBDIR_OVERRIDE) > -SUBDIR= ${SUBDIR_OVERRIDE} > .endif > > .if defined(NOCLEAN) SUBDIR_OVERRIDE is mainly for FreeBSD src/ builders (to quickly check with "buildworld" a particular bit of a tree), and is thus rarely used, so this change would be an optimization for the uncommon case. Having said that, I don't mind if you commit it, if you like. Cheers, -- Ruslan Ermilov ru@FreeBSD.org FreeBSD committer