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

Re: svn commit: rev 5156 - in trunk: . build

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2003-03-01 17:26:12 CET

kraai@tigris.org writes:

> Author: kraai
> Date: 2003-02-28 18:03:24 -0600 (Fri, 28 Feb 2003)
> New Revision: 5156
>
> Modified: trunk/build/gen_make.py
> ==============================================================================
> --- trunk/build/gen_make.py (original)
> +++ trunk/build/gen_make.py Fri Feb 28 18:03:25 2003
> @@ -205,14 +205,15 @@
>
> 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),
> + 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, sources[0]))

This breaks a build outside the source dir.

/bin/sh /home/pm/sw/subversion/obj/libtool --silent --mode=compile gcc -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -g -O2 -Wwrite-strings -Wsequence-point -Wparentheses -Wall -Wshadow -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations -DSVN_DEBUG -pthread -DNEON_ZLIB -DNEON_SSL -I/usr/local/apache2/include -I../svn/subversion/include -I. -I/usr/local/neon-0.23.5/include/neon -I/usr/local/apache2/include -I/usr/local/apache2/include -o subversion/mod_dav_svn/activity.lo -c subversion/mod_dav_svn/activity.c
gcc: subversion/mod_dav_svn/activity.c: No such file or directory
gcc: no input files

In my build that needs to be ../svn/subversion/mod_dav_svn/activity.c.
How about this? Is it acceptable for gen_make to hard code
top_srcdir?

* build/gen_make.py (Generator:write): Output rules with an explicit
  top_srcdir to make VPATH builds work.

Index: build/gen_make.py
===================================================================
--- build/gen_make.py (revision 5162)
+++ build/gen_make.py (working copy)
@@ -213,7 +213,8 @@
       deps = string.join(sources)
       cmd = getattr(objname, 'build_cmd', '')
       if cmd:
- self.ofile.write('%s: %s\n\t%s %s\n' % (objname, deps, cmd, sources[0]))
+ self.ofile.write('%s: %s\n\t%s $(top_srcdir)/%s\n' %
+ (objname, deps, cmd, sources[0]))
       else:
         self.ofile.write('%s: %s\n' % (objname, deps))

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Mar 1 17:27:11 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.