[bug #17881] Better documentation of make rules

2023-01-02 Thread Paul D. Smith
Update of bug #17881 (project make):

  Status:None => Fixed  
 Assigned to:None => psmith 
 Open/Closed:Open => Closed 
   Component Version:None => 3.81   

___

Follow-up Comment #3:

GNU make 4.4 provides a shuffle feature that allows makefiles to be tested
more easily for errors in parallel behavior.

I have other bugs relating to clarifying the introductory documentation here
so I'll close this one.


___

Reply to this item at:

  

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




[bug #17881] Better documentation of make rules

2006-11-21 Thread Paul D. Smith

Follow-up Comment #2, bug #17881 (project make):

Actually, make _does_ guarantee that rules will be processed in left-to-right
order.  If you never use parallelism, you can be sure your rules will always
run in that order.

If you do use parallelism, though, obviously more than one of these rules
will run at the same time.  Even though make still starts them in
left-to-right order in the makefile, it's up to your operating system to
schedule the programs.  In this case it's almost certain that commands to
build the second target will start before the commands to build the first
have completed.

I'm sure you're aware of this.  However, saying the order is "insignificant"
is not exactly correct.  Saying that it is unreliable during parallel builds
is better.

As for Howard's suggestion, that suggestion has been made before and I think
it's a good one.  However, it's not completely trivial to implement.  For one
thing, we can't afford to change the values of variables such as $<, or even
$^ in some cases, so make would have to keep a separate list of "prereqs to
run" vs. "prereqs used in automatic variables".

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/



___
Bug-make mailing list
Bug-make@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-make


[bug #17881] Better documentation of make rules

2006-09-28 Thread Howard Chu

Follow-up Comment #1, bug #17881 (project make):

It might be worthwhile to add some kind of makefile validation flag, which
processes all prerequisites in random or right-to-left order, specifically to
expose occurrences of incorrect prerequisites.

___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/



___
Bug-make mailing list
Bug-make@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-make


Re: [bug #17881] Better documentation of make rules

2006-09-28 Thread Howard Chu
Bah. Pretty sure I selected "Documentation" for this submission, not 
"Enhancement".


Howard Chu wrote:

URL:
  

 Summary: Better documentation of make rules
 Project: make
Submitted by: hyc
Submitted on: Thursday 09/28/2006 at 20:26
Severity: 3 - Normal
  Item Group: Enhancement
  Status: None
 Privacy: Public
 Assigned to: None
 Open/Closed: Open
   Component Version: None
Operating System: None
   Fixed Release: None

___

Details:

The GNU make manual should state explicitly in section 4.2, Rule Syntax,
something to this effect:

When multiple prerequisites are listed for a rule, their order is
insignificant. In particular, you should not assume that prerequisites will
be processed in left-to-right order. Rules that list prerequisites that
depend on other prerequisites in the same rule are invalid and will break
when processed by a parallel make.

For example, given a rule

targetA: reqOne reqTwo reqThree


if "reqThree" cannot be built successfully until "reqOne" already exists,
then this rule does not specify the actual dependencies of targetA. The
correct rules would be:

reqThree: reqOne

targetA: reqTwo reqThree


  



--
 -- Howard Chu
 Chief Architect, Symas Corp.  http://www.symas.com
 Director, Highland Sunhttp://highlandsun.com/hyc
 OpenLDAP Core Teamhttp://www.openldap.org/project/



___
Bug-make mailing list
Bug-make@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-make


[bug #17881] Better documentation of make rules

2006-09-28 Thread Howard Chu

URL:
  

 Summary: Better documentation of make rules
 Project: make
Submitted by: hyc
Submitted on: Thursday 09/28/2006 at 20:26
Severity: 3 - Normal
  Item Group: Enhancement
  Status: None
 Privacy: Public
 Assigned to: None
 Open/Closed: Open
   Component Version: None
Operating System: None
   Fixed Release: None

___

Details:

The GNU make manual should state explicitly in section 4.2, Rule Syntax,
something to this effect:

When multiple prerequisites are listed for a rule, their order is
insignificant. In particular, you should not assume that prerequisites will
be processed in left-to-right order. Rules that list prerequisites that
depend on other prerequisites in the same rule are invalid and will break
when processed by a parallel make.

For example, given a rule

targetA: reqOne reqTwo reqThree


if "reqThree" cannot be built successfully until "reqOne" already exists,
then this rule does not specify the actual dependencies of targetA. The
correct rules would be:

reqThree: reqOne

targetA: reqTwo reqThree







___

Reply to this item at:

  

___
  Message sent via/by Savannah
  http://savannah.gnu.org/



___
Bug-make mailing list
Bug-make@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-make