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

2020-07-12 Thread Pali Rohár
On Sunday 12 July 2020 17:40:56 John Ericson wrote: > On Sun, Jul 12, 2020, at 5:22 PM, Pali Rohár wrote: > > > > But why is this change needed at all? Are there some bugs in GNU make so > > that macros/variables initialized by '=' cannot be overridden and > > initialization with '?=' is fixing

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

2020-07-12 Thread Simon Kelley
On 12/07/2020 18:53, 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: > >

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

2020-07-12 Thread John Ericson
On Sun, Jul 12, 2020, at 5:22 PM, Pali Rohár wrote: > > But why is this change needed at all? Are there some bugs in GNU make so > that macros/variables initialized by '=' cannot be overridden and > initialization with '?=' is fixing those bugs? Definitions with = can still be overridden on the

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

2020-07-12 Thread Pali Rohár
On Sunday 12 July 2020 22:19:42 Geert Stappers wrote: > On Sun, Jul 12, 2020 at 09:05:17PM +0200, Pali Rohár wrote: > > 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 > > >

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

2020-07-12 Thread Geert Stappers
On Sun, Jul 12, 2020 at 09:05:17PM +0200, Pali Rohár wrote: > 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 ?=

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

2020-07-12 Thread John Ericson
On Sun, Jul 12, 2020, at 3:05 PM, Pali Rohár wrote: > "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 >

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

2020-07-12 Thread Pali Rohár
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

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

2020-07-12 Thread John Ericson
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

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

2020-07-11 Thread Geert Stappers
On Sat, Jul 11, 2020 at 07:33:07PM +0200, john doe wrote: > On 7/11/2020 4:17 PM, Geert Stappers wrote: > > On Sat, Jul 11, 2020 at 02:33:36PM +0200, betaboon wrote: > > > Hello Simon, hello everyone. > > > > > > when cross-compiling dnsmasq for armv7 in nixos we ran into the > > > Makefile not

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

2020-07-11 Thread john doe
On 7/11/2020 4:17 PM, Geert Stappers wrote: On Sat, Jul 11, 2020 at 02:33:36PM +0200, betaboon wrote: Hello Simon, hello everyone. when cross-compiling dnsmasq for armv7 in nixos we ran into the Makefile not picking up the variables properly. for now we are maintaining the attached patch in

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

2020-07-11 Thread Geert Stappers
On Sat, Jul 11, 2020 at 02:33:36PM +0200, betaboon wrote: > Hello Simon, hello everyone. > > when cross-compiling dnsmasq for armv7 in nixos we ran into the > Makefile not picking up the variables properly. > > for now we are maintaining the attached patch in our package-tree to > get around