On Fri, 2007-06-22 at 09:46 -0600, Alan Silverstein wrote:
> > [The build system is a mess though :]
> Not so great to hear that. :-(
> I didn't have a lot of trouble getting it to work in a new, foreign
> environment by wrapping the Makefile.multi with a little Makefile and a
> few simple changes to configure.
Felix doesn't use make. There are two problems.
The make system does these two things:
1. Files from JudyCommon are copied to Judy1 and JudyL
with new names.. then compiled with switches to determine
which thread of the file to make.
2. The Judy1 and JudyL tables files are generated by JudyTableGen
which is sensitive to configuration.
both of which are very annoying :) I'll elaborate, with recommendations:
1. the build system in Felix has a very limited set of rules.
Copying of header files is supported. Copying and renaming
code files isn't. In the Judy build, it is unnecessary, confusing,
and puts some switches in the wrong place anyhow.
/* Judy1/Judy1ByCount.c */
is much better, because it involves no copying, and removes the
need for the JUDY1 macro on the command line.
It took me hours to figure out how things got built.
2. The configure driven dynamic generation of the Judy tables
is a bit nasty. This won't work in a cross compilation environment.
And it isn't necessary. Instead of this, the generator can be
included, but normally it should not be built.
Instead, just include both JudyTables32.c and JudyTables64.c
in the repository and choose one with conditional compilation
with the same technique as above for Judy1/JudyL.
My problem is: I unpack the tarball, and then wrap the sources
up into a new package. The Felix build system them compiles the
sources. The problem is
1. Some of the sources are missing (they're created by copying)
2. Some of the sources are missing (they're created by JudyTablesGen)
3. Some of the sources don't build correctly without extraneous
command line macros (-DJudy1).
The two changes above fix those problems: the tarball can be built
just by compiling all the files with only 32/64 bit command line switch.
Note: this isn't a big issue by comparison with how good Judy is!
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net