[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Fix make -j for SWIG bindings

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2005-12-17 23:15:26 CET

David James <james82@gmail.com> writes:

> Aha! This is exactly the problem. Using regular make, the
> "external_runtime.py" only gets invoked once because it generates all
> three files (plus some other files) the first time it is invoked.
> Using parallel make, it's possible that external_runtime.py could be
> run three times in parallel.

It's not even the fact that it runs in parallel that is the problem.
The script appears to delete the output files before recreating them,
so even sequential runs will delete files created by a previous run
thus explaining the 'No such file' error. Even without the delete,
the fact that the output files get rewritten means that while looking
at the results of a previous run a subsequent run could cause the file
to be incomplete.

> P.S. (It's also possible to fix this issue by updating
> external_runtime.py to generate each dependency, including the long
> long fix and the checked-out SWIG headers, separately. To implement
> this, we'd probably split up external_runtime.py into several scripts,
> including a 'swig_checkout.py'. Would anyone like to work on this?)

Yes, that would work. The current script is a very poor match for a
Makefile rule.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Dec 17 23:16:14 2005

This is an archived mail posted to the Subversion Dev mailing list.