Date: Tue, 14 Oct 2003 16:29:27 +0200 (CEST) From: Jean-Yves Lefort <jylefort@brutele.be> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/58011: Formalization of WITH_/WITHOUT_ Makefile variables Message-ID: <20031014142927.DF6D422E1F@jsite.lefort.net> Resent-Message-ID: <200310141430.h9EEUMo3037151@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 58011 >Category: ports >Synopsis: Formalization of WITH_/WITHOUT_ Makefile variables >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Oct 14 07:30:21 PDT 2003 >Closed-Date: >Last-Modified: >Originator: Jean-Yves Lefort >Release: FreeBSD 4.8-RELEASE-p3 i386 >Organization: >Environment: System: FreeBSD jsite.lefort.net 4.8-RELEASE-p3 FreeBSD 4.8-RELEASE-p3 #0: Mon Aug 11 18:17:27 CEST 2003 jylefort@jsite.lefort.net:/usr/obj/usr/src/sys/JSITE i386 >Description: Knowing which make variables can be set for a specific port is cumbersome: the user has to mentally parse the Makefile. The proposed patch formalizes the handling of make variables. A new target, describe-options, generates a human- and computer-readable options list. >How-To-Repeat: >Fix: In the Makefile of port foo: OPTIONS= WITHOUT_MBOX \ WITHOUT_MH \ WITHOUT_MAILDIR \ WITHOUT_POP3 \ WITHOUT_SYLPHEED OPTION_WITHOUT_MBOX= Disable mbox support OPTION_WITHOUT_MH= Disable MH support OPTION_WITHOUT_MAILDIR= Disable Maildir support OPTION_WITHOUT_POP3= Disable POP3 support OPTION_WITHOUT_SYLPHEED= Disable Sylpheed support And the bsd.port.mk patch: --- bsd.port.mk.orig Tue Oct 14 16:05:47 2003 +++ bsd.port.mk Tue Oct 14 16:20:31 2003 @@ -603,6 +603,7 @@ # package - Create a package from an _installed_ port. # describe - Try to generate a one-line description for each port for # use in INDEX files and the like. +# describe-options - Print a list of options for this port # checkpatch - Do a "patch -C" instead of a "patch". Note that it may # give incorrect results if multiple patches deal with # the same file. @@ -4450,6 +4451,20 @@ fi .else @${DO_NADA} +.endif +.endif + +.if !target(describe-options) +describe-options: +.if defined(OPTIONS) + @${ECHO} "Port options:" +.for option in ${OPTIONS} + @${ECHO} "" + @${ECHO} "Option: ${option}" + @${ECHO} "Description: ${OPTION_${option}}" +.endfor +.else + @${ECHO} "This port has no option." .endif .endif >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031014142927.DF6D422E1F>