Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Jul 2004 10:45:51 +0800 (CST)
From:      Yen-Ming Lee <leeym@utopia.leeym.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/69512: OPTIONS and NO_(CHECKSUM|BUILD|INSTALL|PACKAGE)
Message-ID:  <20040724024551.1EE6D3EA936@utopia.leeym.com>
Resent-Message-ID: <200407240250.i6O2oGA4003038@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         69512
>Category:       ports
>Synopsis:       OPTIONS and NO_(CHECKSUM|BUILD|INSTALL|PACKAGE)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Jul 24 02:50:16 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Yen-Ming Lee
>Release:        FreeBSD 5.2.1-RELEASE-p9 i386
>Organization:
>Environment:
System: FreeBSD utopia.leeym.com 5.2.1-RELEASE-p9 FreeBSD 5.2.1-RELEASE-p9 #143: Tue Jul 6 05:16:06 CST 2004 root@utopia.leeym.com:/usr/obj/usr/src/sys/UTOPIA i386


	
>Description:

If a port has OPTIONS and NO_(CHECKSUM|BUILD|INSTALL|PACKAGE) in its Makefile,
the NO_(CHECKSUM|BUILD|INSTALL|PACKAGE) will be ignored when !_OPTIONS_OK.

This problem occurs when I was trying to apply OPTIONS in mail/openwebmail,
which has NO_BUILD already. The port entered the build target and showed:

===>  Building for openwebmail-2.32
make: cannot open Makefile.
*** Error code 2

However, since it has NO_BUILD, it shouldn't do build at all.

>How-To-Repeat:

Let's make a simpler sample.

- put NO_CHECKSUM in lang/php4/Makefile
- cd /usr/ports/lang/php4 && make rmcofig clean
- cd /usr/ports/lang/php4 && make checksum
- and php4 port will ignore NO_CHECKSUM and do checksum.

>Fix:

Remove defined(_OPTIONS_OK) when disabling targets.

--- bsd.port.mk.diff begins here ---
--- /home/leeym/cvs/ports/Mk/bsd.port.mk	Sat Jul 24 10:17:10 2004
+++ /usr/ports/Mk/bsd.port.mk	Sat Jul 24 10:24:42 2004
@@ -2738,25 +2738,25 @@
 ################################################################
 
 # Disable checksum
-.if defined(NO_CHECKSUM) && !target(checksum) && defined(_OPTIONS_OK)
+.if defined(NO_CHECKSUM) && !target(checksum)
 checksum: fetch
 	@${DO_NADA}
 .endif
 
 # Disable build
-.if defined(NO_BUILD) && !target(build) && defined(_OPTIONS_OK)
+.if defined(NO_BUILD) && !target(build)
 build: configure
 	@${TOUCH} ${TOUCH_FLAGS} ${BUILD_COOKIE}
 .endif
 
 # Disable install
-.if defined(NO_INSTALL) && !target(install) && defined(_OPTIONS_OK)
+.if defined(NO_INSTALL) && !target(install)
 install: build
 	@${TOUCH} ${TOUCH_FLAGS} ${INSTALL_COOKIE}
 .endif
 
 # Disable package
-.if defined(NO_PACKAGE) && !target(package) && defined(_OPTIONS_OK)
+.if defined(NO_PACKAGE) && !target(package)
 package:
 .if defined(IGNORE_SILENT)
 	@${DO_NADA}
--- bsd.port.mk.diff ends here ---


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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040724024551.1EE6D3EA936>