Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 May 2007 17:34:32 +0400
From:      "Andrew Pantyukhin" <infofarmer@FreeBSD.org>
To:        "Stephen Montgomery-Smith" <stephen@math.missouri.edu>
Cc:        ports@freebsd.org, Alexander Leidinger <Alexander@leidinger.net>, Kris Kennaway <kris@obsecurity.org>
Subject:   Re: More speed increases for make-ing ports
Message-ID:  <cb5206420705220634m24ef4430u377eecbdfd2715b@mail.gmail.com>
In-Reply-To: <4652EC0C.8030604@math.missouri.edu>
References:  <465291FB.4010901@math.missouri.edu> <20070522071941.GB59910@xor.obsecurity.org> <cb5206420705220055x708caacdk766a19757c575981@mail.gmail.com> <20070522110359.dwce59oaowkc400o@webmail.leidinger.net> <cb5206420705220322n70b8e502l1f6de6b5564cd4b1@mail.gmail.com> <4652EC0C.8030604@math.missouri.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On 5/22/07, Stephen Montgomery-Smith <stephen@math.missouri.edu> wrote:
> Andrew Pantyukhin wrote:
> > On 5/22/07, Alexander Leidinger <Alexander@leidinger.net> wrote:
> >> Quoting Andrew Pantyukhin <infofarmer@FreeBSD.org> (from Tue, 22 May
> >> 2007 11:55:39 +0400):
> >>
> >> > On 5/22/07, Kris Kennaway <kris@obsecurity.org> wrote:
> >> >> On Tue, May 22, 2007 at 01:47:23AM -0500, Stephen Montgomery-Smith
> >> wrote:
> >> >>> This small modification cuts off about 25% off pkg_version on my
> >> system.
> >> >>>
> >> >>> Basically bsd.gnome.mk recursively finds all the dependencies, but
> >> many
> >> >>> of them are listed many times.  This makes make work extra hard
> >> when it
> >> >>> doesn't have to.  I simply weed out the repeated entries.
> >> >>>
> >> >>
> >> >>> --- bsd.gnome.mk-orig Tue May 22 01:29:08 2007
> >> >>> +++ bsd.gnome.mk      Tue May 22 01:29:22 2007
> >> >>> @@ -655,6 +655,8 @@
> >> >>>  _USE_GNOME+= ${${component}_USE_GNOME_IMPL} ${component}
> >> >>>  . endfor
> >> >>>
> >> >>> +_USE_GNOME!=(for i in ${_USE_GNOME}; do ${ECHO_CMD} $$i; done) |
> >> sort -u
> >> >>> +
> >> >>>  # Setup the GTK+ API version for pixbuf loaders, input method
> >> modules,
> >> >>>  # and theme engines.
> >> >>>  PLIST_SUB+=                  GTK2_VERSION="${GTK2_VERSION}"
> >> >>
> >> >> Be careful, != assignments may add thousands of process invocations to
> >> >> large targets like 'make index' and can slow it down dramatically.
> >> >
> >> > Right, and uniqueness logic can be implemented in make.
> >>
> >> Be proactive and tell/point out how... :)
> >
> > TMTOWTDI. There are several examples in bsd.*.mk. The
> > obvious one is "flags" (you set or unset flag vars
> > first, then traverse them and add what you need to
> > the list). In recent versions of our make you can
> > also use ${VAR:O:u}
>
> I must admit I was looking for the :u.  Definitely a good feature -
> maybe it could be invoked in the make file conditional on an appropriate
> value of OSVERSION.
>
> Incidently if you want to save a few more != assignments, I notice that
> setting the variables
> ARCH=i386
> OPSYS=FreeBSD
> OSREL=6.2
> OSVERSION=602110
> in /etc/make.conf will do this for you.

A seemingly better way may be to make these system vars
available in make by default. They may even be compiled
in - to achieve virtually no performance impact (except
for a bit larger default var table).



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