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

Re: dpkg-buildflags



On Mon, Jun 07, 2010 at 08:53:03AM +0200, Raphael Hertzog wrote:
> > * If packages should set all the flags, have you considered having a
> >   mode where it lists them all (like dpkg-architecture -l), perhaps
> >   with export statements?
> 
> Would you like this? I have no problem adding this feature to
> dpkg-buildflags.

That would be very useful, and you want it to be suitable for $(eval).

It's likely that you will have to support various escapings for it to be
suitable for sh eval, make eval, and maybe other languages.

something like:

    dpkg-buildflags --export=[sh|make]


One would use it this way with the shell:

    eval $(dpkg-buildflags --export=sh || echo exit $?)

and in make:

    $(eval $(shell dpkg-buildflags --export=make || echo '$$(error dpkg-buildflags failed with code '$$?')')))

It's likely to be wise that the output "exports" the variables (as in
shell or make "export" feature to make this bit of the environment
available to sub-shells).
-- 
·O·  Pierre Habouzit
··O                                                madcoder@debian.org
OOO                                                http://www.madism.org


Reply to: