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

Re: [PATCH] gen-make-modular.patch

From: Branko Čibej <brane_at_xbc.nu>
Date: 2002-12-15 16:21:22 CET

Brandon Ehle wrote:

> Here's the first patch for the windows project file generation.
> * autogen.sh: Pass -c in front of build.conf when running gen-make.py
> * gen-make.py, build/gen_make.py: Make gen-make.py modular so that we
> can add the windows project file generation targets.
> * build/gen_base.py: Remove obsoleted MSVC stuff


>Index: build/gen_make.py

>- def __init__(self, fname, verfname, oname):
>+ def __init__(self, fname, verfname, oname=None):
> gen_base.GeneratorBase.__init__(self, fname, verfname)
>+ if not oname:
>+ oname = os.path.splitext(os.path.basename(fname))[0] + '-outputs.mk'
> self.ofile = open(oname, 'w')
> self.ofile.write('# DO NOT EDIT -- AUTOMATICALLY GENERATED\n\n')
Why are you doing this? It's not the module's job to guess the output
file name; that should be done by the output script, the way it was done

>Index: gen-make.py
>--- gen-make.py (revision 4111)
>+++ gen-make.py (working copy)

I don't like this change at all. You're mixing apples and oranges.
gen-make.py generates makefiles, not .dsp's. The requirements are
substantially different; you're complicating the driver script
needlessly. The dsp generator should have its own driver script.

>+# This doens't truly need to be here, but its possible
>+# you don't have all the python modules that project files
>+# require, but you don't want to build them anyway.
>+def load_build_modules(list):
>+ for modname in list:
>+ try:
>+ # Attempt to import the modules list of targets from generators variable
>+ mod = __import__(modname)
>+ for gendef in mod.generators.items():
>+ # Attempt to import the modules actual target classes
>+ generator_dict[gendef[0]] = getattr(mod, gendef[1])
>+ except ImportError:
>+ traceback.print_exc()
>+ print>>sys.stderr, "warning: Failed to import module 'build/%s.py'." % modname
>+ print>>sys.stderr, " Targets from this module will not be available."
>+ print>>sys.stderr, " See the backtrace above if you wish to resolve this issue."
>+ print>>sys.stderr
See? ths is unnecessary complication.

Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Dec 15 16:22:19 2002

This is an archived mail posted to the Subversion Dev mailing list.