bsd.port.options.mk status
Dmitry Marakasov
amdmi3 at amdmi3.ru
Wed Sep 12 07:14:12 PDT 2007
* Andrew Pantyukhin (infofarmer at FreeBSD.org) wrote:
> > > So am I missing something or is it as trivial as using these four
> > > lines instead of one:
> > >
> > > USEOPTIONSMK= yes
> > > INOPTIONSMK= yes
> > > .include "bsd.port.mk"
> > > .undef INOPTIONSMK
> > This is even uglier than our existing work-around solutions. :-)
> You snipped the question I was trying to answer, which was "is it
> possible?" Now IMHO the current way of handling options is ugly
> as a whole. We're trying to use paradigms from other languages in
> make. A make solution would look more like this:
> SOMELIST= FOO BAR BAZ
> WITH_FOO_CONFIGURE_ARGS= --with-foo
> WITHOUT_BAZ_PLIST_SUB+= BAZ="@comment "
> other BSD's have used this approach for some time now and it
> looks a lot cleaner than all the hacks we have, at least to my
That seems a very bad solution for me.
We'll have to introduce tons of WITH_{$FOO}_* variables, and we still
won't support all ways .if defined(WITH_*) are used now. Just try:
find /usr/ports -name Makefile | xargs -n100 cat | sed -n -e '/^\.if.*WITH_/,/^\.endif/ p'
.if's are far more flexible. And for my eyes, if's look cleaner.
> eyes. The reason I'm not rallying for cosmetics like that is that
> I fail to see make(1) as a future-proof base for ports.
That is unfortunately true.
--
Best regards,
Dmitry Marakasov mailto:amdmi3 at amdmi3.ru
More information about the freebsd-ports
mailing list