From nobody@FreeBSD.org  Tue Mar 27 05:53:46 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 366A937B718
	for <freebsd-gnats-submit@FreeBSD.org>; Tue, 27 Mar 2001 05:53:46 -0800 (PST)
	(envelope-from nobody@FreeBSD.org)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.1/8.11.1) id f2RDrkv82409;
	Tue, 27 Mar 2001 05:53:46 -0800 (PST)
	(envelope-from nobody)
Message-Id: <200103271353.f2RDrkv82409@freefall.freebsd.org>
Date: Tue, 27 Mar 2001 05:53:46 -0800 (PST)
From: kway@wgate.com
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] There is no make.conf equivalent to ${rc_conf_files}
X-Send-Pr-Version: www-1.0

>Number:         26145
>Category:       conf
>Synopsis:       [PATCH] There is no make.conf equivalent to ${rc_conf_files}
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Tue Mar 27 06:00:01 PST 2001
>Closed-Date:    Fri Dec 20 08:58:03 PST 2002
>Last-Modified:  Fri Dec 20 08:58:03 PST 2002
>Originator:     Kevin Way
>Release:        5.0-CURRENT
>Organization:
WorldGate Communications
>Environment:
FreeBSD mymachine.mydomain 5.0-CURRENT FreeBSD 5.0-CURRENT #0: Mon Mar 26 16:03:07 EST 2001     me@mymachine.mydomain:/usr/obj/usr/src/sys/WGAT-DESKTOP  i386
>Description:
make.conf does not provide a knob equivalent to rc_conf_files to allow the use of alternate make.conf files.  This is particularly useful on 'builder' machines where one might which to use very different options for different builds.
>How-To-Repeat:

>Fix:
--- /etc/defaults/make.conf.orig        Tue Mar 27 08:24:47 2001
+++ /etc/defaults/make.conf     Tue Mar 27 08:51:13 2001
@@ -364,3 +364,9 @@
 #SENDMAIL_LDFLAGS=
 #SENDMAIL_LDADD=
 #SENDMAIL_DPADD=
+
+# The ${MAKECONF} files should only contain values which override values
+# set in this file.  This eases the upgrade path when defaults are changed
+# and new features are added.
+
+MAKECONF=/etc/make.conf

--- /usr/share/mk/sys.mk.orig   Tue Mar 27 08:16:31 2001
+++ /usr/share/mk/sys.mk        Tue Mar 27 08:40:48 2001
@3@ -240,15 +240,25 @@
 .include </etc/defaults/make.conf>
 .endif
 
+.if defined(MAKECONF) && !empty(MAKECONF)
+.for conf in ${MAKECONF}
+.if exists(${conf})
+.include "${conf}"
+.endif
+.endfor
+.else
 .if exists(/etc/make.conf)
 .include </etc/make.conf>
 .endif
+.endif
 
 .include <bsd.cpu.mk>
 
+.if !defined(MAKECONF)
 .if exists(/etc/make.conf.local)
 .error Error, original /etc/make.conf should be moved to the /etc/defaults/ directory and /etc/make.conf.local should be renamed to /etc/make.conf.
 .include </etc/make.conf.local>
+.endif
 .endif
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: maxim 
State-Changed-When: Fri Dec 20 08:57:36 PST 2002 
State-Changed-Why:  
We have __MAKE_CONF now. 

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