Re: [patch] SUBDIR_OVERRIDE `optimization'

2010-07-11 Thread Ruslan Ermilov
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
r...@freebsd.org
FreeBSD committer
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"


Re: [patch] SUBDIR_OVERRIDE `optimization'

2010-07-09 Thread Garrett Cooper
(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)
___
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"