From nobody@FreeBSD.org  Mon Dec  3 02:25:13 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 34E5FBA8
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  3 Dec 2012 02:25:13 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 1CBA48FC08
	for <freebsd-gnats-submit@FreeBSD.org>; Mon,  3 Dec 2012 02:25:13 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id qB32PCKK063192
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 3 Dec 2012 02:25:12 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id qB32PC6T063191;
	Mon, 3 Dec 2012 02:25:12 GMT
	(envelope-from nobody)
Message-Id: <201212030225.qB32PC6T063191@red.freebsd.org>
Date: Mon, 3 Dec 2012 02:25:12 GMT
From: Garrett Cooper <yaneurabeya@gmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] optimize SUBDIR_OVERRIDE in Makefile.inc1
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         174071
>Category:       conf
>Synopsis:       [build] [patch] optimize SUBDIR_OVERRIDE in Makefile.inc1
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 03 02:30:00 UTC 2012
>Closed-Date:    Thu Aug 29 20:54:37 CDT 2013
>Last-Modified:  Thu Aug 29 20:54:37 CDT 2013
>Originator:     Garrett Cooper
>Release:        n/a
>Organization:
EMC Isilon
>Environment:
n/a
>Description:
The attached patch optimizes SUBDIR_OVERRIDE so SUBDIRs aren't automatically defined if SUBDIR_OVERRIDE is defined.

Something I submitted many moons ago on hackers@ that never made it into base.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: Makefile.inc1
===================================================================
--- Makefile.inc1	(revision 243802)
+++ Makefile.inc1	(working copy)
@@ -59,6 +59,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"
@@ -97,9 +100,6 @@
 SUBDIR+= ${_DIR}
 .endif
 .endfor
-
-.if defined(SUBDIR_OVERRIDE)
-SUBDIR=		${SUBDIR_OVERRIDE}
 .endif
 
 .if defined(NOCLEAN)


>Release-Note:
>Audit-Trail:

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: conf/174071: commit references a PR
Date: Wed,  1 May 2013 09:56:16 +0000 (UTC)

 Author: benno
 Date: Wed May  1 09:56:09 2013
 New Revision: 250143
 URL: http://svnweb.freebsd.org/changeset/base/250143
 
 Log:
   Optimize SUBDIR_OVERRIDE such that SUBDIR isn't automatically defined if
   SUBDIR_OVERRIDE is defined.
   
   PR:		conf/174071
   Submitted by:	Garrett Cooper <yaneurabeya@gmail.com>
   Sponsored by:	EMC / Isilon Storage Division
 
 Modified:
   head/Makefile.inc1
 
 Modified: head/Makefile.inc1
 ==============================================================================
 --- head/Makefile.inc1	Wed May  1 09:20:13 2013	(r250142)
 +++ head/Makefile.inc1	Wed May  1 09:56:09 2013	(r250143)
 @@ -58,6 +58,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"
 @@ -96,9 +99,6 @@ SUBDIR+=etc
  SUBDIR+= ${_DIR}
  .endif
  .endfor
 -
 -.if defined(SUBDIR_OVERRIDE)
 -SUBDIR=		${SUBDIR_OVERRIDE}
  .endif
  
  .if defined(NOCLEAN)
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: bdrewery 
State-Changed-When: Thu Aug 29 20:54:36 CDT 2013 
State-Changed-Why:  
Committed in r250143 by benno 

http://www.freebsd.org/cgi/query-pr.cgi?pr=174071 
>Unformatted:
