[Xapian-devel] Rules for running SWIG

Olly Betts olly at survex.com
Thu Apr 26 20:44:46 BST 2007


On Thu, Apr 26, 2007 at 08:12:53PM +0100, Richard Boulton wrote:
> My first thought was "how does the .stamp file end up existing when the 
> xapian_wrap.cc file doesn't", but I suppose that that could happen in 
> various ways.

In this case I moved the file to a different name so I could diff two
versions.

> (The build system should never leave it like that, 
> though, as far as I can see.)

I think you're probably right, unless perhaps "make clean" is
interrupted.  But it's not totally unreasonable to want to be able to
delete files by hand like this.

> I have seen a nasty solution, though, which is attached to this email: 
> basically, it adds a rule for generating the xapian_wrap.cc files from 
> the .stamp file, which checks if the _wrap.cc files already exist, and 
> if not, deletes the stamp file and runs a sub-make to regenerate it.

The automake manual (at least for automake 1.10) has a section on this
problem.  It's probably a good idea to pick something from there to
avoid an approach with hidden pitfalls.

The simplest solution there avoids the "stamp" file but doesn't scale
well to multiple outputs, which is a problem for C#, but probably OK for
most languages which generate 2 or 3 outputs.

There's a cleaner variant of your idea too, which only needs to check
one file.  If you want to take a look and don't have it to hand, it's on
ixion:

info /u1/olly/automake-1.10/doc/automake.info Multiple\ Outputs

But these are maintainer rules and there's an easy workaround (just
delete the stamp file by hand too) so it can wait until after 1.0 if
you're busy.

Cheers,
    Olly



More information about the Xapian-devel mailing list