[Dnsmasq-discuss] Fwd: [PATCH] Makefile: make variables overridable

Pali Rohár pali.rohar at gmail.com
Sun Jul 12 20:05:17 BST 2020


On Sunday 12 July 2020 13:53:11 John Ericson wrote:
> Hi, I am another NixOS maintainer.
> 
> Yes, it is true that ?= in makefiles is somewhat rare, and that we can work around this other ways. But it was I who proposed the ?= change on our side[1], so let say why I think it's the right choice:
> 
> Most C packages don't use "?=" and do
>  FOO ?= foo
> but instead do have a configure script, so they do
>  FOO = @FOO@
> with regular "=". However that configure script *does* silently consume environment variables, so the effect is the same.

"FOO ?= foo" syntax is not supported by POSIX make:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/make.html

And requires some GNU Make extension.

I guess because dnsmasq is supported also on non-GNU Make systems, it
cannot take some patch which adds dependency on Linux or GNU specific
feature.

> I wouldn't request upstream add a configure script is nothing is needed, and I don't even like the implicitness of environment variables myself. But the fact is it is the standard for distros to communicate information to all the myriad build systems[2], so I advocate this change so distros can remove extra packaging hacks.
> 
> The variable we need to override is PKG_CONFIG.

Basically I do not understand whole point of this patch. If you for
compilation need to override some Makefile variable, why do you not
set correct value of that variable?

It is lot of easier to set correct value during compilation as patching
sources or sending patch to upstream and waiting if it would be released
in new version.

> P.S. Sorry I am missing the right "in-reply-to"; I turned on message delivery after the original emails were sent, and do not know how to get the message-id from the pipermail archive.

You can find Message-Id of every email in GZIP archive available at:
http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/

-- 
Pali Rohár
pali.rohar at gmail.com



More information about the Dnsmasq-discuss mailing list