Variables and $(shell ...)

2024-03-25 Thread Tomas Volf
Hello, I am currently trying to figure out how to correctly pass CC variable to the make. Passing it as an make variable (`make CC=gcc') seems to work in almost all cases, but it fails for the `$(shell ...)' construct. Given this simple Makefile: yyy = $(shell env | grep ^foo=) xxx:

Re: Variables and $(shell ...)

2024-03-25 Thread Dmitry Goncharov
On Mon, Mar 25, 2024 at 7:40 PM Tomas Volf <~@wolfsden.cz> wrote: > I am currently trying to figure out how to correctly pass CC variable to the > make. Passing it as an make variable (`make CC=gcc') seems to work in almost > all cases, but it fails for the `$(shell ...)' construct. Export to $(s

Re: Dropping "call" operator?

2024-03-25 Thread Kaz Kylheku
On 2024-03-24 13:59, Paul Smith wrote: > On Wed, 2023-12-27 at 21:45 -0800, Kaz Kylheku wrote: >> What would be wrong with allowing the $(call ...) operator to be >> elided? >> >> Instead $(call macro,a,b,c), why can't we have $(macro a,b,c), if >> macro doesn't shadow a built-in function? >> >> Wh

Re: Dropping "call" operator?

2024-03-25 Thread Kaz Kylheku
On 2024-03-25 18:47, Kaz Kylheku wrote: > Is there another way to create variables with spaces other than something > like: > > VARSP := a b c > $(VARSP) = value > $(info $(a b c)) # produces "value" Addendum, yes, directly via: define a b c ... endef as well as with embedded comma: def