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

Re: dpkg-buildflags



Raphael Hertzog <hertzog@debian.org> writes:

> Hi Joey,
>
> On Sun, 06 Jun 2010, Joey Hess wrote:
>> Some questions I have..
>> 
>> * Do you anticipate adding more flags later? [1]
>
> Possibly yes, although they might not necessarily be among the flags you
> listed.
>
> Ubuntu uses dpkg-buildflags to export supplementary variables related to
> their hardened gcc wrapper (see Dpkg::Vendor::Ubuntu) so in essence
> we already have the case where dpkg-buildflags knows about more flags.
>
> I also wondered if we could not (ab)use dpkg-buildflags to offer a simple
> standardized way to forward supplementary options to ./configure:
>
> ./configure [...] $(dpkg-buildflags --get configure_opts)

Will there ever be any flags that are not configure_opts?

> Maybe it could even provide the --build and --host options as required
> by default (or maybe not if we want to a have a single flag name that can be
> used whatever the build system currently is).
>
> We could define a rule that all caps flags are to be exported while others
> are not.
>
>> * Do you think it would be a good idea for packages to set all flags
>>   dpkg-buildflags supports?
>
> At first I hardcoded a list of flags in dpkg-buildpackage but then
> we dropped that so that Ubuntu can export more flags than the initial
> list.
>
> So I think that it's probably best (in terms of consistency) to have
> all flags exported.
>
>> * 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.
>
> Cheers,

An equivalent to

.buildflags:
        for i in $(shell dpkg-buildflags --list); do \
          echo "$$i := $$(dpkg-buildflags --get $$i)"; echo "export $$i"; \
        done >.buildflags

#include .buildflags
PHONY: .buildflags

would be nice. I.e. set and export all variables dpkg-buildflags knows
about.

MfG
        Goswin



Reply to: