ports/78343: Mk/bsd.port.mk: OPTIONS processing should care about predefined WITH_ or WITHOUT_ variables

NIIMI Satoshi sa2c at sa2c.net
Thu Mar 3 06:10:17 UTC 2005


>Number:         78343
>Category:       ports
>Synopsis:       Mk/bsd.port.mk: OPTIONS processing should care about predefined WITH_ or WITHOUT_ variables
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 03 06:10:16 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     NIIMI Satoshi
>Release:        FreeBSD 5.3-RELEASE-p5 i386
>Organization:
>Environment:
System: FreeBSD berkeley.l.sa2c.net 5.3-RELEASE-p5 FreeBSD 5.3-RELEASE-p5 #3: Thu Feb 24 08:59:33 JST 2005 root at berkeley.l.sa2c.net:/usr/obj/usr/src/sys/GENERIC i386


	
>Description:
OPTIONS= FOO "desc" on
in Makefile defines WITH_FOO unconditionaly even if WITHOUT_FOO is
defined in /etc/make.conf or command line.
Because some ports use WITH_ variable and other ports use WITHOUT_ variable
to detect options, having both WITH_ and WITHOUT_ variable is problematic.
	
>How-To-Repeat:
% cd /usr/ports/net/samba3
% make BATCH=yes PORT_DBDIR=/nonexistent WITHOUT_CUPS=yes -V WITH_CUPS
true
	
>Fix:

	

--- bsd.port.mk.diff begins here ---
Index: bsd.port.mk
===================================================================
RCS file: /home/ncvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.510
diff -u -d -r1.510 bsd.port.mk
--- bsd.port.mk	28 Feb 2005 21:09:04 -0000	1.510
+++ bsd.port.mk	3 Mar 2005 05:03:20 -0000
@@ -1103,10 +1103,14 @@
 .	endfor
 .	endif
 .	for W in ${WITH}
+.	if !defined(WITHOUT_${W})
 WITH_${W}:=	true
+.	endif
 .	endfor
 .	for W in ${WITHOUT}
+.	if !defined(WITH_${W})
 WITHOUT_${W}:=	true
+.	endif
 .	endfor
 .	undef WITH
 .	undef WITHOUT
--- bsd.port.mk.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list