Re: Intermittent parallel make rebuild failures

2010-10-07 Thread David Highley
OK, after more testing I now believe that I have leaped to the Island
of Conclusions in the Sea of Wisdom more than once, or more accurately
I have fallen into the unconscious incompetent syndrome.

Let us just cut to the essence of the issue we are running into, how do
target prerequisites get processed in version 3.81 of make?

Example:
$(LIBRARY): $(INF_DIST_SVCS_OBJS)

$(INF_DIST_SVCS_OBJS): $(DIRS)

$(DIRS):

.PHONY: $(DIRS)

With parallel building how does the macro $(INF_DIST_SVCS_OBJS) get
evaluated before the target $(DIRS) is done? Is there a method to stop
this other than turning parallel building off?

I did read the update NEWS and looked through all the backward
incompatibles and down loaded the latest manual so I'm really not
understanding what is causing this issue. The target $(DIRS) does invoke
sub make processes but I do not see the why that would matter in the
context of understanding how the prerequisites are processed.

David Highley wrote:
 
 Well, I'm going to have to eat crow on this one. After much digging into
 this issue, down loading older versions of make back to 3.78.1.
 Researching our large build process and its history I find that we had
 disabled parallel building for this one library build in the past. We
 use the build construct describe before all over our build process and I
 find only this one library build where we disabled parallel building for
 the top makefile. I can find nothing unique about this library build as
 compared to our other library builds so I'm still not able to understand
 why we need to disable parallel building for this one library. Note the
 disabling is only for the top makefile, all the sub makes are still
 parallel which in effect means that only one source directory has sub
 make launched at a time. We have larger library builds and we have
 smaller library builds so we see no reason why this one exhibits a
 parallel build issue.
 
 What I also found was the lack of comments for the reason we disabled
 parallel building before, which I have now corrected. I did retest with
 the current version of make 3.82 and found no issue. But since I only
 did testing with the problematic area I'm not able say whether it works
 in general. Paul, if you would like me to do a larger test with the
 latest version let me know and I can work that in.

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


Re: Intermittent parallel make rebuild failures

2010-10-07 Thread Philip Guenther
On Thu, Oct 7, 2010 at 9:22 AM, David Highley
dhigh...@highley-recommended.com wrote:
...
 Let us just cut to the essence of the issue we are running into, how do
 target prerequisites get processed in version 3.81 of make?

 Example:
 $(LIBRARY): $(INF_DIST_SVCS_OBJS)

 $(INF_DIST_SVCS_OBJS): $(DIRS)

 $(DIRS):

 .PHONY: $(DIRS)

 With parallel building how does the macro $(INF_DIST_SVCS_OBJS) get
 evaluated before the target $(DIRS) is done? Is there a method to stop
 this other than turning parallel building off?

Have you read the info pages section How `make' Reads a Makefile?
In it, it explains that variables in targets and prerequisite lists
are expanded immediately when the rule is read during the parsing of
the Makefile.  So, *before any targets have been built*,
$(INF_DIST_SVCS_OBJS) will be expanded twice during the parsing of the
above Makefile snippet, once when the $(LIBRARY) rule is parsed and
once when the $(INF_DIST_SVCS_OBJS) rule is parsed.

The -j option has no effect on that, so I don't understand your last
question above.  Or are you saying that this makefile is part of a
recursive make setup, so that it might be read multiple times, the
earlier of which could affect the latter of which?


Philip Guenther

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