Re: [PATCH] Makefile: avoid undefined variables

2024-10-28 Thread Chet Ramey
On 10/26/24 5:04 PM, Mike Jonkmans wrote: On Thu, Oct 24, 2024 at 03:07:46PM -0400, Grisha Levit wrote: These are reported by make --warn-undefined-variables. Most were being set previously (sometimes 20 years ago) and got left behind in recepies after their definitions have been removed. Other

Re: [PATCH] Makefile: avoid undefined variables

2024-10-26 Thread Mike Jonkmans
On Thu, Oct 24, 2024 at 03:07:46PM -0400, Grisha Levit wrote: > These are reported by make --warn-undefined-variables. > > Most were being set previously (sometimes 20 years ago) and got left > behind in recepies after their definitions have been removed. Others > only get set in some configuratio

Re: [PATCH] Makefile: avoid undefined variables

2024-10-26 Thread Chet Ramey
On 10/25/24 8:44 AM, Martin D Kealey wrote: I've been looking at the Makefiles as well, and I find I have a lot of questions, like: 1. What is the point of ‘$(BUILD_DIR)’? Just what it seems: an absolute pathname to the current build directory, which can include spaces. 2. Do any o

Re: [PATCH] Makefile: avoid undefined variables

2024-10-26 Thread Chet Ramey
On 10/26/24 10:32 AM, Martin D Kealey wrote: On Sat, 26 Oct 2024, 00:05 Dmitry Goncharov, wrote: - cd $(@D) && $(MAKE) BUILD_DIR=$(UP)$(BUILD_DIR) top_srcdir=$(UPSRC)$(top_srcdir) $(MAKEFLAGS) $(@F) It is really not a good idea to pass makeflags on the command line as a positional pa

Re: [PATCH] Makefile: avoid undefined variables

2024-10-26 Thread Martin D Kealey
On Sat, 26 Oct 2024, 00:05 Dmitry Goncharov, wrote: > >- cd $(@D) && $(MAKE) BUILD_DIR=$(UP)$(BUILD_DIR) > >top_srcdir=$(UPSRC)$(top_srcdir) $(MAKEFLAGS) $(@F) > > It is really not a good idea to pass makeflags on the command line as a > positional parameter. Agreed, but I was just copy

Re: [PATCH] Makefile: avoid undefined variables

2024-10-26 Thread Chet Ramey
On 10/24/24 3:07 PM, Grisha Levit wrote: These are reported by make --warn-undefined-variables. Most were being set previously (sometimes 20 years ago) and got left behind in recepies after their definitions have been removed. Others only get set in some configurations so it makes sense to preve

Re: [PATCH] Makefile: avoid undefined variables

2024-10-25 Thread Dmitry Goncharov
>- cd $(@D) && $(MAKE) BUILD_DIR=$(UP)$(BUILD_DIR) >top_srcdir=$(UPSRC)$(top_srcdir) $(MAKEFLAGS) $(@F) It is really not a good idea to pass makeflags on the command line as a positional parameter. A variable (any variable, including makeflags) set on the command line, overrides the value

Re: [PATCH] Makefile: avoid undefined variables

2024-10-25 Thread Martin D Kealey
On Fri, 25 Oct 2024 at 05:07, Grisha Levit wrote: > These are reported by make --warn-undefined-variables. > > Most were being set previously (sometimes 20 years ago) and got left > behind in recepies after their definitions have been removed. Others > only get set in some configurations so it ma

[PATCH] Makefile: avoid undefined variables

2024-10-24 Thread Grisha Levit
These are reported by make --warn-undefined-variables. Most were being set previously (sometimes 20 years ago) and got left behind in recepies after their definitions have been removed. Others only get set in some configurations so it makes sense to prevent them from inheriting stray values from t