bug-make
[Top][All Lists]
Advanced

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

Re: new feature idea: ingesting processed rulesets


From: David A. Wheeler
Subject: Re: new feature idea: ingesting processed rulesets
Date: Fri, 26 May 2023 16:59:46 -0400


> On May 24, 2023, at 2:37 AM, Zoltán Turányi <zoltan.turanyi@ericsson.com> 
> wrote:
> 
> Hi David,
> 
> Thanks for your informative response, comments and references.
> 
> I do see your point (and in a way wanted to attack the separation of the DAG 
> myself with this topic).
> However, the advice to place all make information into a top-level 
> Makefile.am is not always practical. The point of subdirectories is 
> isolation, this is why we put files into separate directories. The 
> dependencies between such directories would be best placed besides them not 
> in some central makefile.

You can have as many files as you want to have. Even put them in subdirectories.
That's not the point.

If you're running multiple make *processes*, e.g., "make" invokes "make",
you're going to create a problem for yourself. It'll be okay if you NEVER have 
*any* external
dependencies between the directories, but they always seem to sprout up.
If you have multiple processes
running "make", then typically all of them have wrong data, and they end up 
doing the wrong thing.


> Henrik mentioned inclusion. I find that a more attractive solution as it 
> seems to combine the best of both worlds: it has both isolation

I don't know what you mean by "isolation". Make has access to the entire 
visible filesystem,
it doesn't enforce any special access controls.

> and results in a single DAG. Do you think autotools is possible to instrument 
> to do that? Any advice on how to set it up?

Inclusion is easy, just use "include". This is even in POSIX make.
Prefix it with "-" if sometimes the files might not exist
(e.g., if you're including files of generated dependencies, conventionally 
named *.d).
The "include" directive is not specific to the autotools, though of course 
autotools supports it well.
You don't really need to do anything special. Just put the makefile fractions 
where
they make sense to you.

If you really insist on having "make" invoke other "make" processes (aka 
"recursive make"),
automake (part of the autotools) has support for it using "SUBDIRS=". It is a 
convenient noose,
but I recommend not putting your head in it :-).

I feel like there's some miscommunication that I can't quite identify.
But in spite of that, I hope I answered your question. 

--- David A. Wheeler


reply via email to

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