You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Mathias Weinert <ma...@gfa-net.de> on 2005/11/15 15:35:10 UTC

bug in swig make process?

While investigating the problem with the .swg files
(separate thread) I noticed that 'make clean-swig-pl'
doesn't remove the .swg files in
subversion/bindings/swig/proxy as I expected. Is this
supposed to be a feature?

The reason for this is that the files (and other swig
files) are only deleted if the following condition is
true:
'if test $(abs_srcdir) != $(abs_builddir);'.

But (at least on my machine) Makefile sets these two
variables to the same directory.

If I look at configure.in I see:
     abs_srcdir="`cd $srcdir && pwd`"
     abs_builddir="`pwd`"
which lets me suppose that these two variables will
always be set to the same values.

So, again, bug or feature (or lack of understanding on my side)?

Mathias

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: bug in swig make process?

Posted by David James <ja...@cs.toronto.edu>.
On 11/15/05, Mathias Weinert <ma...@gfa-net.de> wrote:
> While investigating the problem with the .swg files
> (separate thread) I noticed that 'make clean-swig-pl'
> doesn't remove the .swg files in
> subversion/bindings/swig/proxy as I expected. Is this
> supposed to be a feature?
It's a new feature in 1.3.0. We now bundle the generated *.swg files
in the Subversion tarball, so that users can build the Subversion SWIG
bindings without having SWIG installed. When you type "make
check-swig-pl", we don't remove the *.swg files, because there is no
way for you to regenerate them if you don't have SWIG installed. If
you'd like to remove the .swg files for Perl, type "make
extraclean-swig-pl". Python and Ruby offer similar targets.

Cheers,

David

--
David James -- http://www.cs.toronto.edu/~james

Re: bug in swig make process?

Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Tue, Nov 15, 2005 at 04:35:10PM +0100, Mathias Weinert wrote:
> But (at least on my machine) Makefile sets these two
> variables to the same directory.
> 
> If I look at configure.in I see:
>      abs_srcdir="`cd $srcdir && pwd`"
>      abs_builddir="`pwd`"
> which lets me suppose that these two variables will
> always be set to the same values.
> 

If you use what's variously known as an objdir or VPATH build, you'll
notice that these two paths are different.  To do that, create a fresh
directory and run configure from there:

(assuming you've unpacked the tarball into a directory called ~/svn-srcdir)
$ mkdir ~/svn-objdir
$ cd ~/svn-objdir
$ ../svn-srcdir/configure [flags]

Now you'll have a Makefile in ~/svn-objdir that has abs_srcdir set to
~/svn-srcdir, and abs_builddir set to ~/svn-objdir.  Running 'make'
will write only to the build directory, not the srcdir.

> The reason for this is that the files (and other swig
> files) are only deleted if the following condition is
> true:
> 'if test $(abs_srcdir) != $(abs_builddir);'.
> 

So it only deletes the files in objdir builds.  That's odd; I wonder why.

Are the files generated in the srcdir, I wonder?  Some of our files are
(by configure), and make extraclean removes them.

Regards,
Malcolm

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org