Re: Why call is not calling like native primitives? even when var is otherwise undef?

2018-05-21 Thread Garreau, Alexandre
On 2018-05-21 at 10:56, Paul Smith wrote: > A few releases ago I made it illegal to create variable names > containing spaces so the above makefile no longer works. My intention > at that time was to allow a shorthand for "call" such as you suggest, > but I haven't made that change yet. Also,

Re: -j/-l : minimum of jobs running under max-load with auto = cpu+1 default

2018-05-21 Thread Garreau, Alexandre
Le 21/05/2018 à 08h23, Paul Smith a écrit : > On Mon, 2018-05-21 at 08:36 +0200, Garreau, Alexandre wrote: >> Then I discovered --load-average, and I’m asking myself wether the >> optimum is -j n+1, -l 1.0, or -l n or n+1? > IMO, there are too many problems with choosing any value as the default

Re: Why call is not calling like native primitives? even when var is otherwise undef?

2018-05-21 Thread Paul Smith
On Mon, 2018-05-21 at 08:20 +0200, Garreau, Alexandre wrote: > For instance, if there’s an occurence of $(several words) in the > makefile, and the variable “several words” isn’t defined (that’s not a > natural thing to do anyway), taking its firstword, and being equivalent > to $(call

Re: Why call is not calling like native primitives? even when var is otherwise undef?

2018-05-21 Thread Garreau, Alexandre
On 2018-05-21 at 10:56, Paul Smith wrote: > On Mon, 2018-05-21 at 08:20 +0200, Garreau, Alexandre wrote: >> For instance, if there’s an occurence of $(several words) in the >> makefile, and the variable “several words” isn’t defined (that’s not a >> natural thing to do anyway), taking its

Re: Why call is not calling like native primitives? even when var is otherwise undef?

2018-05-21 Thread Kyle Rose
> > On 2018-05-21 at 07:46, Kyle Rose wrote: > > $(call x) rebinds the positional parameters. $x and $(x) do not. This > > distinction is used to break macro logic into smaller pieces in which $1 > et > > al. still refer to the positional parameters from the top-level macro > > instead of being

Re: Some useful primitives: escape (and quoting variables), lastwords (for recursivity)… and files with spaces in them?

2018-05-21 Thread Garreau, Alexandre
On 2018-05-21 at 11:16, Paul Smith wrote: > On Mon, 2018-05-21 at 08:12 +0200, Garreau, Alexandre wrote: >> Also I was wondering… would there be some possible mechanism so that >> a filename with spaces in it might be appropriatedly treated by >> implicit rules? or is it intrinsic to, say,

Re: Why call is not calling like native primitives? even when var is otherwise undef?

2018-05-21 Thread Kyle Rose
$(call x) rebinds the positional parameters. $x and $(x) do not. This distinction is used to break macro logic into smaller pieces in which $1 et al. still refer to the positional parameters from the top-level macro instead of being rebound to the empty string. Kyle On Mon, May 21, 2018, 4:11 AM

Re: -j/-l : minimum of jobs running under max-load with auto = cpu+1 default

2018-05-21 Thread Paul Smith
On Mon, 2018-05-21 at 08:36 +0200, Garreau, Alexandre wrote: > Then I discovered --load-average, and I’m asking myself wether the > optimum is -j n+1, -l 1.0, or -l n or n+1? IMO, there are too many problems with choosing any value as the default value: * It's not so simple to determine the

Re: Why call is not calling like native primitives? even when var is otherwise undef?

2018-05-21 Thread Paul Smith
On Mon, 2018-05-21 at 18:17 +0200, Garreau, Alexandre wrote: > On 2018-05-21 at 10:56, Paul Smith wrote: > > A few releases ago I made it illegal to create variable names > > containing spaces so the above makefile no longer works. My > > intention at that time was to allow a shorthand for "call"

Re: Why call is not calling like native primitives? even when var is otherwise undef?

2018-05-21 Thread Garreau, Alexandre
Le 21/05/2018 à 13h50, Paul Smith a écrit : > On Mon, 2018-05-21 at 18:17 +0200, Garreau, Alexandre wrote: >> On 2018-05-21 at 10:56, Paul Smith wrote: >> > A few releases ago I made it illegal to create variable names >> > containing spaces so the above makefile no longer works. My >> >

Re: Some useful primitives: escape (and quoting variables), lastwords (for recursivity)… and files with spaces in them?

2018-05-21 Thread Paul Smith
On Mon, 2018-05-21 at 18:13 +0200, Garreau, Alexandre wrote: > > There was a long discussion here a few years ago about a new > > capability for handling special characters in filenames possible, > > and I have a partial implementation that was not completed, of a > > possible way to do this. > >

Pattern matching for static pattern rules

2018-05-21 Thread Alex Dehnert
I was running into some behavior that surprised me when using static pattern rules with files in a subdirectory. A fairly minimal case: $ mkdir foo && echo foo/bar > foo/text.bar $ cat Makefile all : foo/text.bar.sha1 foo/text.bar.md5 text.%.sha1 : text.% sha1sum "$<" > "$@"

Some useful primitives: escape (and quoting variables), lastwords (for recursivity)… and files with spaces in them?

2018-05-21 Thread Garreau, Alexandre
Hi, I began, for automatic variables containing only one filename, to put them between simple quotes, and to try to escape my filenames in my makefiles, so that if one day someone tries to use my makefiles for files with special chars in them like spaces or quotes. Also, using quotes is

Why call is not calling like native primitives? even when var is otherwise undef?

2018-05-21 Thread Garreau, Alexandre
Why not, like in shell, when some function/variable is undefined, call an internal one when defined? What’s the historic reason of this? For instance, if there’s an occurence of $(several words) in the makefile, and the variable “several words” isn’t defined (that’s not a natural thing to do

-j/-l : minimum of jobs running under max-load with auto = cpu+1 default

2018-05-21 Thread Garreau, Alexandre
Because parallelism is not enough generalized and people don’t seek it enough (make is a good example), I long thought it would be a good thing to have a way to have parallelism activated more easily (or even by default) in make (or manually by automake or anything of this kind), until now I think