[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help needed for writing a rule
From: |
Paul Smith |
Subject: |
Re: Help needed for writing a rule |
Date: |
Fri, 25 Nov 2022 12:18:18 -0500 |
User-agent: |
Evolution 3.46.1 (by Flathub.org) |
On Fri, 2022-11-25 at 17:12 +0100, Patrick Begou wrote:
> Of course this works because I am building a ".depends" file with all
> dependencies dynamically too for my application. In the provided
> Makefile example, dependencies are added at the end of the makefile.
Oh, you didn't say this.
This is basically the same as my final note:
> you'll just have to create explicit rules for all your targets.
except instead of you doing it you're relying on your compiler to do
it, which is fine.
> May be this could have side effects I do not see
Make always parses all the makefiles and included makefiles first,
before it starts to build anything. During parsing all the
prerequisites are gathered together, so this:
foo: bar baz ; echo hi
is identical to this:
foo: ; echo hi
foo: bar
foo: baz
Once the makefiles are parsed there's no way to know which of these was
actually seen.