Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Parallel processing




> On Mar 27, 2022, at 14:23, Dominik Vogt <dominik.vogt@xxxxxx> wrote:
> 
> On Thu, Mar 24, 2022 at 11:34:07PM -0500, Perry Smith wrote:
>> I need to do about 20 commands.  Each will take several hours to perhaps days.  I???d like to start some fixed number like 4 jobs that are running.  The others are waiting for one of the others to get finished.
>> 
> 
>> I tried creating a Makefile and use the -j option in make but my
>> targets have spaces in them and make doesn???t like that.  (This
>> is on a BSD system.)
> 
> Are you talking about GNU Make?  What is the problem?
> 
> $ cat Makefile
> TARGETS = a\ b foo\ bar
> all: $(TARGETS)
> foo\ bar:
>        touch "$@"
> a\ b:
>        touch "$@"
> $ ls .
> Makefile
> $ make -j 2
> $ ls .
> a b  foo bar  Makefile
> 

I’m inside a BSD “jail”.  They have their own make (I believe).  Let me try the syntax and see if I can get it to work.  The next challenge will be to get this syntax to work from within a list so I can say:

${LIST_OF_TARGETS} :

Where an item in the list can have spaces.







Messages sorted by: Reverse Date, Date, Thread, Author