[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: dpkg-buildflags and makefile snippet



(Are you subscribed to debian-dpkg? Because mail-followup-to drops you
and yet you did not reply to my initial -dpkg mail where I asked for
feedback but only to the one who was copied to -ctte)

On Mon, 01 Aug 2011, Bernhard R. Link wrote:
> > Performance. If the variables are not used, there's no subprocess
> > executed.
> 
> Is that tiny constant amount worth having files not readable by the
> majority of people, even of DDs.

Yes, try it. Execute the perl interpreters several dozen of times, it's
noticable.

There's documentation of what the variables are, it should be more than
enough IMO. If not, let's fix the documentation above.

> > And once it has been executed, the value is kept (i.e. no
> > multiple executions either).
> 
> := is already doing that.

I know, but with := it's always executed even when not used.

> > Because we need to respect the value in the environment if they are set.
> > dpkg-builpackage does set them to non-standard values if you pass it the
> > -a and/or -t option.
> 
> dpkg-architecture already respects the environment,
> make does not override values given on the command line.

True, but then I'm just reusing the snippet recommended by the
dpkg-architecture manual page and thus one idiom that is widely used
in debian/rules.

And again using ?= avoids calling dpkg-architecture 18 times if the
variables are already set. And this is noticable.

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Follow my Debian News ▶ http://RaphaelHertzog.com (English)
                      ▶ http://RaphaelHertzog.fr (Français)


Reply to: