[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug #58056] Forced prerequisite order is not honored with pattern r
Re: [bug #58056] Forced prerequisite order is not honored with pattern rules
Tue, 31 Mar 2020 07:55:59 +0200
On Mon, 30 Mar 2020 15:35:01 -0400 (EDT)
anonymous <address@hidden> wrote:
> If this behavior is allowed, I think the documentation should clarify
> what the order-only prerequisites actually means.
Maybe a better name than "order-only-prerequisites" would have been
> I still haven't figured out their purpose or how they operate based on
> the documentation or what has been said here.
I thinke the example in the documentation is rather clear and exactly
shows the need of order-only-prerequisites. You have a Makefile creating
object files from source files and want these object files in a directory
of their own and that directory should also be created by the Makefile.
Before the Makefile creates any object file it will have to create the
directory, therefore the object files will depend upon the directory.
But even though the object files depend upon the directory you do not want
to rebuild the object files becuase the timestamp of the directory changes
as it will change whenever some file is added or removed from the
That is exactly what the order-only-prerequisites is for, if the
order-only-prerequisite does not exist it will be created. If the
order-only-prerequisite does exist and has a newer timestamp than the
target it will still not cause the target to be rebuilt.
>To me, the documentation basically implies that everything after the '|'
What part of
made you think that? Was it that sentence that you read only half the
sentence, stopping at the emphasized important part of the sentence? I
don't think that sentence could have been any more clear, the important
part is even emphasized as bold and italic.
> I usually never assume any serialization of the prerequisites, but I
> needed to enforce it in a particular scenario and though the '|' was for
Instead you might want to look at what the existance of the .NOTPARALLEL
target in a Makefile does.