Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Aug 2004 20:42:47 +0200
From:      Oliver Lehmann <oliver@FreeBSD.org>
To:        portmgr@freebsd.org
Cc:        ports-committers@FreeBSD.org
Subject:   Re: cvs commit: ports/devel/gettext Makefile
Message-ID:  <20040827204247.5aea0ce6.oliver@FreeBSD.org>
In-Reply-To: <200408271752.i7RHq6KO067448@repoman.freebsd.org>
References:  <200408271752.i7RHq6KO067448@repoman.freebsd.org>

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

[-- Attachment #1 --]
David E. O'Brien wrote:

>   Log:
>   Previous revision accidently deleted the expat.5 dependancy.
>   s/NO_${PORTNAME}_OPTIONS/WITHOUT_${PORTNAME}_OPTIONS/

I would realy like to see this as a global option in bsd.port.mk.
It's possible to define BATCH, but that is used for other things in port
Makefiles too. For example:
I have an system-wide definition of WITH(OUT)_* variables dependant on the
portname. The OPTIONS-way interferes that. I would like to see that it's
not a must-do to use that dialog menu (and only that...)
Maybe it would be possible to implement an WITHOUT_OPTIONS .if-case which
would print the things out defined in OPTIONS instead of dialog-ing them?

Please find an example patch implementing this attached.

It would looks like:

root@kartoffel mozilla-devel> make -DWITHOUT_OPTIONS

You may use the following build options:

WITH_XFT=yes              Enable: Enable Xft font anti-aliasing
WITHOUT_CALENDAR=yes      Disable: Enable the Calendar module
WITH_MAILNEWS=yes         Enable: Enable Mail and News modules
WITH_COMPOSER=yes         Enable: Enable the HTML Composer module
WITHOUT_DEBUG=yes         Disable: Enable debugging (i.e. gdb) support
WITH_LDAP=yes             Enable: Enable LDAP support for Mailnews
WITH_CHATZILLA=yes        Enable: Enable the Chatzilla IRC module
WITH_XMLTERM=yes          Enable: Enable the XMLTerm module
WITHOUT_JAVASCRIPT_DEBUGGER=yes Disable: Enable the DTD and JavaScript
debuggers
WITHOUT_OPTIMIZED_CFLAGS=yes Disable: Enable -O2 optimizations
WITHOUT_SMB=yes           Disable: Enable smb:// URI support using
gnomevfs

===>  Vulnerability check disabled
^C
root@kartoffel mozilla-devel>


-- 
 Oliver Lehmann
  http://www.pofo.de/
  http://wishlist.ans-netz.de/

-- 
 Oliver Lehmann
  http://www.pofo.de/
  http://wishlist.ans-netz.de/

[-- Attachment #2 --]
Index: bsd.port.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.497
diff -u -r1.497 bsd.port.mk
--- bsd.port.mk	3 Aug 2004 19:03:58 -0000	1.497
+++ bsd.port.mk	27 Aug 2004 18:38:53 -0000
@@ -958,7 +958,7 @@
 .endif
 OPTIONSFILE?=	${PORT_DBDIR}/${UNIQUENAME}/options
 _OPTIONSFILE!=	${ECHO_CMD} "${OPTIONSFILE}"
-.if defined(OPTIONS)
+.if defined(OPTIONS) && !defined(WITHOUT_OPTIONS)
 .if exists(${_OPTIONSFILE}) && !make(rmconfig)
 .include "${_OPTIONSFILE}"
 .endif
@@ -2730,7 +2730,8 @@
 ################################################################
 .if (!defined(OPTIONS) || defined(CONFIG_DONE) || \
 	defined(PACKAGE_BUILDING) || defined(BATCH) || \
-	exists(${_OPTIONSFILE}) || exists(${_OPTIONSFILE}.local))
+	((exists(${_OPTIONSFILE}) || exists(${_OPTIONSFILE}.local)) \
+	&& !defined(WITHOUT_OPTIONS)))
 _OPTIONS_OK=yes
 .endif
 
@@ -2807,7 +2808,7 @@
 .else
 	@${DO_NADA}
 .endif
-.if defined(_OPTIONS_READ)
+.if defined(_OPTIONS_READ) && !defined(WITHOUT_OPTIONS)
 	@${ECHO_MSG} "===>  Found saved configuration for ${_OPTIONS_READ}"
 .if ${OPTIONSFILE} != ${_OPTIONSFILE}
 	@${ECHO_MSG} "===>  *** CAUTION *** Using wrong configuration file ${_OPTIONSFILE}"
@@ -4781,6 +4782,23 @@
 config:
 .if !defined(OPTIONS)
 	@${ECHO_MSG} "===> No options to configure"
+.elif defined(WITHOUT_OPTIONS) 
+	@${ECHO} ""
+	@${ECHO} "You may use the following build options:"
+	@${ECHO} ""
+	@set -- ${OPTIONS} ; \
+	while [ "$$#" -ge 3 ] ; do  \
+		if [ "$$3" = "on" ] ; then \
+			TEXT="Enable: " ; \
+			VARPRE="WITH_" ; \
+		else \
+			TEXT="Disable: " ; \
+			VARPRE="WITHOUT_" ; \
+		fi ; \
+		${PRINTF} "%-25s %-9s%-50s\n"  "$$VARPRE$$1=yes" "$$TEXT""$$2" ; \
+		shift 3 ; \
+	done
+	@${ECHO} ""
 .else
 .if ${OPTIONSFILE} != ${_OPTIONSFILE}
 	@${ECHO_MSG} "===> Using wrong configuration file ${_OPTIONSFILE}"

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