Hi Simon,

On Thu, 1 Aug 2024 10:14:07 +0100 Simon McVittie <[email protected]> wrote:
> dpkg-buildflags(1) documents how maintainers can set
> DEB_CFLAGS_MAINT_APPEND and friends, but there's no best-practice example
> of how to use them in d/rules.

An example d/rules assuming debhelper usage (in case it matters) would be useful indeed, alongside an explanation of when and why we should use DPKG_EXPORT_BUILDFLAGS.

> Questions whose answers are unclear to me:
>
> * Do DEB_*_MAINT_* need to be exported as environment variables, or is it
>   sufficient for them to be set as make(1) variables?

According to the dpkg-buildflags(1) manpage, "The default flags [...] can be extended/overridden in several ways: [...] dynamically by the package maintainer with environment variables set via debian/rules (see section "ENVIRONMENT")". So it seems that make(1) variables are not enough.

> * Do DEB_*_MAINT_* need to be set before including buildflags.mk, or
> do they use enough lazy-evaluation that it is sufficient to set them
>   anywhere in debian/rules?

Also, _when_ should be include buildflags.mk? Is it needed when using debhelper? Is it there a case where you would *not* want to include it?

> * Are there other requirements or interactions that maintainers will
>   typically need to take into account?

As I said above, it'd be also nice to specify what is already implied by debhelper usage, possibly pointing to its appropriate documentation.

Reply via email to