Re: multi-threaded compiling

2024-03-15 Thread Mischa Baars
No? No further suggestions? Then I'd like to thank you all for your help and your input. I'll be off-list now. Kind regards, Mischa Baars. On Thu, Mar 14, 2024 at 9:17 AM Mischa Baars wrote: > Ok. Then this is what I was able to make of it. To be honest, I prefer the > Makefile synta

Re: multi-threaded compiling

2024-03-14 Thread Mischa Baars
: > On Wed, 13 Mar 2024, Mischa Baars wrote: > > > Date: Wed, 13 Mar 2024 22:52:16 > > From: Mischa Baars > > To: alex xmb sw ratchev > > Cc: psm...@gnu.org, bug-bash , help-m...@gnu.org > > Subject: Re: multi-threaded compiling > > > > I found another

Re: multi-threaded compiling

2024-03-13 Thread Mischa Baars
: > > > On Wed, Mar 13, 2024, 08:26 Mischa Baars > wrote: > >> On Tue, Mar 12, 2024 at 10:00 PM Paul Smith wrote: >> >> > On Tue, 2024-03-12 at 13:37 +0100, Mischa Baars wrote: >> > > > I'd still like to hear why you aren't simply using "make -j"

Re: multi-threaded compiling

2024-03-13 Thread Mischa Baars
On Wed, Mar 13, 2024 at 4:14 AM Martin D Kealey wrote: > > On Mon, Mar 11, 2024 at 8:20 PM Chet Ramey wrote: >> > On 3/11/24 2:50 PM, Mischa Baars wrote: >> > > Which sort of brings us back to the original question I suppose. Who >> does >> > > tha

Re: multi-threaded compiling

2024-03-13 Thread Mischa Baars
On Tue, Mar 12, 2024 at 10:00 PM Paul Smith wrote: > On Tue, 2024-03-12 at 13:37 +0100, Mischa Baars wrote: > > > I'd still like to hear why you aren't simply using "make -j". > > > > That's because I don't want to define static compile and link targets

Re: multi-threaded compiling

2024-03-12 Thread Mischa Baars
On Tue, Mar 12, 2024 at 12:49 PM Greg Wooledge wrote: > On Tue, Mar 12, 2024 at 09:42:22AM +0100, Mischa Baars wrote: > > Here's the script and the Makefile using "printf '<%s>'": > > Sadly, your mail user agent chose to attach "Makefile" with content-

Re: multi-threaded compiling

2024-03-12 Thread Mischa Baars
On Tue, Mar 12, 2024 at 12:30 PM Greg Wooledge wrote: > On Tue, Mar 12, 2024 at 02:15:38PM +0700, Robert Elz wrote: > > Date:Mon, 11 Mar 2024 17:25:57 -0400 > > From:Chet Ramey > > Message-ID: <322e10a6-3808-49be-aa9d-a1d367a90...@case.edu> > > > > | OK, here's

Re: multi-threaded compiling

2024-03-12 Thread Mischa Baars
On Tue, Mar 12, 2024 at 12:19 PM Greg Wooledge wrote: > On Tue, Mar 12, 2024 at 10:33:36AM +0100, Mischa Baars wrote: > > bash -c 'set +m; seconds=1; for (( i=0;i<32;i++ )); do exit ${i} & done; > > sleep ${seconds}; for (( i=0;i<32;i++ )); do wait -p pid; e=${?}; e

Re: multi-threaded compiling

2024-03-12 Thread Mischa Baars
to do the job right. Best regards, Mischa. On Mon, Mar 11, 2024 at 8:20 PM Chet Ramey wrote: > On 3/11/24 2:50 PM, Mischa Baars wrote: > > Which sort of brings us back to the original question I suppose. Who does > > that line of code function from a script and why does it fail

Re: multi-threaded compiling

