Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Sep 2007 18:15:19 +0400
From:      Dmitry Marakasov <amdmi3@amdmi3.ru>
To:        Andrew Pantyukhin <infofarmer@FreeBSD.org>
Cc:        Pav Lucistnik <pav@FreeBSD.org>, freebsd-ports@FreeBSD.org, Shaun Amott <shaun@FreeBSD.org>
Subject:   Re: bsd.port.options.mk status
Message-ID:  <20070912141519.GA63690@hades.panopticon>
In-Reply-To: <20070912130921.GA77497@amilo.cenkes.org>
References:  <20070909194620.GB14713@hades.panopticon> <1189368742.17083.37.camel@ikaros.oook.cz> <20070909220132.GC14713@hades.panopticon> <1189376094.17083.57.camel@ikaros.oook.cz> <20070910152612.GA15850@hades.panopticon> <1189443514.22893.10.camel@ikaros.oook.cz> <20070910220013.GO29407@amilo.cenkes.org> <20070912121830.GA84207@charon.picobyte.net> <20070912130921.GA77497@amilo.cenkes.org>

next in thread | previous in thread | raw e-mail | index | archive | help
* Andrew Pantyukhin (infofarmer@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@amdmi3.ru



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070912141519.GA63690>