Subject: Re: misc/5577: /usr/src/bin/sh can not be built with PARALLEL set in env
To: Craig M. Chase <chase@orac.ece.utexas.edu>
From: Todd Vierling <tv@pobox.com>
List: netbsd-bugs
Date: 06/12/1998 22:30:26
On Fri, 12 Jun 1998, Craig M. Chase wrote:

: b) neither YHEADERS nor PARALLEL are set (and files include y.tab.h)

I wrote the new YHEADER setup, so let me comment a moment.  When doing a
parallel make, special rules are called that attempt to make up for the
deficiency in the .y.c rule wrt yacc.  The problem with updating everything
to use YHEADER is that some source already has the given named .h file as
something completely different.  Therefore it's necessary to output
something else, "just in case" there is already a .y.c rule in progress in a
parallelized make. 

I've been contemplating a proper fix for this for a while, and my best
option so far is:

- if YHEADER is not set, do not build a .h file.
- if YHEADER is set and YFLAGS contains "-d", use the non-parallel rules.
  This would create a y.tab.c (changed to basename.c) and a y.tab.h,
  untouched.
- if YHEADER is set, build a .h file with the same basename.

The only change here is to avoid use of the parallelized rules in the one
case where YFLAGS contains "-d".  Where a y.tab.h is needed, there should
only be one .y file, so the parallelized rules are unneeded and we can hack
around them.

-- 
-- Todd Vierling (Personal tv@pobox.com; Bus. todd_vierling@xn.xerox.com)