From: Robert J. Hansen <rjh@si...> - 2005-12-28 12:25:31
Here's an interesting question for you.
Consider the canonical "./configure && make && make install" dance.
There are some interesting questions re: targets.
* Which language bindings should be built?
* How do we know where to install them?
There are (at least) three ways to address this. The first one is quick
but dirty, and the last is more complex but better.
* We require Perl, Python, Java, PHP, etc., in our configure script
This has the major disadvantage of if you just want the PHP wrappers,
you have to install the JDK anyway. On the other hand, it has the major
advantage of being quick to code and dead simple. Our makefile target
is simple: we make all the bindings and install them to their default
* We require Perl, Python, Java, PHP, etc., in our configure script and
have specialized Makefile targets
Like above, but instead of "make" you'd do "make python ; make
python-install", "make perl ; make perl-install", etc. Advantage is
that it only builds what you want. Disadvantages are that (a) it breaks
the standard Autotools build dance, and (b) if you've already got all
the languages anyway, why not build everything all at once? It's not
like the SWIG bindings take a long time to compile.
* We default to only Python, but allow options to configure to enable
other bindings to be build. (e.g., "./configure --enable-perl
Advantage: it's the most Autotoolsy solution. Disadvantage: ... it's
the most Autotoolsy solution. I have no idea how to do conditional
compilation in Autotools. I strongly suspect it would end in tears,
bloodshed, thoughts of suicide and homicide, and me slinging a lot of m4