> Where is the Makefile machinery located which creates the files for
> "ast-open-locale" (e.g.
> http://www.research.att.com/~gsf/download/tgz/ast-open-locale.2006-02-14.tgz)
> - while doing a quick look I didn't saw a location where this is done...
> ;-(
the machinery is via ast nmake in src/cmd/nmake/msgcat.mk that is included by
the nmake base rules src/cmd/nmake/Makerules.mk
download the ast-base source package and
package read
package make
package make msgcat
or after 'package make' cd to any directory that viewpaths a Makefile or
Nmakefile
e.g.,
$INSTALLROOT/src/cmd/ksh93 for just ksh93
$INSTALLROOT/src/cmd for all commands
$INSTALLROOT/src for everything
and run
nmake msgcat
to construct *.msg files for the corresponding directories
'make msgcat' uses the ast msgcc(1) command to extract locale strings from the
source
msgcc(1) has a cc(1) style interface -- the msgcat common action essentially
modifies the .c -> .o -> a.out rules to use msgcc instead of cc and to generate
.c -> .mso -> .msg
after the .msg files are built run
msgadmin --generate
to generate and install the binary message catalog files in
$PACKAGEROOT/share/lib/locale/C/LC_MESSAGES/* from the *.msg files
in the $INSTALLROOT/src tree
most ast nmake makefiles specify source and command or library targets
and defer to the nmake base rules on how to get from source to target
this plus nmake rules being first class objects makes it easy to program
different source transformations from the makefile assertions, e.g.,
msgcat, tgz (make tarball from source), list.install (list targets
installed by this makefile), list.manifest (list the source (non-generated)
files) -- nmake maintains state in *.ms, and that is used to distinguish
between source and generated files without redoing the build
note that for the most part no special junk is required of the makefiles
for the base rules common actions to work -- for the ast-base components
only the libast makefile contains an extra message catalog assertion
:MSGKEY: misc/magic.tab
this announces a non-standard (i.e., not a C source file) source for
strings to be translated for the ast magic(3) api, used by ast file(1)
btw, nmake determines the correct build order in a hierarchy of makefiles
by closure on the makefile assertions
-- Glenn Fowler -- AT&T Research, Florham Park NJ --