On 12/22/2016 01:18 PM, Peter Pentchev wrote: > On Thu, Dec 22, 2016 at 12:29:23PM +0100, Christian Seiler wrote: >> Hi Gianfranco, >> >> Thanks for taking care of this. >> >> On 12/22/2016 12:05 PM, Gianfranco Costamagna wrote: > [snip] >>> why override dh_auto_build and dh_auto_install? >>> probably exporting LDFLAGS and CFLAGS should work >> >> No, it won't, because I have to override the variables in the >> Makefile. >> >> For a simple example, take the following Makefile: > [snip] >> >> If one uses cmake or autoconf or similar, then environment variables >> are sufficient. If the Makefile uses ?= to set the environment variables, >> then as well. But since upstream's Makefile uses a plain and = for the >> assignment of the environment variable, we need to override that >> explicitly via an argument to make. > > That's why I always add a patch to the Makefile that changes the "=" to > "?=" and then send it upstream; so far the upstream authors have always > accepted such trivial yet quite useful patches :)
I'd like to get this into Stretch, and while I do believe that upstream is likely to accept such a patch, the additional round trip time for that (the package is slow-moving) doesn't seem worth the tiny amount of higher elegance in d/rules right now. But thanks for this suggestion, I'll definitely do so at the beginning of the Buster release cycle, so once the package has been accepted, I'll open a bug with severity wishlist for this, so I don't forget it. But thinking about this, I do think I can make d/rules more readable regardless, by using DEB_CPPFLAGS_MAINT_APPEND instead of hard-coding them into the line. Thanks for letting me think of that. :) Regards, Christian

