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

Re: [PATCH]swig python bindings build fails on VPATH builds

From: Daniel Rall <dlr_at_collab.net>
Date: 2007-03-31 02:22:33 CEST

Kamesh, it doesn't look like this ever got reviewed. +1 from me,
please commit.

- Dan

On Wed, 14 Mar 2007, Kamesh Jayachandran wrote:

> Hi All,
> Find the attached patch and log that fixes it.
>
> With regards
> Kamesh Jayachandran

> [[[
> Swig python subversion bindings build fails in VPATH builds.
>
> * build/generator/gen_base.py
> (SWIGObject.__inti__):
> Mark as the generated file.
> * build/generator/gen_make.py
> (Generator.write):
> Place the generated 'C' files under 'build dir'.
> * build/generator/swig/checkout_swig_header.py
> (Generator.write_makefile_rules):
> Place the generated '.swg' files under 'build dir'.
>
> Patch by: kameshj
> ]]]

> Index: build/generator/gen_base.py
> ===================================================================
> --- build/generator/gen_base.py (revision 23808)
> +++ build/generator/gen_base.py (working copy)
> @@ -266,6 +266,7 @@
> ObjectFile.__init__(self, filename)
> self.lang = lang
> self.lang_abbrev = lang_abbrev[lang]
> + self.source_generated = 1
> ### hmm. this is Makefile-specific
> self.compile_cmd = '$(COMPILE_%s_WRAPPER)' % string.upper(self.lang_abbrev)
>
> Index: build/generator/gen_make.py
> ===================================================================
> --- build/generator/gen_make.py (revision 23808)
> +++ build/generator/gen_make.py (working copy)
> @@ -172,7 +172,7 @@
> source_dir = build_path_dirname(source)
> opts = self.swig.opts[objname.lang]
> if not self.release_mode:
> - self.ofile.write('$(top_srcdir)/%s: %s\n' % (objname, deps) +
> + self.ofile.write('$(top_builddir)/%s: %s\n' % (objname, deps) +
> '\t$(SWIG) $(SWIG_INCLUDES) %s ' % opts +
> '-o $@ $(top_srcdir)/%s\n' % source
> )
> Index: build/generator/swig/checkout_swig_header.py
> ===================================================================
> --- build/generator/swig/checkout_swig_header.py (revision 23808)
> +++ build/generator/swig/checkout_swig_header.py (working copy)
> @@ -20,9 +20,9 @@
>
> def write_makefile_rules(self, makefile):
> """Write makefile rules to checkout files"""
> - script_path = 'build/generator/swig/checkout_swig_header.py'
> + script_path = '$(top_srcdir)/build/generator/swig/checkout_swig_header.py'
> conf = '$(abs_srcdir)/build.conf'
> - makefile.write('CHECKOUT_SWIG = cd $(top_srcdir) && $(PYTHON)' +
> + makefile.write('CHECKOUT_SWIG = cd $(top_builddir) && $(PYTHON)' +
> ' %s %s $(SWIG)\n\n' % (script_path, conf))
> checkout_locations = []
> for path in self.swig_checkout_files:
>

  • application/pgp-signature attachment: stored
Received on Sat Mar 31 02:22:59 2007

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.