Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 20 Jun 2002 10:31:14 +0300
From:      Maxim Sobolev <sobomax@FreeBSD.org>
To:        Eivind Eklund <eivind@FreeBSD.org>
Cc:        ports@FreeBSD.org
Subject:   Re: 'make menuconfig' or how WITH_* can be good for you [patch]
Message-ID:  <3D1184C2.17D9588E@FreeBSD.org>
References:  <20020619215638.A23046@phoenix.dmnstech.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Eivind Eklund wrote:
> 
> (Note that I am not on the ports@ list, so Cc:'s are appreciated.)
> 
> I got tired of having to wade through a bunch of Makefiles and writing a bunch
> of WITH_XXX=YES switches on the command line.  Enclosed is a small patch that
> allow us to add a simple 'options' file to a port to add a target "make
> menuconfig" to the port.  This will bring up a dialog(1) dialog where the the
> user can turn the options on and off, and write out a file 'Makefile.options'
> that set the options the user selected.
> 
> The patch also makes bsd.port.mk read in Makefile.options.
> 
> The system isn't really complete (e.g, the dialog does not start up with the
> options the user selected last), but it should be better than what we have
> today.
> 
> The patch could have used Makefile.inc instead, I guess, but I felt it might
> be a good idea to not overwrite what users might have painstakingly
> constructed, as this will overwrite with the defaults quite easily.
> 
> Oh, and this will only work on ports that are split to use bsd.port.pre.mk and
> bsd.port.post.mk.

Interesting approach. Few notes:

1. There is no gurantee that there is a WRKDIR when user does
menuconfig because menuconfig doesn't mandate extract.
2. How the user is expected to know that menuconfig is supported by
this particular port?
3. It would probably be better if menuconfig is invoked automagically
before the build if ${MASTERDIR}/Makefile.options doesn't exists or
outdated (modification time is less than modification time of
${MASTERDIR}/options).

-Maxim

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D1184C2.17D9588E>