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

Re: [PATCH] dynamically link swig runtime on windows (Can I commit this?)

From: Russell Yanofsky <rey4_at_columbia.edu>
Date: 2003-08-01 07:19:41 CEST

cmpilato@collab.net wrote:
> "Russell Yanofsky" <rey4@columbia.edu> writes:
>
>> I was recently given commit access for the swig bindings, but I'd
>> like to check in some changes to the build generator. A patch is
>> attached. Is it ok for me to check this in?
>
> How will this change behave on Windows 9x?

I tested it, and it doesn't work at all. Even the error messages don't show
up.

> The batch file looks like
> a foreign language to me (I've only been using Windows 2000 for a
> couple of months) -- maybe use Python instead?
>
> /me stares in awe at this batch file, unaware that such syntax
> existed.

I know, right? I stumbled across a site yesterday (http://www.ss64.com/nt/)
that describes all the different ways to use the commands and I guess went a
little overboard using them in this file.

Anyway, I rewrote it to work on windows 9x. I think using python for this
would be overkill since all it does is concatenate a few source files
together. There's some funny syntax inside, but it's still simple enough to
understand and tweak. A revised patch is attached.

Log Message:

Changed Visual Studio builds of SWIG bindings to dynamically link
with the SWIG runtime instead of statically linking with it.
(Makefile builds already do this). This is needed because the
SWIG runtime functions read and write global data. When static
linking is used each module gets its own incomplete copy of the
global data, now data is shared and accessible to all modules.

Also some other minor changes:
  - solution and workspace files list projects in alphabetical
    order instead of in random order
  - solution file no longer refers to non-existant __INSTALLER__
    project

* build.conf
    new target: swig_runtime

* build/generator/msvc_dsp.ezt
* build/generator/vcnet_vcproj.ezt
    pass -c option to swig. new custom build step to generate
    swig runtime source

* build/generator/gen_vcnet_vcproj.py
    (Generator.write_project, Generator.write): changed to skip
      TargetExternal instances (like __INSTALLER__) completely.
      Before it was skipping the project files but still
      including listings for them in the solution files.

    (Generator.write): list projects in .sln file in alphabetical
      order

* build/generator/gen_msvc_dsp.py
    (Generator.write): list projects in .dsw file in alphabetical
      order

* build/generator/gen_base.py
    (SWIGLibrary.__init__): changed signature and moved some
      functionality into TargetSWIG.add_dependencies

    (SWIGRuntimeLibrary): new DependencyNode class

    (TargetSWIG.add_dependencies): changes for new SWIGLibrary
      constructor. Add swig library dependencies to tree under
      the swig library name, rather than SWIGLibrary instance
      for consistency with other libraries.

    (TargetSWIGRuntime): new Target class

* build/generator/gen_make.py
    (Generator.write): remove some special treatment of
      SWIGLibrary instances now that their dependencies are
      added to the dependency graph just like other libraries.

* build/generator/gen_win.py
    (Generator.write_project, Generator.adjust_win_depends):
      added code to handle writing project files for swig
      runtime libraries

    (Generator.get_win_libs): add perl56.lib library for perl
      modules

* build/win32/gen_swig_runtime.bat:
    new batch script which generates swig runtime code for
    various languages

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

Received on Fri Aug 1 07:20:52 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.