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

Re: busted 'make swig-py'...

From: Greg Stein <gstein_at_lyra.org>
Date: 2003-03-01 00:58:10 CET

On Fri, Feb 28, 2003 at 03:11:16PM -0800, Matt Kraai wrote:
> On Fri, Feb 28, 2003 at 10:41:47PM +0000, Joe Orton wrote:
>...
> > This is a common mistake - you can only use $< in inference rules (.c.o
> > style) to be portable.

Grr...

>...
> > In the BSD make Ben uses $< will expand to
> > nothing in this case - in GNU make it will expand to the left-most
> > dependency (or all of them, I can't remember).

Just the left-most.

>...
> +++ build/gen_make.py (working copy)
> @@ -208,14 +208,16 @@
>
> for objname, sources in self.graph.get_deps(gen_base.DT_SWIG_C):
> deps = string.join(sources)
> - self.ofile.write('%s: %s\n\t$(RUN_SWIG_%s)\n'
> - % (objname, deps, string.upper(objname.lang_abbrev)))
> + self.ofile.write('%s: %s\n\t$(RUN_SWIG_%s) %s\n'
> + % (objname, deps, string.upper(objname.lang_abbrev),
> + deps))

We don't want all of the deps. Just the first one, which is sources[0].

> for objname, sources in self.graph.get_deps(gen_base.DT_OBJECT):
> deps = string.join(sources)
> cmd = getattr(objname, 'build_cmd', '')
> if cmd:
> - self.ofile.write('%s: %s\n\t%s\n' % (objname, deps, cmd))
> + self.ofile.write('%s: %s\n\t%s %s\n'
> + % (objname, deps, cmd, deps.split()[0]))

No need to split. Just use sources[0].

[ btw, note that STRING.split is Python 2.x specific; gen-make and its
  support modules are designed for Python 1.5.2 ]

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Mar 1 00:53:28 2003

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.