Subject: ATTN: New handling of yacc source files
To: None <current-users@NetBSD.ORG, tech-toolchain@NetBSD.ORG>
From: Todd Vierling <tv@NetBSD.ORG>
List: tech-toolchain
Date: 04/08/1998 20:34:47
In order to be more standards compliant and "clean," I have changed
in NetBSD-current to avoid creating a `' file by default.  This has
included commits around the tree to fix all the hackery various programs
have used to work around this. 

There are now two ways to get the .y.c rule to build you a header file as
well as a C source file:

- If you include any of the <bsd.*.mk> files as the NetBSD source tree does,
  simply set YHEADER.  This directive tells <> to generate a
  header file with the same basename as the yacc file (i.e. gram.y outputs
  gram.c and gram.h).  It also defindes a .y.h rule that will generate the
  file.  The <bsd.{kmod,lib,prog}.mk> files will add the header to the
  ${CLEANFILES} list automatically if the .y file is in ${SRCS}. 

- If you're only using <> (i.e. the default make rules), you shouldn't
  be depending on the .y.c rule to create a file for you--that's not
  specified by any standard.  Instead, you can set YFLAGS=-d to create the file (not the same basename as the yacc file, it's actually called
  ""), or override the .y.c rule.  The previous behavior was to
  default YFLAGS to -d, which created the header file.

-- Todd Vierling (Personal; Bus.