[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 6975 - in trunk: . build/generator

From: <e.huelsmann_at_gmx.net>
Date: 2003-09-04 20:29:35 CEST

Rey4,

How do you do that: generating these commits so fast in a row? I suppose you
have to create the right patches beforehand? What do you diff against?

bye,

Erik.

> Author: rey4
> Date: Thu Sep 4 13:21:14 2003
> New Revision: 6975
>
> Modified:
> trunk/build.conf
> trunk/build/generator/gen_base.py
> trunk/build/generator/gen_make.py
> trunk/build/generator/gen_msvc_dsp.py
> trunk/build/generator/gen_vcnet_vcproj.py
> trunk/build/generator/gen_win.py
> Log:
> Removed "custom" attribute, which was originally used to specify
> custom build steps, but got hijacked for all sorts of other purposes.
> Instead added "compile-cmd" attribute and two new "type" values for
> apache modules and ra modules. These changes have no effect on the
> generated makefile or project files.
>
> * build/generator/gen_base.py
> (ObjectFile.__init__): added "build_cmd" member
>
> (SWIGUtilPython, SWIGUtilJava, SWIGUtilPerl, _custom_build):
> removed these ObjectFile subclasses
>
> (Target.__init__):
> removed "is_ra_module" and "is_apache_mod" members
>
> (TargetLinked.__init__):
> got rid of "custom" getter and added "compile-cmd" getter
>
> (TargetApacheMod, TargetRaModule, _build_types):
> added new target types for apache modules and ra modules.
>
> (TargetLib.__init__, TargetApacheMod.__init__):
> moved apache specific code into new apache class
>
> * build.conf
> (libsvn_ra_dav, libsvn_ra_svn, libsvn_ra_local, mod_dav_svn,
> mod_authz_svn):
> use new "type" values instead of "custom" attribute
>
> (libsvn_swig_py, libsvn_swig_java, libsvn_swig_perl):
> use new "compile-cmd" attribute instead of "custom" attribute
>
> * build/generator/gen_make.py
> (write_symbols):
> use "isinstance(target, TargetRaModule)" instead of
> "target.is_ra_module"
>
> * build/generator/gen_win.py
> (adjust_win_depends, get_win_defines, get_win_includes,
> get_win_lib_dirs, get_win_libs, get_win_sources):
> use "isinstance(target, TargetApacheMod)" instead of
> "target.is_apache_mod"
>
> * build/generator/gen_msvc_dsp.py
> * build/generator/gen_vcproj
> (Generator.write_project):
> use "isinstance(target, TargetApacheMod)" instead of
> "target.is_apache_mod"
>
>
> Modified: trunk/build.conf
>
==============================================================================
> --- trunk/build.conf (original)
> +++ trunk/build.conf Thu Sep 4 13:21:14 2003
> @@ -141,27 +141,24 @@
>
> # Accessing repositories via DAV
> [libsvn_ra_dav]
> -type = lib
> +type = ra-module
> path = subversion/libsvn_ra_dav
> install = dav-lib
> libs = libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
> $(NEON_LIBS)
> -custom = ra-module
>
> # Accessing repositories via SVN
> [libsvn_ra_svn]
> -type = lib
> +type = ra-module
> path = subversion/libsvn_ra_svn
> install = base-lib
> libs = libsvn_delta libsvn_subr $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
> -custom = ra-module
>
> # Accessing repositories via direct libsvn_fs
> [libsvn_ra_local]
> -type = lib
> +type = ra-module
> path = subversion/libsvn_ra_local
> install = fs-lib
> libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr
> $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
> -custom = ra-module
>
> # Routines built on top of libsvn_fs
> [libsvn_repos]
> @@ -187,21 +184,17 @@
> # Subversion plugin for Apache's mod_dav
> [mod_dav_svn]
> description = Subversion plug-in for the Apache DAV module
> -type = lib
> +type = apache-mod
> path = subversion/mod_dav_svn
> libs = libsvn_repos libsvn_fs libsvn_delta libsvn_subr
> -# need special build rules to include the Apache headers
> -custom = apache-mod
> install = apache-mod
>
> [mod_authz_svn]
> description = Subversion path-based authorization module for Apache
> -type = lib
> +type = apache-mod
> path = subversion/mod_authz_svn
> nonlibs = mod_dav_svn
> libs = libsvn_subr
> -# need special build rules to include the Apache headers
> -custom = apache-mod
> install = apache-mod
>
> [svnserve]
> @@ -285,7 +278,7 @@
> libs = libsvn_subr libsvn_delta $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
> install = swig-py-lib
> # need special build rule to include -DSWIGPYTHON
> -custom = swig-py
> +compile-cmd = $(COMPILE_SWIG_PY)
>
> # SWIG utility library for Java modules
> [libsvn_swig_java]
> @@ -295,7 +288,7 @@
> libs = $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
> install = swig-java-lib
> # need special build rule to include -DSWIGJAVA and
> -I$(JDK)/include/jni.h
> -custom = swig-java
> +compile-cmd = $(COMPILE_SWIG_JAVA)
>
> # SWIG utility library for Perl modules
> [libsvn_swig_perl]
> @@ -305,7 +298,7 @@
> libs = $(SVN_APRUTIL_LIBS) $(SVN_APR_LIBS)
> install = swig-pl-lib
> # need special build rule to include
> -custom = swig-pl
> +compile-cmd = $(COMPILE_SWIG_PL)
>
> #
>
----------------------------------------------------------------------------
> #
>
> Modified: trunk/build/generator/gen_base.py
>
==============================================================================
> --- trunk/build/generator/gen_base.py (original)
> +++ trunk/build/generator/gen_base.py Thu Sep 4 13:21:14 2003
> @@ -260,10 +260,10 @@
> return hash(self.fname)
>
> class ObjectFile(DependencyNode):
> - pass
> -class ApacheObject(ObjectFile):
> - ### hmm. this is Makefile-specific
> - build_cmd = '$(COMPILE_APACHE_MOD)'
> + def __init__(self, fname, build_cmd = None):
> + DependencyNode.__init__(self, fname)
> + self.build_cmd = build_cmd
> +
> class SWIGObject(ObjectFile):
> def __init__(self, fname, lang):
> ObjectFile.__init__(self, fname)
> @@ -282,24 +282,6 @@
> SourceFile.__init__(self, fname, os.path.dirname(fname))
> pass
>
> -# the SWIG utility libraries
> -class SWIGUtilPython(ObjectFile):
> - ### hmm. this is Makefile-specific
> - build_cmd = '$(COMPILE_SWIG_PY)'
> -class SWIGUtilJava(ObjectFile):
> - ### hmm. this is Makefile-specific
> - build_cmd = '$(COMPILE_SWIG_JAVA)'
> -class SWIGUtilPerl(ObjectFile):
> - ### hmm. this is Makefile-specific
> - build_cmd = '$(COMPILE_SWIG_PL)'
> -
> -_custom_build = {
> - 'apache-mod' : ApacheObject,
> - 'swig-py' : SWIGUtilPython,
> - 'swig-java' : SWIGUtilJava,
> - 'swig-pl' : SWIGUtilPerl,
> - }
> -
> class SWIGLibrary(DependencyNode):
> ### stupid Target vs DependencyNode
> add_deps = ''
> @@ -358,11 +340,6 @@
> # with SWIG bindings.
> self.shared_dir = None
>
> - ### eek. this is pretty ugly. we should have a new Target subclass.
> - # These values may be changed by TargetLinked constructor
> - self.is_ra_module = 0
> - self.is_apache_mod = 0
> -
> def add_dependencies(self, src_patterns, graph):
> # subclasses should override to provide behavior, as appropriate
> pass
> @@ -381,20 +358,11 @@
> def __init__(self, name, options, cfg, extmap):
> Target.__init__(self, name, options, cfg, extmap)
> self.install = options.get('install')
> + self.compile_cmd = options.get('compile-cmd')
>
> # default output name; subclasses can/should change this
> self.output = os.path.join(self.path, name)
>
> - custom = options.get('custom')
> -
> - ### this should be a class attr and we should use different Target
> - ### classes based on the "custom" value.
> - self.object_cls = _custom_build.get(custom, ObjectFile)
> - if custom == 'ra-module':
> - self.is_ra_module = 1
> - elif custom == 'apache-mod':
> - self.is_apache_mod = 1
> -
> ### hmm. this is Makefile-specific
> link_cmd = '$(LINK)'
>
> @@ -408,7 +376,7 @@
>
> objname = src[:-2] + self.objext
>
> - ofile = self.object_cls(objname)
> + ofile = ObjectFile(objname, self.compile_cmd)
>
> # object depends upon source
> graph.add(DT_OBJECT, ofile, SourceFile(src, reldir))
> @@ -442,19 +410,26 @@
>
> self.objext = extmap['lib', 'object']
>
> - if not self.is_apache_mod:
> - # the target file is the name, version, and appropriate extension
> - tfile = '%s-%s%s' % (name, cfg.version, extmap['lib', 'target'])
> - else:
> - tfile = name + extmap['lib', 'target']
> + # the target file is the name, version, and appropriate extension
> + tfile = '%s-%s%s' % (name, cfg.version, extmap['lib', 'target'])
> + self.output = os.path.join(self.path, tfile)
> +
> +class TargetApacheMod(TargetLib):
>
> - # we have a custom linking rule
> - ### hmm. this is Makefile-specific
> - ### kind of hacky anyways. we should use a different Target
> subclass
> - self.link_cmd = '$(LINK_APACHE_MOD)'
> + def __init__(self, name, options, cfg, extmap):
> + TargetLib.__init__(self, name, options, cfg, extmap)
>
> + tfile = name + extmap['lib', 'target']
> self.output = os.path.join(self.path, tfile)
>
> + # we have a custom linking rule
> + ### hmm. this is Makefile-specific
> + self.compile_cmd = '$(COMPILE_APACHE_MOD)'
> + self.link_cmd = '$(LINK_APACHE_MOD)'
> +
> +class TargetRaModule(TargetLib):
> + pass
> +
> class TargetDoc(Target):
> pass
>
> @@ -590,6 +565,8 @@
> 'utility' : TargetUtility,
> 'swig_runtime' : TargetSWIGRuntime,
> 'swig_utility' : TargetSWIGUtility,
> + 'ra-module': TargetRaModule,
> + 'apache-mod': TargetApacheMod,
> }
>
>
>
> Modified: trunk/build/generator/gen_make.py
>
==============================================================================
> --- trunk/build/generator/gen_make.py (original)
> +++ trunk/build/generator/gen_make.py Thu Sep 4 13:21:14 2003
> @@ -225,7 +225,7 @@
> wrappers[lang] = [ ]
>
> for target in self.graph.get_all_sources(gen_base.DT_INSTALL):
> - if getattr(target, 'is_ra_module', 0):
> + if isinstance(target, gen_base.TargetRaModule):
> # name of the RA module: strip 'libsvn_' and upper-case it
> name = string.upper(target.name[7:])
>
>
> Modified: trunk/build/generator/gen_msvc_dsp.py
>
==============================================================================
> --- trunk/build/generator/gen_msvc_dsp.py (original)
> +++ trunk/build/generator/gen_msvc_dsp.py Thu Sep 4 13:21:14 2003
> @@ -29,7 +29,7 @@
> targval = "0x0103"
> target.output_name = target.name + '.exe'
> elif isinstance(target, gen_base.TargetLib):
> - if target.is_apache_mod:
> + if isinstance(target, gen_base.TargetApacheMod):
> targtype = "Win32 (x86) Dynamic-Link Library"
> targval = "0x0102"
> target.output_name = target.name + '.so'
> @@ -47,7 +47,6 @@
> targtype = "Win32 (x86) Dynamic-Link Library"
> targval = "0x0102"
> target.output_name = os.path.basename(target.fname)
> - target.is_apache_mod = 0
> else:
> raise gen_base.GenError("Cannot create project for %s" %
> target.name)
>
> @@ -72,7 +71,7 @@
> 'is_utility' : ezt.boolean(isinstance(target,
> gen_base.TargetUtility)),
> 'is_dll' : ezt.boolean(isinstance(target, gen_base.SWIGLibrary)
> - or target.is_apache_mod),
> + or isinstance(target,
> gen_base.TargetApacheMod)),
> 'instrument_apr_pools' : self.instrument_apr_pools,
> 'instrument_purify_quantify' : self.instrument_purify_quantify,
> }
>
> Modified: trunk/build/generator/gen_vcnet_vcproj.py
>
==============================================================================
> --- trunk/build/generator/gen_vcnet_vcproj.py (original)
> +++ trunk/build/generator/gen_vcnet_vcproj.py Thu Sep 4 13:21:14 2003
> @@ -29,7 +29,7 @@
> config_type=1
> target.output_name = target.name + '.exe'
> elif isinstance(target, gen_base.TargetLib):
> - if target.is_apache_mod:
> + if isinstance(target, gen_base.TargetApacheMod):
> #DLL
> target.output_name = target.name + '.so'
> config_type=2
> @@ -43,7 +43,6 @@
> elif isinstance(target, gen_base.SWIGLibrary):
> config_type=2
> target.output_name = os.path.basename(target.fname)
> - target.is_apache_mod = 0
> else:
> raise gen_base.GenError("Cannot create project for %s" %
> target.name)
>
> @@ -67,7 +66,6 @@
> gen_base.TargetExternal)),
> 'is_utility' : ezt.boolean(isinstance(target,
> gen_base.TargetUtility)),
> - 'is_apache_mod' : ezt.boolean(target.is_apache_mod),
> 'instrument_apr_pools' : self.instrument_apr_pools,
> 'instrument_purify_quantify' : self.instrument_purify_quantify,
> }
>
> Modified: trunk/build/generator/gen_win.py
>
==============================================================================
> --- trunk/build/generator/gen_win.py (original)
> +++ trunk/build/generator/gen_win.py Thu Sep 4 13:21:14 2003
> @@ -339,7 +339,7 @@
> else:
> depends = [self.targets['__CONFIG__']]
>
> - if target.is_apache_mod:
> + if isinstance(target, gen_base.TargetApacheMod):
> if target.name == 'mod_authz_svn':
> depends.append(self.targets['mod_dav_svn'])
> pass
> @@ -427,7 +427,7 @@
> "Return the list of defines for target"
>
> fakedefines = ["WIN32","_WINDOWS","alloca=_alloca"]
> - if target.is_apache_mod:
> + if isinstance(target, gen_base.TargetApacheMod):
> if target.name == 'mod_dav_svn':
> fakedefines.extend(["AP_DECLARE_EXPORT"])
> pass
> @@ -446,7 +446,7 @@
> def get_win_includes(self, target, rootpath):
> "Return the list of include directories for target"
>
> - if target.is_apache_mod:
> + if isinstance(target, gen_base.TargetApacheMod):
> fakeincludes = self.map_rootpath(["subversion/include",
> self.dbincpath,
> ""],
> @@ -480,7 +480,7 @@
> "Release", "LibR")
>
> fakelibdirs = self.map_rootpath([self.dblibpath], rootpath)
> - if target.is_apache_mod:
> + if isinstance(target, gen_base.TargetApacheMod):
> fakelibdirs.extend([
> self.httpd_path + "/%s" % cfg,
> self.httpd_path + "/srclib/apr/%s" % cfg,
> @@ -495,7 +495,7 @@
> def get_win_libs(self, target, cfg):
> "Return the list of external libraries needed for target"
>
> - if target.is_apache_mod:
> + if isinstance(target, gen_base.TargetApacheMod):
> if target.name == 'mod_dav_svn':
> libs = [ self.dblibname+(cfg == 'Debug' and 'd.lib' or '.lib'),
> 'mod_dav.lib' ]
> @@ -545,7 +545,7 @@
>
> sources = { }
>
> - if target.is_apache_mod:
> + if isinstance(target, gen_base.TargetApacheMod):
> # get (fname, reldir) pairs for dependent libs
> for dep_tgt in self.get_win_depends(target, 1):
> if not isinstance(dep_tgt, gen_base.TargetLib):
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svn-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: svn-help@subversion.tigris.org
>

-- 
COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
--------------------------------------------------
1. GMX TopMail - Platz 1 und Testsieger!
2. GMX ProMail - Platz 2 und Preis-Qualitätssieger!
3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Sep 4 20:30:36 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.