From owner-freebsd-hackers@FreeBSD.ORG Fri Jul 9 14:56:39 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 4ADCD106566C; Fri, 9 Jul 2010 14:56:39 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-iw0-f182.google.com (mail-iw0-f182.google.com [209.85.214.182]) by mx1.freebsd.org (Postfix) with ESMTP id 0174F8FC13; Fri, 9 Jul 2010 14:56:38 +0000 (UTC) Received: by iwn35 with SMTP id 35so2798083iwn.13 for ; Fri, 09 Jul 2010 07:56:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=fMBKbb8R5q3xVx/POFfLK+TzQQHiz5kuxrNilX0Jmn4=; b=oMvlb5NUm9fDph/eDD0l2TiEfKjebyQckUj0h+u2ybqKqnERUru74ky6SGZ+B4kkwL RHC00yHb4DEO+qAWJVXhM1Z2MEksNMB58pZNRjZQpCV5952Lm4vHLGDrCbj9gl9Qhwrn 0SCYRXtetbv/qEBEEHwQ40kCH35lN/yD7/j6o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=Pz02Hvyn5NEMiTjH0wu53VZPm4vGQkCZR8Oxhd8zTQaADvbRQXwf2Aa1anrkGXmhpi U7SbtBT1C7Yw8izqehUN147btAHyp5tgHZxyI9gDc0zZCNEeaWvggyZPcL+joVcJWx4k ZXhaBrGCc/+S/Z0iElaamXBr5op2+KVFo0qpQ= MIME-Version: 1.0 Received: by 10.231.193.11 with SMTP id ds11mr9720653ibb.192.1278687397509; Fri, 09 Jul 2010 07:56:37 -0700 (PDT) Sender: yanegomi@gmail.com Received: by 10.231.214.145 with HTTP; Fri, 9 Jul 2010 07:56:37 -0700 (PDT) In-Reply-To: References: Date: Fri, 9 Jul 2010 07:56:37 -0700 X-Google-Sender-Auth: g2OhCWWqH1UAiHIsW3_4Y3b1lr4 Message-ID: From: Garrett Cooper To: hackers@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: 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: Fri, 09 Jul 2010 14:56:39 -0000 (Let's try this again with the right email address) =A0 =A0Something 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- 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=3D ${SUBDIR_OVERRIDE} +.else SUBDIR=3D share/info lib libexec SUBDIR+=3Dbin .if ${MK_GAMES} !=3D "no" @@ -79,8 +82,6 @@ .endif .endfor -.if defined(SUBDIR_OVERRIDE) -SUBDIR=3D ${SUBDIR_OVERRIDE} .endif .if defined(NOCLEAN)