perl-module: Fix build race.
authorBen Pfaff <blp@cs.stanford.edu>
Sat, 9 Oct 2010 03:59:10 +0000 (20:59 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Sat, 9 Oct 2010 03:59:10 +0000 (20:59 -0700)
perl_module_tarball invokes module-make in a submake.  In turn, until now
module-make has depended on src/libpspp-core.la.  But if a parallel build
is in progress, then the parent make is likely also building the same
library.  Sometimes the race in linking this library causes build failures.

The ideal solution would be to avoid the submake.  We could do this, by
giving the files in the build different names from those in the source
directory (e.g. distributing the files with .dist extensions, or copying
them into or out of a subdirectory).

This commit instead implements a minimal fix, by making the dependency on
src/libpspp-core.la part of the top-level perl_module_tarball target,
instead of part of the submake's module-make target.

With this commit, 10 consecutive test runs on my laptop completed
successfully.  Without this commit, about 50% of nontrivial builds fail.


No differences found