[patch] SUBDIR_OVERRIDE `optimization'

Garrett Cooper gcooper at FreeBSD.org
Fri Jul 9 14:56:39 UTC 2010


(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)


More information about the freebsd-hackers mailing list