Subject: dependancies / multiple lex/yacc parsers
To: None <>
From: Bryan Cribbs <>
List: netbsd-users
Date: 05/21/2004 01:03:53
I have two build architecture questions, I'll start with the
specific one.

I am taking advantage of the /usr/share/mk/bsd.*.mk files, and I
have a few subdirectories in the project which make libraries I
want to staticly link.  So I set SUBDIR and .include
<>, and in the subdirs the Makefiles set variables
and delegate to <>.

This works fine from the toplevel if 'make dependall' is used,
otherwise it will fail (most of the time, e.g. in a clean
environment 'make' will try to build the toplevel source first
but the ar's won't exist).  Can I coerce this to have a plain
'make' do the right thing?

That's my first question, thanks for reading this far.  The
situation that led to this was needing two lex/yacc parsers
linkable in one application.  I could do this easily by
abandoning the /usr/shar/mk/* includes and manually setting the
targets with different prefix's for "yy", but the .mk files
provide such leverage that I'm reluctant to not use them.  I
tried several things and the parser-as-static-linked-library
approach seemed to have the most clarity.  So my second sort-of
vague question: is there a better way?