Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: whacking the src/bin/sh/mk*.sh scripts altogether

On Thu, Feb 28, 2008 at 07:33:52PM -0800, Tom Spindler wrote:
> Instead of worrying about fixing all the generation scripts, I took a
> look at the generated output for a couple of different arches:
> i386, amd64, mac ppc, mac68k, sparc, sparc64, mips, alpha, and arm.
> In no case were any of the generated .c or .h files different! All nine
> arches have identical md5 checksums for the files.
> Since this is the case, and it seems like the build process for all
> of them has gotten increasingly baroque, it seems like the most
> sensible thing to do is to whack the mk*.sh files and commit the
> generated files into the tree.
> Anybody see issues with this?

The purpose of the scripts is to allow the generated data to be
described with the code that uses it, not necessarily to be machine/arch

For instance init.c contains code from various source files that
needs to be executed at startup, or when leaping back to the top
of the main loop.

Other generated files contain information that can't (easily) be
generated by cpp, but where various items must match.

This is why the output is the same for all archs (I think one of
the files should change if 'char' is 'unsigned').

It might be possibly to rearrange the source, and the way some of
the values are defined, in order to avoid the generated files.
But committing generated files is a complete PITA.

You might as well say that we should commit the output of lex and yacc.

(One day I'll sort out the system call files so they get generated
onthe fly.)


David Laight:

Home | Main Index | Thread Index | Old Index