Re: [linux] possible race condition in makefile with multiple dependencies?

2021-06-03 Thread Dianne Skoll
On Thu, 3 Jun 2021 11:55:38 -0400 (EDT) "Robert P. J. Day" wrote: > i took a look at it and it was a holdover from (i believe) QNX where > their version of make did not support parallelism so that many of the > rules were in the form: > target: dep1 dep2 dep3 dep4 > $(MAKE) -C subdir1 >

Re: [linux] possible race condition in makefile with multiple dependencies?

2021-06-03 Thread Dianne Skoll
On Thu, 3 Jun 2021 10:19:22 -0400 "Michael P. Soulier" wrote: > On 2021-06-03 10:09 a.m., Dianne Skoll wrote: > > See the -j option > Seems like a race condition waiting to happen. Shouldn't be. My understanding (which may be wrong) is that make calculates the dependency graph first, not in

Re: [linux] possible race condition in makefile with multiple dependencies?

2021-06-03 Thread Dianne Skoll
On Thu, 3 Jun 2021 09:29:43 -0400 "Michael P. Soulier" wrote: > I am not aware of gnu make having any parallel processing > capabilities. See the -j option Regards, Dianne. To unsubscribe send a blank message to linux+unsubscr...@linux-ottawa.org To get help send a blank message to

Re: [linux] possible race condition in makefile with multiple dependencies?

2021-06-03 Thread Robert P. J. Day
On Thu, 3 Jun 2021, Dianne Skoll wrote: > On Thu, 3 Jun 2021 10:19:22 -0400 > "Michael P. Soulier" wrote: > > > On 2021-06-03 10:09 a.m., Dianne Skoll wrote: > > > See the -j option > > > Seems like a race condition waiting to happen. > > Shouldn't be. My understanding (which may be wrong) is

Re: [linux] possible race condition in makefile with multiple dependencies?

2021-06-03 Thread Spencer Cheng
> On Jun 3, 2021, at 10:27, Robert P. J. Day wrote: > >> >> Shouldn't be. My understanding (which may be wrong) is that make >> calculates the dependency graph first, not in parallel. Then it >> executes as many parallel tasks as the -j option asks for, or that >> make sense... whichever

Re: [linux] possible race condition in makefile with multiple dependencies?

2021-06-03 Thread Richard Guy Briggs
On 2021-06-03 10:27, Robert P. J. Day wrote: > On Thu, 3 Jun 2021, Dianne Skoll wrote: > > > On Thu, 3 Jun 2021 10:19:22 -0400 > > "Michael P. Soulier" wrote: > > > > > On 2021-06-03 10:09 a.m., Dianne Skoll wrote: > > > > See the -j option > > > > > Seems like a race condition waiting to

Re: [linux] possible race condition in makefile with multiple dependencies?

2021-06-03 Thread Tug Williams
On 03/06/2021 10:38, Michael P. Soulier wrote: On 2021-06-03 10:22 a.m., Dianne Skoll wrote: Shouldn't be.  My understanding (which may be wrong) is that make calculates the dependency graph first, not in parallel.  Then it executes as many parallel tasks as the -j option asks for, or that

Re: [linux] possible race condition in makefile with multiple dependencies?

2021-06-03 Thread Michael P. Soulier
On 2021-06-03 10:22 a.m., Dianne Skoll wrote: Shouldn't be. My understanding (which may be wrong) is that make calculates the dependency graph first, not in parallel. Then it executes as many parallel tasks as the -j option asks for, or that make sense... whichever is smaller. Since the

Re: [linux] possible race condition in makefile with multiple dependencies?

2021-06-03 Thread Robert P. J. Day
On Thu, 3 Jun 2021, Dianne Skoll wrote: > On Thu, 3 Jun 2021 10:19:22 -0400 > "Michael P. Soulier" wrote: > > > On 2021-06-03 10:09 a.m., Dianne Skoll wrote: > > > See the -j option > > > Seems like a race condition waiting to happen. > > Shouldn't be. My understanding (which may be wrong) is

Re: [linux] possible race condition in makefile with multiple dependencies?

2021-06-03 Thread Michael P. Soulier
On 2021-06-03 10:09 a.m., Dianne Skoll wrote: See the -j option Seems like a race condition waiting to happen. To unsubscribe send a blank message to linux+unsubscr...@linux-ottawa.org To get help send a blank message to linux+h...@linux-ottawa.org To visit the archives:

Re: [linux] possible race condition in makefile with multiple dependencies?

2021-06-03 Thread Michael P. Soulier
On 2021-06-03 8:29 a.m., Robert P. J. Day wrote: i *vaguely* recall (probably incorrectly) a possible race condition in that both t1 and t2 will check their dependencies and, if they're out of date, both try to update them at the same time, possibly stepping on each other's work. i think

[linux] possible race condition in makefile with multiple dependencies?

2021-06-03 Thread Robert P. J. Day
i'm probably overthinking this, but is there any problem with defining a makefile with numerous targets that can be processed in parallel if they all have the same set of dependencies (which can also be processed in parallel)? sample makefile i'm playing with: .PHONY: all alldeps t1 t2 d1