2024-03-12 Thread Mischa Baars
;32;i++ )); do exit ${i} & done; sleep ${seconds}; for (( i=0;i<32;i++ )); do wait -p pid; e=${?}; echo "$(printf %3u ${i}) pid ${pid} exit ${e}"; done;' disables / enables the notifications respectively, but doesn't do anything otherwise. On Mon, Mar 11, 2024 at 8:20 PM Chet Ramey wr

Re: multi-threaded compiling

2024-03-12 Thread Mischa Baars
-c 'seconds=1; for (( i=0;i<32;i++ )); do exit ${i} & done; sleep ${seconds}; for (( i=0;i<32;i++ )); do wait -np pid; e=${?}; echo "$(printf %3u ${i}) pid ${pid} exit ${e}"; done;' On Mon, Mar 11, 2024 at 8:20 PM Chet Ramey wrote: > On 3/11/24 2:50 PM, Mischa Baars wrote: &

Re: multi-threaded compiling

2024-03-12 Thread Mischa Baars
able expansion. Therefore writing VAR=" \"string 1\" \"string 2\" " > absolutely cannot do what you might expect; the embedded quote marks will > be used literally, and then (because ${CFLAGS[0]} is not quoted) the > resulting string will be split on any embedded w

Re: multi-threaded compiling

2024-03-12 Thread Mischa Baars
edded whitespace.. > > So.. how do I make the script produce the same output as the Makefile? Using 'printf <%s>' as Chet said I should, does show the difference between the two, but it doesn't fix the problem. > > On Mon, 11 Mar 2024 at 18:56, Mischa Baars > wrote: > >> Hi,

Re: multi-threaded compiling

2024-03-12 Thread Mischa Baars
On Mon, Mar 11, 2024 at 10:26 PM Chet Ramey wrote: > On 3/11/24 3:44 PM, Mischa Baars wrote: > > On Mon, 11 Mar 2024, 20:20 Chet Ramey, > <mailto:chet.ra...@case.edu>> wrote: > > > > On 3/11/24 2:50 PM, Mischa Baars wrote: > > > Which sort of

Re: multi-threaded compiling

2024-03-12 Thread Mischa Baars
On Tue, Mar 12, 2024 at 8:16 AM Robert Elz wrote: > This whole discussuon has been a total mess. > > First the original message didn't give nearly enough info. > That might have been in the attachment, but no-one should be > expecting people to do any needless work when you're asking > for

Re: multi-threaded compiling

2024-03-11 Thread Mischa Baars
On Mon, 11 Mar 2024, 21:08 Kerin Millar, wrote: > On Mon, 11 Mar 2024 15:36:48 -0400 > Greg Wooledge wrote: > > > > On Mon, Mar 11, 2024, 20:13 Mischa Baars > > > > wrote: > > > > > > > Also I don't think that gives you an exit status for each

Re: multi-threaded compiling

2024-03-11 Thread Mischa Baars
t hand. On Mon, Mar 11, 2024 at 8:49 PM Chet Ramey wrote: > On 3/11/24 2:46 PM, Mischa Baars wrote: > > You mean: > > > for (( i=0; i<32; i++ )); do exit $i; done; for (( i=0; i<32; i++ )); do > > wait -n; echo $?; done; > > > > Because this doesn't an

Re: multi-threaded compiling

2024-03-11 Thread Mischa Baars
On Mon, 11 Mar 2024, 20:36 Greg Wooledge, wrote: > > On Mon, Mar 11, 2024, 20:13 Mischa Baars > > wrote: > > > > > Also I don't think that gives you an exit status for each 'exit $i' > > > started. I need that exit status. > > "wait -n" withou

Re: multi-threaded compiling

2024-03-11 Thread Mischa Baars
On Mon, 11 Mar 2024, 20:20 Chet Ramey, wrote: > On 3/11/24 2:50 PM, Mischa Baars wrote: > > Which sort of brings us back to the original question I suppose. Who does > > that line of code function from a script and why does it fail from the > > command line? > > Job

Re: multi-threaded compiling

