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

[Patch] build/generator/msvc_dsp.ezt, build/generator/gen_win.py

From: Dale Hirt <dale_at_sbcltd.com>
Date: 2003-05-05 22:41:08 CEST

Ok, will someone please bang on this for awhile? This may or may not work
on VC.NET. I know that it works on VC++ 6.0. I actually have things almost
working now. Although, for some reason svn does not recursively depend on
libsvn_diff. Ugh. If you build it, they will come.

  * If target is an executable, add Output_Dir as a libpath, since that is
where all the static libs are currently being placed.

Index: build/generator/gen_win.py
  * (_get_winlib_from_dll) Added in helper function to strip off beginning
path, and ending extension from TargetLibs, and bring it more in line with
what is actually compiled. I'm hoping someone can come up with a better way
of finding this out, since this is a bit hacky.
  * (get_win_libs) In order to get rid of all the LNK4006 errors generated
when any command line app is compiled, we need to specify exactly what libs
we want. In this case, what we do is we put into nondeplibs both
ExternalLibs, and TargetLibs, while making sure they're each uniquely

Index: build/generator/msvc_dsp.ezt
--- build/generator/msvc_dsp.ezt (revision 5810)
+++ build/generator/msvc_dsp.ezt (working copy)
@@ -46,7 +46,7 @@
 # ADD RSC /l [if-any is_exe]0x409[else]0x424[end]
-[if-any is_exe is_apache_mod]# ADD LINK32 /nologo [is configs.name
"Debug"]/debug[end] [if-any is_apache_mod]/dll[end] /machine:IX86[for libs]
[libs][end][for configs.libdirs] /libpath:"[configs.libdirs]"[end]
+[if-any is_exe is_apache_mod]# ADD LINK32 /nologo [is configs.name
"Debug"]/debug[end] [if-any is_apache_mod]/dll[end] /machine:IX86[for libs]
[libs][end][for configs.libdirs] /libpath:"[configs.libdirs]"[end] [if-any
Index: build/generator/gen_win.py
--- build/generator/gen_win.py (revision 5810)
+++ build/generator/gen_win.py (working copy)
@@ -275,6 +275,18 @@
     return self.make_windirs(fakelibdirs)
+ def _get_winlib_from_dll(self, libname):
+ "Return a lib name from a dll name
+ tname = libname
+ idx = string.rfind(tname, '-')
+ if idx != -1 :
+ tname = tname[:idx]
+ idx = string.rfind(tname, "\\")
+ if idx != -1 :
+ tname = tname[(idx + 1):]
+ return tname + ".lib"
   def get_win_libs(self, target):
     "Return the list of external libraries needed for target"
@@ -298,11 +310,14 @@
     depends = [target] + self.get_win_depends(target, 1)
     for dep in depends:
       for lib in self.graph.get_sources(gen_base.DT_LINK, dep.name):
- if not isinstance(lib, gen_base.ExternalLibrary):
- continue
+ if isinstance(lib, gen_base.TargetLib):
+ outlib = self._get_winlib_from_dll(lib.output)
+ if outlib not in nondeplibs:
+ nondeplibs.append(outlib)
+ elif isinstance(lib, gen_base.ExternalLibrary):
+ nondeplibs.append(lib.fname+'.lib')
- nondeplibs.append(lib.fname+'.lib')
     return nondeplibs
   def get_win_sources(self, target, reldir_prefix=''):

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon May 5 22:41:55 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.