Re: [bug #58056] Forced prerequisite order is not honored with pattern rules

2020-03-30 Thread Henrik Carlqvist
On Mon, 30 Mar 2020 15:35:01 -0400 (EDT)
anonymous  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
"exist-only-prerequisites".

> 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
directory.

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 '|'
>is serialized.

What part of
https://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html
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
> this.

Instead you might want to look at what the existance of the .NOTPARALLEL
target in a Makefile does.

regards Henrik



Re: [RFC] Scoped variables, supercharged

2020-03-30 Thread Paul Smith
On Fri, 2020-03-20 at 20:46 +0100, Jouke Witteveen wrote:
> On Thu, Dec 26, 2019 at 2:03 PM Jouke Witteveen <
> j.wittev...@gmail.com> wrote:
> > I would like make to have scoped variables. Here, I will propose an
> > implementation of them. This implementation is currently without
> > tests and documentation. Hopefully, the proposal is acceptable and
> > I can add the tests and documentation.
> 
> Was this proposal ever rejected?

I think this would be a useful addition, personally.

I expect that something like this would require paperwork to assign
copyright to the FSF.  Is that something you'd be willing to do?  If so
you can reply to me privately and I'll set you up.  This can be done
completely electronically from many countries these days.




[bug #57896] Incorrect directory is printed in "Entering directory" message when -j1 disables jobserver mode for a sub make

2020-03-30 Thread Paul D. Smith
Update of bug #57896 (project make):

  Status:None => Fixed  
 Open/Closed:Open => Closed 
   Fixed Release:None => SCM

___

Follow-up Comment #2:

I fixed this, but it also involved fixing some incorrect behavior when
providing both -w and --no-print-directory.

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




[bug #57967] make messes up the terminal

2020-03-30 Thread Paul D. Smith
Update of bug #57967 (project make):

  Status:None => Fixed  
 Assigned to:None => psmith 
 Open/Closed:Open => Closed 
   Component Version: SCM => 4.0
   Fixed Release:None => SCM

___

Follow-up Comment #1:

Patch applied.  Thanks!

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




[bug #58056] Forced prerequisite order is not honored with pattern rules

2020-03-30 Thread anonymous
Follow-up Comment #12, bug #58056 (project make):

If this behavior is allowed, I think the documentation should clarify what the
order-only prerequisites actually means. I still haven't figured out their
purpose or how they operate based on the documentation or what has been said
here. To me, the documentation basically implies that everything after the '|'
is serialized.

Sorry if this is getting of topic, but the issue exists in the first place
because of this confusion. I usually never assume any serialization of the
prerequisites, but I needed to enforce it in a particular scenario and though
the '|' was for this.

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




Re: [bug #58056] Forced prerequisite order is not honored with pattern rules

2020-03-30 Thread Henrik Carlqvist
On Mon, 30 Mar 2020 12:17:24 -0400 (EDT)
anonymous  wrote:

> Wait, so order-only prerequisites does NOT mean serialized make for
> these prerequisites?

Nope.

> "a situation where you want to impose a specific
> ordering on the rules to be invoked" ← That's not what this means?

Please read the rest of that sentence, and pay special attention to the
bold italic *without*:

"...*without* forcing the target to be updated if one of those rules is
executed".

Tha page has a good example explaining that order-only-prerequisites will
be created if needed but their updates will not cause your targets to be
rebuilt.

regards Henrik



[bug #58056] Forced prerequisite order is not honored with pattern rules

2020-03-30 Thread anonymous
Follow-up Comment #6, bug #58056 (project make):

[comment #4 comment #4:]
> So I claim that parallel make and order-only prerequisites are distractions
here. We should start with the documentation: what does it guarantee about the
build order of the prereqs in the example makefile variants, in a serial
make?

Wait, so order-only prerequisites does NOT mean serialized make for these
prerequisites? "a situation where you want to impose a specific ordering on
the rules to be invoked" ← That's not what this means?

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




[bug #58056] Forced prerequisite order is not honored with pattern rules

2020-03-30 Thread anonymous
Follow-up Comment #5, bug #58056 (project make):


[comment #3 comment #3:]
> make builds order only prerequisites in parallel.

How can the ordering on the rules be respected then?

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/




[bug #58056] Forced prerequisite order is not honored with pattern rules

2020-03-30 Thread anonymous
Follow-up Comment #2, bug #58056 (project make):

[comment #1 comment #1:]
> This behavior is intended.
> [...]
> 2. Another reason is to allow parallel execution. If all prerequisites had
to be built in the specified order how would you built them in parallel?

Did you notice the '|'? foo_A and foo_B are order-only-prerequisites, which
should disable any parallelism.

https://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html

___

Reply to this item at:

  

___
  Message sent via Savannah
  https://savannah.gnu.org/