2024-03-11 Thread Mischa Baars
e logic between my code >> >> 1 threads_max >> 2 loop >> 3 inside loop , do if run is > than threads_max then wait -n one >> then 4 spawn thread >> > > 3 if run isnt more than max , simply ignore and spawn thread in next cmd > > i dont get ur points &

Re: multi-threaded compiling

2024-03-11 Thread Mischa Baars
on, Mar 11, 2024 at 7:46 PM Mischa Baars wrote: > You mean: > > for (( i=0; i<32; i++ )); do exit $i & wait -n; echo $?; done; > > with one command and one wait in a single loop. And this does execute on > the command line. How interesting! > > for (( i=0; i<32; i

Re: multi-threaded compiling

2024-03-11 Thread Mischa Baars
Which sort of brings us back to the original question I suppose. Who does that line of code function from a script and why does it fail from the command line? My guess was that the same thing makes this line fail from the Makefile. On Mon, Mar 11, 2024 at 7:46 PM Mischa Baars wrote: > You m

Re: multi-threaded compiling

2024-03-11 Thread Mischa Baars
one; Because this doesn't and to be honest, I needed the pid and its index to retrieve gcc's output from a log file array afterwards. On Mon, Mar 11, 2024 at 7:25 PM alex xmb sw ratchev wrote: > > > On Mon, Mar 11, 2024, 19:22 Mischa Baars > wrote: > >> On Mon, Mar 11, 2024 at 6:2

Re: multi-threaded compiling

2024-03-11 Thread Mischa Baars
On Mon, Mar 11, 2024 at 7:14 PM Greg Wooledge wrote: > On Mon, Mar 11, 2024 at 06:51:54PM +0100, Mischa Baars wrote: > > SECONDS=5; for (( i=0;i<32;i++ )); do { exit ${i}; } & pid[${i}]=${!}; > done; sleep ${SECONDS}; for (( i=0;i<32;i++ )); do wait -n ${pid[${i}]}; > e

Re: multi-threaded compiling

2024-03-11 Thread Mischa Baars
Hi Greg, Good point. One for you :) Cheerz, Mischa. On Mon, Mar 11, 2024 at 7:14 PM Greg Wooledge wrote: > On Mon, Mar 11, 2024 at 06:51:54PM +0100, Mischa Baars wrote: > > SECONDS=5; for (( i=0;i<32;i++ )); do { exit ${i}; } & pid[${i}]=${!}; > done; sleep ${SECONDS}

Re: multi-threaded compiling

2024-03-11 Thread Mischa Baars
e > How nice! wait -n exit 1 & echo $? You got me the solution :) Except that wait expects a pid after -n. Maybe for (( i=0; i<32; i++ )); do exit 1 & wait -n $!; echo $?; done; is what you meant? The equivalence of sequential execution? First think, then do magic. > >

Re: multi-threaded compiling

2024-03-11 Thread Mischa Baars
) The two.make.log has the expected. The same commands executed from the bash script do not behave as expected. I'm having trouble obtaining the desired results with the bash script. Regards, Mischa Baars. On Mon, Mar 11, 2024 at 6:27 PM Paul Smith wrote: > On Mon, 2024-03-11 at 18:14 +0100, Mis

Re: multi-threaded compiling

2024-03-11 Thread Mischa Baars
of the mail. In the attachment there are two directories, one and two, belonging to 1) and 2) respectively. I'm not into Vulcan mindmelds, so I hope everything from the first mail makes sense to you and everyone on this mailing list now. Best regards, Mischa Baars. On Mon, Mar 11, 2024 at 5:01 PM Paul

multi-threaded compiling

2024-03-11 Thread Mischa Baars
explain to me what I'm doing wrong? Hope to hear from you soon. Best regards, Mischa Baars. 2024031100 - gnu questions.tar.xz Description: application/xz

Re: bash conditional expressions

