bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: multi-threaded compiling


From: Paul Smith
Subject: Re: multi-threaded compiling
Date: Tue, 12 Mar 2024 16:59:51 -0400
User-agent: Evolution 3.50.4 (by Flathub.org)

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
> for every new project I start. The Makefile in question contains only
> a few lines of code and some environment variables, but works on
> every new project as long as you follow certain guidelines regarding
> the directory structure. It scans, compiles and links on the fly.

I don't find this argument compelling.  It's relatively straightforward
to create a makefile environment that "works on every new project as
long as you follow certain guidelines regarding the directory
structure" while still using parallel builds, that will "scan, compile,
and link" on the fly, using things like the wildcard function, pattern
rules, etc.

You are merely trading a bit of extra complexity in your makefile for a
whole lot of complexity and tricky hacking in bash, as can be seen by
following this thread.

But if you prefer to re-invent make's parallel build capabilities in
bash, certainly that's your prerogative.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]