Gordon Ross wrote:
I have an error name lookup table I'd like to generate
from the header file that defines those errors.
Right now, we have generated code checked in under
$SRC/common/smbsrv/smb_status_xlat.c
As usual for SRC/common, that file is compiled for
both kernel and user-level code.
If I were to make this generated code, where would be
the appropriate place(s) in the Makefiles to add the
rules to generate the *.c file? Suggestions?
I think you'll want to add rules to generate the C source in the same
places you compile it today (i.e. in the uts and userland makefiles).
It might seem more efficient to generate the C source once in
$SRC/common, but that would introduce a race in the build process. To
fix it, you'd have to impose a dependency between the Makefile that
generates the C source (which might be one of the consumers) and any
remaining consumers.
Scott
--
Scott Rotondo
Senior Principal Engineer, Solaris Engineering
President, Trusted Computing Group
Phone/FAX: +1 408 850 3655 (Internal x68278)
_______________________________________________
tools-discuss mailing list
tools-discuss@opensolaris.org