2021-11-12 Thread Mischa Baars
, 2021 at 1:25 PM Greg Wooledge wrote: > On Fri, Nov 12, 2021 at 10:36:01AM +0100, Mischa Baars wrote: > > All of my makefiles only compile source files and link object files that > > are NEW, as in the modification timestamp is newer than OR EQUAL TO the > > access timestam

bash conditional expressions

2021-11-12 Thread Mischa Baars
updated, and not the bash response to a -N conditional expression. Looking forward to a fix! Best regards, Mischa Baars.

Re: Command grouping

2019-10-14 Thread Mischa Baars
On Sun, 2019-10-13 at 10:54 +0100, k...@plushkava.net wrote: > On Sun, 13 Oct 2019 10:09:26 +0200 > Mischa Baars wrote: > > > On Sat, 2019-10-12 at 10:42 -0400, Chet Ramey wrote: > > > On 10/12/19 9:02 AM, Mischa Baars wrote: > > > > Hi, > >

Re: Command grouping

2019-10-13 Thread Mischa Baars
On Sat, 2019-10-12 at 10:42 -0400, Chet Ramey wrote: > On 10/12/19 9:02 AM, Mischa Baars wrote: > > Hi, > > > > Perhaps to better have a look at this mail, than the previous mail. > > > > In trying to group commands, in this case compiler commands, I found som

Command grouping

2019-10-12 Thread Mischa Baars
Hi, Perhaps to better have a look at this mail, than the previous mail. In trying to group commands, in this case compiler commands, I found some peculiarities while trying different combinations of the 'Internal Field Separator' and the 'Parameter Expansion' operator ${parameter@P}. Perhaps

Re: selecting modules for kernel compilation automatically

2019-10-12 Thread Mischa Baars
On Sat, 2019-10-12 at 13:50 +0200, Mischa Baars wrote: > Hi, > > Can someone please tell me why this does work: > > > for i in $(find /lib/modules/5.3.0-next-20190924/ -type f | grep scsi); do > echo $(basename $i .ko.xz); done; > > While this doesn't: > > f

selecting modules for kernel compilation automatically

2019-10-12 Thread Mischa Baars
Hi, Can someone please tell me why this does work: for i in $(find /lib/modules/5.3.0-next-20190924/ -type f | grep scsi); do echo $(basename $i .ko.xz); done; While this doesn't: for i in $(find /lib/modules/5.3.0-next-20190924/ -type f | grep scsi); do grep $(basename $i .ko.xz)

Re: file access time and file modification time

2019-09-24 Thread Mischa Baars
On Tue, 2019-09-24 at 09:29 -0400, Chet Ramey wrote: > On 9/24/19 3:04 AM, Mischa Baars wrote: > > Hi Kerin, > > > > That indeed solves the problem in 'accesstime.sh', although I would > > recommend some sort of reference from the bash manpage to the mount > &g

Re: file access time and file modification time

2019-09-24 Thread Mischa Baars
Strange, it seems the replies did come through. So have you seen them? Let's try the gnome mail client, at least I got a receipt this time. Regards, Mischa. On Tue, 2019-09-24 at 09:04 +0200, Mischa Baars wrote: > Hi Kerin, > > That indeed solves the problem in 'accesstime.sh', a

Re: file access time and file modification time

2019-09-24 Thread Mischa Baars
Hi Kerin, That indeed solves the problem in 'accesstime.sh', although I would recommend some sort of reference from the bash manpage to the mount manpage. Did you have a look at the 'conditional.sh' script too? Looks like the '-N' switch compares only the integer part of the timestamp seconds.

Re: file access time and file modification time

2019-09-24 Thread Mischa Baars
Hi Kerin and Chet, Testing mailing list. My earlier replies didn't come through. Regards, Mischa. On Tue, 2019-07-09 at 11:16 +0100, k...@plushkava.net wrote: > Hi Mischa, > > On Tue, 09 Jul 2019 09:05:45 +0200 > Mischa Baars wrote: > > > Hi Kerin, > > > &g