Subject: Missing yacc dependency in bsd.lib.mk
To: None <netbsd-users@netbsd.org>
From: Peter Bex <Peter.Bex@student.kun.nl>
List: netbsd-users
Date: 06/09/2004 10:29:23
--0OAP2g/MAC+5xKAE
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hey again,

Working on our project we noticed that when we change a line in our yacc fi=
le,
the matching lex file does not get recompiled.  Which it should, via the de=
pendency
on the header file which gets generated from the yacc file.

foo.y -> { foo.c, foo.h }
foo_lex.l -> { foo_lex.c }

foo_lex.c has a  #include "foo.h".

Looking at bsd.prog.mk, I can see the following four lines which say:

DPSRCS+=3D        ${SRCS:M*.l:.l=3D.c} ${SRCS:M*.y:.y=3D.c}
DPSRCS+=3D        ${YHEADER:D${SRCS:M*.y:.y=3D.h}}
CLEANFILES+=3D    ${SRCS:M*.l:.l=3D.c} ${SRCS:M*.y:.y=3D.c}
CLEANFILES+=3D    ${YHEADER:D${SRCS:M*.y:.y=3D.h}}

All lines except for the second are present in bsd.lib.mk.  Shouldn't it be=
 there
as well?
Especially since the yacc generated header is added to cleanfiles, making t=
he
mk file rather inconsistent.

Should I send-pr, or am I missing something here?

This is on NetBSD 2.0_BETA.  On NetBSD 1.6.2, the situation is the same, the
lines are just a bit more cryptic (but they express the same thing).

Regards,
Peter
--=20
http://www.student.kun.nl/peter.bex
--
"The process of preparing programs for a digital computer
 is especially attractive, not only because it can be economically
 and scientifically rewarding, but also because it can be an aesthetic
 experience much like composing poetry or music."
							-- Donald Knuth

--0OAP2g/MAC+5xKAE
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (NetBSD)

iD4DBQFAxspjLg33BXzVMqsRAoeSAKC3WYAyadtcSB4L38y/X2MgzTIrnwCXdft9
as+VHJPzIf5z9O+BWvO5fA==
=0Ukb
-----END PGP SIGNATURE-----

--0OAP2g/MAC+5xKAE--