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
>- 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)) + '-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
>--- 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.
>+ for modname in list:
>+ # 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] = getattr(mod, gendef)
>+ except ImportError:
>+ 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."
See? ths is unnecessary complication.
Brane Čibej <brane_at_xbc.nu> http://www.xbc.nu/brane/
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Sun Dec 15 16:22:19 2002