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

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jun 20, 2002 at 10:31:14AM +0300, Maxim Sobolev wrote:
> 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.
> 
> Interesting approach. Few notes:
> 
> 1. There is no gurantee that there is a WRKDIR when user does
> menuconfig because menuconfig doesn't mandate extract.

Good point.  Would it be OK to place the tempfile in MASTERDIR, or do I need
to make menuconfig dependent on extract?

> 2. How the user is expected to know that menuconfig is supported by
> this particular port?

Try it?  I considered adding an alternate target for the case where there is
no options file that just prints out ">>> No options available for this port".

It might also be an idea to print a warning at the start of the port build if
there is an options file and no Makefile.options (or the Makefile.options is
outdated).  Or possibly both at the start of build (for optimal timing) and at
the end of the install, so the user has the maximum chance of catching this.

> 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).

This is an interesting idea.

Initially, I wanted to make it as non-intrusive as possible.  I'm not sure
whether this is best or not - there are a few problems with making it
"mandatory":

- It influence portupgrade.  How do we want to handle this?
- It influence package builds; we probably need to make it set IS_INTERACTIVE
  in that case (or avoid the options when building packages).  Ideally, we
  would change the name of the package depending on what options were set, so
  it would be possible to build all relevant packages.  For that use, we
  should also mark which options are significant enough to warrant building
  standard packages with them toggled.
- The present implementation lose the user's settings when the menuconfig
  target is restarted.  If the target was forced to be started, this would be
  a lot more annoying, and would have to be dealt with (which could get hairy
  fast.)

I'll think some more about it, and may come back with a patch that does this.

Eivind.

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?20020620164542.A4283>