]> granicus.if.org Git - python/commitdiff
Allow the shared library initialization routine to be overridden with an initialize...
authorJack Jansen <jack.jansen@cwi.nl>
Thu, 23 May 2002 22:34:18 +0000 (22:34 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Thu, 23 May 2002 22:34:18 +0000 (22:34 +0000)
Should fix #492465.

Mac/Lib/mkcwproject/cwxmlgen.py
Mac/Lib/mkcwproject/template-carbon/template.prj.xml
Mac/Lib/mkcwproject/template-ppc/template.prj.xml
Mac/scripts/genpluginprojects.py

index e80cfa7a8b917b1cfe5fec0894ad571749ab2e21..0ffe12fb401e478aa0209c9438dd30547c6a4761 100644 (file)
@@ -53,6 +53,8 @@ class ProjectBuilder:
                        dict['stdlibraryflags'] = 'Debug'
                if not dict.has_key('libraryflags'):
                        dict['libraryflags'] = 'Debug'
+               if not dict.has_key('initialize'):
+                       dict['initialize'] = '__initialize'
                if not dict.has_key('mac_sysprefixtype'):
                        if os.path.isabs(dict['sysprefix']):
                                dict['mac_sysprefixtype'] = 'Absolute'
index d0550f59180466c85b74eed9fa1ec2377a54d939..5c426a19b34aec75221bd13f827079a451997fd3 100644 (file)
                 <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>
                 <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING>
                 <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Fast</VALUE></SETTING>
-                <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE>__initialize</VALUE></SETTING>
+                <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE>%(initialize)s</VALUE></SETTING>
                 <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING>
                 <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE>__terminate</VALUE></SETTING>
 
index 0c79f678247897f980e1b0b18bf38d617021d196..65ca175ec32215fb08518efc7bf22f96eec9fb8e 100644 (file)
                 <SETTING><NAME>MWLinker_PPC_dontdeadstripinitcode</NAME><VALUE>0</VALUE></SETTING>
                 <SETTING><NAME>MWLinker_PPC_permitmultdefs</NAME><VALUE>0</VALUE></SETTING>
                 <SETTING><NAME>MWLinker_PPC_linkmode</NAME><VALUE>Fast</VALUE></SETTING>
-                <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE>__initialize</VALUE></SETTING>
+                <SETTING><NAME>MWLinker_PPC_initname</NAME><VALUE>%(initialize)s</VALUE></SETTING>
                 <SETTING><NAME>MWLinker_PPC_mainname</NAME><VALUE></VALUE></SETTING>
                 <SETTING><NAME>MWLinker_PPC_termname</NAME><VALUE>__terminate</VALUE></SETTING>
 
index 1286993b0f91e26f59a9550eb21e0130a18804b8..3e2e443473a6e6dae9020153a7511f3485f77879 100644 (file)
@@ -36,16 +36,17 @@ def genpluginproject(architecture, module,
                sources=[], sourcedirs=[],
                libraries=[], extradirs=[],
                extraexportsymbols=[], outputdir=":::Lib:lib-dynload",
-               libraryflags=None, stdlibraryflags=None, prefixname=None):
+               libraryflags=None, stdlibraryflags=None, prefixname=None,
+               initialize=None):
        if architecture == "all":
                # For the time being we generate two project files. Not as nice as
                # a single multitarget project, but easier to implement for now.
                genpluginproject("ppc", module, project, projectdir, sources, sourcedirs,
                                libraries, extradirs, extraexportsymbols, outputdir, libraryflags,
-                               stdlibraryflags, prefixname)
+                               stdlibraryflags, prefixname, initialize)
                genpluginproject("carbon", module, project, projectdir, sources, sourcedirs,
                                libraries, extradirs, extraexportsymbols, outputdir, libraryflags,
-                               stdlibraryflags, prefixname)
+                               stdlibraryflags, prefixname, initialize)
                return
        templatename = "template-%s" % architecture
        targetname = "%s.%s" % (module, architecture)
@@ -99,6 +100,8 @@ def genpluginproject(architecture, module,
                dict['libraryflags'] = libraryflags
        if stdlibraryflags:
                dict['stdlibraryflags'] = stdlibraryflags
+       if initialize:
+               dict['initialize'] = initialize
        mkcwproject.mkproject(os.path.join(projectdir, project), module, dict, 
                        force=FORCEREBUILD, templatename=templatename)