Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Aug 2004 21:55:32 +0200
From:      Oliver Lehmann <oliver@FreeBSD.org>
To:        obrien@FreeBSD.org
Cc:        portmgr@FreeBSD.org
Subject:   Re: cvs commit: ports/devel/gettext Makefile
Message-ID:  <20040827215532.181c2276.oliver@FreeBSD.org>
In-Reply-To: <20040827191537.GA88281@dragon.nuxi.com>
References:  <200408271752.i7RHq6KO067448@repoman.freebsd.org> <20040827204247.5aea0ce6.oliver@FreeBSD.org> <20040827191537.GA88281@dragon.nuxi.com>

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

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

> WITH(OUT)_${PORTNAME}_OPTIONS also?  I think it wouldn't be too much
> work to extend it to this also.

Do you mean something like:


root@kartoffel mozilla-devel> make -DWITHOUT_mozilla_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) suppor
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

If so... patch is attached (it will also remove the unneded spaces at the
end of each line)

If I missunderstood what you was thinking of - let me know...

Next thing could be to strip out Enable/Disable at the beginning of the
description (sth. like ${SED} -E 's|^([Ee]n\|[Dd]is)able ||g'). But just a
cosmetic change. Would be nice to just see it working first...

  Greetings

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

[-- Attachment #2 --]
Index: bsd.port.mk
===================================================================
RCS file: /usr/local/cvsroot/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 19:51:16 -0000
@@ -958,7 +958,7 @@
 .endif
 OPTIONSFILE?=	${PORT_DBDIR}/${UNIQUENAME}/options
 _OPTIONSFILE!=	${ECHO_CMD} "${OPTIONSFILE}"
-.if defined(OPTIONS)
+.if defined(OPTIONS) && !defined(WITHOUT_OPTIONS) && !defined(WITHOUT_${PORTNAME}_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) && !defined(WITHOUT_${PORTNAME}_OPTIONS)))
 _OPTIONS_OK=yes
 .endif
 
@@ -2807,7 +2808,8 @@
 .else
 	@${DO_NADA}
 .endif
-.if defined(_OPTIONS_READ)
+.if defined(_OPTIONS_READ) && !defined(WITHOUT_OPTIONS) && \
+	!defined(WITHOUT_${PORTNAME}_OPTIONS)
 	@${ECHO_MSG} "===>  Found saved configuration for ${_OPTIONS_READ}"
 .if ${OPTIONSFILE} != ${_OPTIONSFILE}
 	@${ECHO_MSG} "===>  *** CAUTION *** Using wrong configuration file ${_OPTIONSFILE}"
@@ -4781,6 +4783,23 @@
 config:
 .if !defined(OPTIONS)
 	@${ECHO_MSG} "===> No options to configure"
+.elif defined(WITHOUT_OPTIONS) || defined(WITHOUT_${PORTNAME}_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 %s\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?20040827215532.181c2276.oliver>