Mercurial > cpython-lru_cache-weakref
annotate Mac/scripts/genpluginprojects.py @ 27158:eb6b36b26e8d legacy-trunk
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
| author | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Wed, 08 Jan 2003 16:27:44 +0000 |
| parents | d160816b91e5 |
| children | 21a50c308db4 |
| rev | line source |
|---|---|
|
15470
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
1 import mkcwproject |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
2 import sys |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
3 import os |
|
15705
b408acdcaf3e
Use relative path for outputdir.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15675
diff
changeset
|
4 import string |
|
15470
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
5 |
|
19321
42246b8c58bb
If genpluginprojects is called from fullbuild we set the Python source directory to be the same as fullbuild uses (in stead of using the default sys.prefix). This fixes an issue Mark Day raised that you can't use fullbuild with one Python installation to build another one.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19024
diff
changeset
|
6 PYTHONDIR = sys.prefix |
|
42246b8c58bb
If genpluginprojects is called from fullbuild we set the Python source directory to be the same as fullbuild uses (in stead of using the default sys.prefix). This fixes an issue Mark Day raised that you can't use fullbuild with one Python installation to build another one.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19024
diff
changeset
|
7 PROJECTDIR = os.path.join(PYTHONDIR, ":Mac:Build") |
|
15470
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
8 MODULEDIRS = [ # Relative to projectdirs |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
9 "::Modules:%s", |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
10 "::Modules", |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
11 ":::Modules", |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
12 ] |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
13 |
|
16086
481c3d50a4e5
Added a force option (to force project generation, the default is now to only generate if different).
Jack Jansen <jack.jansen@cwi.nl>
parents:
15705
diff
changeset
|
14 # Global variable to control forced rebuild (otherwise the project is only rebuilt |
|
481c3d50a4e5
Added a force option (to force project generation, the default is now to only generate if different).
Jack Jansen <jack.jansen@cwi.nl>
parents:
15705
diff
changeset
|
15 # when it is changed) |
|
481c3d50a4e5
Added a force option (to force project generation, the default is now to only generate if different).
Jack Jansen <jack.jansen@cwi.nl>
parents:
15705
diff
changeset
|
16 FORCEREBUILD=0 |
|
481c3d50a4e5
Added a force option (to force project generation, the default is now to only generate if different).
Jack Jansen <jack.jansen@cwi.nl>
parents:
15705
diff
changeset
|
17 |
|
15705
b408acdcaf3e
Use relative path for outputdir.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15675
diff
changeset
|
18 def relpath(base, path): |
|
b408acdcaf3e
Use relative path for outputdir.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15675
diff
changeset
|
19 """Turn abs path into path relative to another. Only works for 2 abs paths |
|
b408acdcaf3e
Use relative path for outputdir.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15675
diff
changeset
|
20 both pointing to folders""" |
|
b408acdcaf3e
Use relative path for outputdir.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15675
diff
changeset
|
21 if not os.path.isabs(base) or not os.path.isabs(path): |
|
b408acdcaf3e
Use relative path for outputdir.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15675
diff
changeset
|
22 raise 'Absolute paths only' |
|
16086
481c3d50a4e5
Added a force option (to force project generation, the default is now to only generate if different).
Jack Jansen <jack.jansen@cwi.nl>
parents:
15705
diff
changeset
|
23 if base[-1] == ':': |
|
481c3d50a4e5
Added a force option (to force project generation, the default is now to only generate if different).
Jack Jansen <jack.jansen@cwi.nl>
parents:
15705
diff
changeset
|
24 base = base[:-1] |
|
15705
b408acdcaf3e
Use relative path for outputdir.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15675
diff
changeset
|
25 basefields = string.split(base, os.sep) |
|
b408acdcaf3e
Use relative path for outputdir.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15675
diff
changeset
|
26 pathfields = string.split(path, os.sep) |
|
b408acdcaf3e
Use relative path for outputdir.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15675
diff
changeset
|
27 commonfields = len(os.path.commonprefix((basefields, pathfields))) |
|
b408acdcaf3e
Use relative path for outputdir.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15675
diff
changeset
|
28 basefields = basefields[commonfields:] |
|
b408acdcaf3e
Use relative path for outputdir.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15675
diff
changeset
|
29 pathfields = pathfields[commonfields:] |
|
16086
481c3d50a4e5
Added a force option (to force project generation, the default is now to only generate if different).
Jack Jansen <jack.jansen@cwi.nl>
parents:
15705
diff
changeset
|
30 pathfields = ['']*(len(basefields)+1) + pathfields |
|
481c3d50a4e5
Added a force option (to force project generation, the default is now to only generate if different).
Jack Jansen <jack.jansen@cwi.nl>
parents:
15705
diff
changeset
|
31 rv = string.join(pathfields, os.sep) |
|
481c3d50a4e5
Added a force option (to force project generation, the default is now to only generate if different).
Jack Jansen <jack.jansen@cwi.nl>
parents:
15705
diff
changeset
|
32 return rv |
|
15705
b408acdcaf3e
Use relative path for outputdir.
Jack Jansen <jack.jansen@cwi.nl>
parents:
15675
diff
changeset
|
33 |
|
16181
a54c282bfb63
Generate Carbon as well as classic PPC plugin projects. This module is finally paying back the investment in it!
Jack Jansen <jack.jansen@cwi.nl>
parents:
16102
diff
changeset
|
34 def genpluginproject(architecture, module, |
|
15470
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
35 project=None, projectdir=None, |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
36 sources=[], sourcedirs=[], |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
37 libraries=[], extradirs=[], |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20899
diff
changeset
|
38 extraexportsymbols=[], outputdir=":::Lib:lib-dynload", |
|
23535
8d946c9339e8
Allow the shared library initialization routine to be overridden with an initialize=xxx argument.
Jack Jansen <jack.jansen@cwi.nl>
parents:
22503
diff
changeset
|
39 libraryflags=None, stdlibraryflags=None, prefixname=None, |
|
8d946c9339e8
Allow the shared library initialization routine to be overridden with an initialize=xxx argument.
Jack Jansen <jack.jansen@cwi.nl>
parents:
22503
diff
changeset
|
40 initialize=None): |
|
26653
a800015e7cf2
Got rid of non-carbon stuff, and added new Alias, File and Folder modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
25155
diff
changeset
|
41 if architecture != "carbon": |
|
a800015e7cf2
Got rid of non-carbon stuff, and added new Alias, File and Folder modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
25155
diff
changeset
|
42 raise 'Unsupported architecture: %s'%architecture |
|
16181
a54c282bfb63
Generate Carbon as well as classic PPC plugin projects. This module is finally paying back the investment in it!
Jack Jansen <jack.jansen@cwi.nl>
parents:
16102
diff
changeset
|
43 templatename = "template-%s" % architecture |
|
a54c282bfb63
Generate Carbon as well as classic PPC plugin projects. This module is finally paying back the investment in it!
Jack Jansen <jack.jansen@cwi.nl>
parents:
16102
diff
changeset
|
44 targetname = "%s.%s" % (module, architecture) |
|
a54c282bfb63
Generate Carbon as well as classic PPC plugin projects. This module is finally paying back the investment in it!
Jack Jansen <jack.jansen@cwi.nl>
parents:
16102
diff
changeset
|
45 dllname = "%s.%s.slb" % (module, architecture) |
|
15470
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
46 if not project: |
|
26653
a800015e7cf2
Got rid of non-carbon stuff, and added new Alias, File and Folder modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
25155
diff
changeset
|
47 project = "%s.%s.mcp"%(module, architecture) |
|
15470
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
48 if not projectdir: |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
49 projectdir = PROJECTDIR |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
50 if not sources: |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
51 sources = [module + 'module.c'] |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
52 if not sourcedirs: |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
53 for moduledir in MODULEDIRS: |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
54 if '%' in moduledir: |
|
19441
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19397
diff
changeset
|
55 # For historical reasons an initial _ in the modulename |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19397
diff
changeset
|
56 # is not reflected in the folder name |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19397
diff
changeset
|
57 if module[0] == '_': |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19397
diff
changeset
|
58 modulewithout_ = module[1:] |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19397
diff
changeset
|
59 else: |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19397
diff
changeset
|
60 modulewithout_ = module |
|
0757098350c2
The MacOS toolbox modules have acquired an _ in front of their name. Normal usage is through a wrapper module (without underscore) which lives in the Carbon package.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19397
diff
changeset
|
61 moduledir = moduledir % modulewithout_ |
|
15470
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
62 fn = os.path.join(projectdir, os.path.join(moduledir, sources[0])) |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
63 if os.path.exists(fn): |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
64 moduledir, sourcefile = os.path.split(fn) |
|
16086
481c3d50a4e5
Added a force option (to force project generation, the default is now to only generate if different).
Jack Jansen <jack.jansen@cwi.nl>
parents:
15705
diff
changeset
|
65 sourcedirs = [relpath(projectdir, moduledir)] |
|
15470
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
66 sources[0] = sourcefile |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
67 break |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
68 else: |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
69 print "Warning: %s: sourcefile not found: %s"%(module, sources[0]) |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
70 sourcedirs = [] |
|
22284
160e335fbe6f
Modifed for new included expat.
Jack Jansen <jack.jansen@cwi.nl>
parents:
21709
diff
changeset
|
71 if prefixname: |
|
160e335fbe6f
Modifed for new included expat.
Jack Jansen <jack.jansen@cwi.nl>
parents:
21709
diff
changeset
|
72 pass |
|
160e335fbe6f
Modifed for new included expat.
Jack Jansen <jack.jansen@cwi.nl>
parents:
21709
diff
changeset
|
73 elif architecture == "carbon": |
|
24022
913570ab0737
Disabled non-carbon builds (for the moment still optional) and made
Jack Jansen <jack.jansen@cwi.nl>
parents:
23535
diff
changeset
|
74 prefixname = "mwerks_shcarbon_pch" |
|
16181
a54c282bfb63
Generate Carbon as well as classic PPC plugin projects. This module is finally paying back the investment in it!
Jack Jansen <jack.jansen@cwi.nl>
parents:
16102
diff
changeset
|
75 else: |
|
a54c282bfb63
Generate Carbon as well as classic PPC plugin projects. This module is finally paying back the investment in it!
Jack Jansen <jack.jansen@cwi.nl>
parents:
16102
diff
changeset
|
76 prefixname = "mwerks_plugin_config.h" |
|
15470
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
77 dict = { |
|
16086
481c3d50a4e5
Added a force option (to force project generation, the default is now to only generate if different).
Jack Jansen <jack.jansen@cwi.nl>
parents:
15705
diff
changeset
|
78 "sysprefix" : relpath(projectdir, sys.prefix), |
|
15470
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
79 "sources" : sources, |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
80 "extrasearchdirs" : sourcedirs + extradirs, |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
81 "libraries": libraries, |
|
19391
b22658a468cf
Dynamic modules are now put in :Lib:lib-dynload by default. For the toolbox modules this is overridden to put them in :Mac:Lib:Carbon.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19321
diff
changeset
|
82 "mac_outputdir" : outputdir, |
|
15470
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
83 "extraexportsymbols" : extraexportsymbols, |
|
16181
a54c282bfb63
Generate Carbon as well as classic PPC plugin projects. This module is finally paying back the investment in it!
Jack Jansen <jack.jansen@cwi.nl>
parents:
16102
diff
changeset
|
84 "mac_targetname" : targetname, |
|
a54c282bfb63
Generate Carbon as well as classic PPC plugin projects. This module is finally paying back the investment in it!
Jack Jansen <jack.jansen@cwi.nl>
parents:
16102
diff
changeset
|
85 "mac_dllname" : dllname, |
|
a54c282bfb63
Generate Carbon as well as classic PPC plugin projects. This module is finally paying back the investment in it!
Jack Jansen <jack.jansen@cwi.nl>
parents:
16102
diff
changeset
|
86 "prefixname" : prefixname, |
|
15470
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
87 } |
|
21113
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20899
diff
changeset
|
88 if libraryflags: |
|
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20899
diff
changeset
|
89 dict['libraryflags'] = libraryflags |
|
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20899
diff
changeset
|
90 if stdlibraryflags: |
|
ed3dce17fc79
Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
Jack Jansen <jack.jansen@cwi.nl>
parents:
20899
diff
changeset
|
91 dict['stdlibraryflags'] = stdlibraryflags |
|
23535
8d946c9339e8
Allow the shared library initialization routine to be overridden with an initialize=xxx argument.
Jack Jansen <jack.jansen@cwi.nl>
parents:
22503
diff
changeset
|
92 if initialize: |
|
8d946c9339e8
Allow the shared library initialization routine to be overridden with an initialize=xxx argument.
Jack Jansen <jack.jansen@cwi.nl>
parents:
22503
diff
changeset
|
93 dict['initialize'] = initialize |
|
16181
a54c282bfb63
Generate Carbon as well as classic PPC plugin projects. This module is finally paying back the investment in it!
Jack Jansen <jack.jansen@cwi.nl>
parents:
16102
diff
changeset
|
94 mkcwproject.mkproject(os.path.join(projectdir, project), module, dict, |
|
a54c282bfb63
Generate Carbon as well as classic PPC plugin projects. This module is finally paying back the investment in it!
Jack Jansen <jack.jansen@cwi.nl>
parents:
16102
diff
changeset
|
95 force=FORCEREBUILD, templatename=templatename) |
|
15470
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
96 |
|
16086
481c3d50a4e5
Added a force option (to force project generation, the default is now to only generate if different).
Jack Jansen <jack.jansen@cwi.nl>
parents:
15705
diff
changeset
|
97 def genallprojects(force=0): |
|
481c3d50a4e5
Added a force option (to force project generation, the default is now to only generate if different).
Jack Jansen <jack.jansen@cwi.nl>
parents:
15705
diff
changeset
|
98 global FORCEREBUILD |
|
481c3d50a4e5
Added a force option (to force project generation, the default is now to only generate if different).
Jack Jansen <jack.jansen@cwi.nl>
parents:
15705
diff
changeset
|
99 FORCEREBUILD = force |
|
15470
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
100 # Standard Python modules |
|
22284
160e335fbe6f
Modifed for new included expat.
Jack Jansen <jack.jansen@cwi.nl>
parents:
21709
diff
changeset
|
101 genpluginproject("carbon", "pyexpat", |
|
160e335fbe6f
Modifed for new included expat.
Jack Jansen <jack.jansen@cwi.nl>
parents:
21709
diff
changeset
|
102 sources=["pyexpat.c", "xmlparse.c", "xmlrole.c", "xmltok.c"], |
|
160e335fbe6f
Modifed for new included expat.
Jack Jansen <jack.jansen@cwi.nl>
parents:
21709
diff
changeset
|
103 extradirs=[":::Modules:expat"], |
|
24022
913570ab0737
Disabled non-carbon builds (for the moment still optional) and made
Jack Jansen <jack.jansen@cwi.nl>
parents:
23535
diff
changeset
|
104 prefixname="mwerks_shcarbon_config.h" |
|
22284
160e335fbe6f
Modifed for new included expat.
Jack Jansen <jack.jansen@cwi.nl>
parents:
21709
diff
changeset
|
105 ) |
|
26653
a800015e7cf2
Got rid of non-carbon stuff, and added new Alias, File and Folder modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
25155
diff
changeset
|
106 genpluginproject("carbon", "zlib", |
|
15470
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
107 libraries=["zlib.ppc.Lib"], |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
108 extradirs=["::::imglibs:zlib:mac", "::::imglibs:zlib"]) |
|
26653
a800015e7cf2
Got rid of non-carbon stuff, and added new Alias, File and Folder modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
25155
diff
changeset
|
109 genpluginproject("carbon", "gdbm", |
|
15470
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
110 libraries=["gdbm.ppc.gusi.lib"], |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
111 extradirs=["::::gdbm:mac", "::::gdbm"]) |
|
26653
a800015e7cf2
Got rid of non-carbon stuff, and added new Alias, File and Folder modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
25155
diff
changeset
|
112 genpluginproject("carbon", "_weakref", sources=["_weakref.c"]) |
|
a800015e7cf2
Got rid of non-carbon stuff, and added new Alias, File and Folder modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
25155
diff
changeset
|
113 genpluginproject("carbon", "_symtable", sources=["symtablemodule.c"]) |
|
19570
9da68c0379ab
Added xx and xxsubtype modules, for completeness and because xxsubtype is used by the test suite.
Jack Jansen <jack.jansen@cwi.nl>
parents:
19441
diff
changeset
|
114 # Example/test modules |
|
26653
a800015e7cf2
Got rid of non-carbon stuff, and added new Alias, File and Folder modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
25155
diff
changeset
|
115 genpluginproject("carbon", "_testcapi") |
|
a800015e7cf2
Got rid of non-carbon stuff, and added new Alias, File and Folder modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
25155
diff
changeset
|
116 genpluginproject("carbon", "xx") |
|
27158
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
117 genpluginproject("carbon", "datetime") |
|
26653
a800015e7cf2
Got rid of non-carbon stuff, and added new Alias, File and Folder modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
25155
diff
changeset
|
118 genpluginproject("carbon", "xxsubtype", sources=["xxsubtype.c"]) |
|
a800015e7cf2
Got rid of non-carbon stuff, and added new Alias, File and Folder modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
25155
diff
changeset
|
119 genpluginproject("carbon", "_hotshot", sources=["_hotshot.c"]) |
|
15470
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
120 |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
121 # bgen-generated Toolbox modules |
|
27158
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
122 genpluginproject("carbon", "_AE") |
|
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
123 genpluginproject("carbon", "_AH") |
|
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
124 genpluginproject("carbon", "_App") |
|
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
125 genpluginproject("carbon", "_Cm") |
|
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
126 genpluginproject("carbon", "_Ctl") |
|
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
127 genpluginproject("carbon", "_Dlg") |
|
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
128 genpluginproject("carbon", "_Drag") |
|
26653
a800015e7cf2
Got rid of non-carbon stuff, and added new Alias, File and Folder modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
25155
diff
changeset
|
129 genpluginproject("carbon", "_Evt", |
|
27158
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
130 stdlibraryflags="Debug, WeakImport") |
|
26653
a800015e7cf2
Got rid of non-carbon stuff, and added new Alias, File and Folder modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
25155
diff
changeset
|
131 genpluginproject("carbon", "_File", |
|
27158
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
132 stdlibraryflags="Debug, WeakImport") |
|
26653
a800015e7cf2
Got rid of non-carbon stuff, and added new Alias, File and Folder modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
25155
diff
changeset
|
133 genpluginproject("carbon", "_Fm", |
|
27158
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
134 stdlibraryflags="Debug, WeakImport") |
|
26653
a800015e7cf2
Got rid of non-carbon stuff, and added new Alias, File and Folder modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
25155
diff
changeset
|
135 genpluginproject("carbon", "_Folder", |
|
27158
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
136 stdlibraryflags="Debug, WeakImport") |
|
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
137 genpluginproject("carbon", "_Help") |
|
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
138 genpluginproject("carbon", "_IBCarbon", sources=[":ibcarbon:_IBCarbon.c"]) |
|
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
139 genpluginproject("carbon", "_Icn") |
|
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
140 genpluginproject("carbon", "_List") |
|
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
141 genpluginproject("carbon", "_Menu") |
|
26653
a800015e7cf2
Got rid of non-carbon stuff, and added new Alias, File and Folder modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
25155
diff
changeset
|
142 genpluginproject("carbon", "_Qd", |
|
27158
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
143 stdlibraryflags="Debug, WeakImport") |
|
22503
c8165758a6de
Weaklink most toolbox modules, improving backward compatibility. Modules will no longer fail to load if a single routine is missing on the curent OS version, in stead calling the missing routine will raise an exception.
Jack Jansen <jack.jansen@cwi.nl>
parents:
22442
diff
changeset
|
144 genpluginproject("carbon", "_Qt", |
|
27158
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
145 libraryflags="Debug, WeakImport") |
|
26653
a800015e7cf2
Got rid of non-carbon stuff, and added new Alias, File and Folder modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
25155
diff
changeset
|
146 genpluginproject("carbon", "_Qdoffs", |
|
27158
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
147 stdlibraryflags="Debug, WeakImport") |
|
26653
a800015e7cf2
Got rid of non-carbon stuff, and added new Alias, File and Folder modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
25155
diff
changeset
|
148 genpluginproject("carbon", "_Res", |
|
27158
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
149 stdlibraryflags="Debug, WeakImport") |
|
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
150 genpluginproject("carbon", "_Scrap") |
|
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
151 genpluginproject("carbon", "_Snd") |
|
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
152 genpluginproject("carbon", "_Sndihooks", sources=[":snd:_Sndihooks.c"]) |
|
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
153 genpluginproject("carbon", "_TE") |
|
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
154 genpluginproject("carbon", "_Mlte") |
|
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
155 genpluginproject("carbon", "_Win") |
|
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
156 genpluginproject("carbon", "_CF", sources=["_CFmodule.c", "pycfbridge.c"]) |
|
eb6b36b26e8d
Merging the various tweaks for MacPython-OS9 2.3a1 back into the trunk.
Jack Jansen <jack.jansen@cwi.nl>
parents:
26775
diff
changeset
|
157 genpluginproject("carbon", "_CarbonEvt") |
|
20899
8722b0abeac6
Added hfsplusapi module.
Jack Jansen <jack.jansen@cwi.nl>
parents:
20640
diff
changeset
|
158 genpluginproject("carbon", "hfsplus") |
|
18290
295acc0755f0
Added CF module build and project generation (carbon only).
Jack Jansen <jack.jansen@cwi.nl>
parents:
17850
diff
changeset
|
159 |
|
15470
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
160 # Other Mac modules |
|
26653
a800015e7cf2
Got rid of non-carbon stuff, and added new Alias, File and Folder modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
25155
diff
changeset
|
161 genpluginproject("carbon", "calldll", sources=["calldll.c"]) |
|
a800015e7cf2
Got rid of non-carbon stuff, and added new Alias, File and Folder modules.
Jack Jansen <jack.jansen@cwi.nl>
parents:
25155
diff
changeset
|
162 genpluginproject("carbon", "ColorPicker") |
|
16213
c0f61d4f5a04
Waste and scrap now sort-of work for Carbon. Scrap is mostly empty, and waste uses a mixture between Waste 2.0 and Waste 1.3.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16181
diff
changeset
|
163 genpluginproject("carbon", "waste", |
|
c0f61d4f5a04
Waste and scrap now sort-of work for Carbon. Scrap is mostly empty, and waste uses a mixture between Waste 2.0 and Waste 1.3.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16181
diff
changeset
|
164 sources=[ |
|
c0f61d4f5a04
Waste and scrap now sort-of work for Carbon. Scrap is mostly empty, and waste uses a mixture between Waste 2.0 and Waste 1.3.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16181
diff
changeset
|
165 "wastemodule.c", |
|
c0f61d4f5a04
Waste and scrap now sort-of work for Carbon. Scrap is mostly empty, and waste uses a mixture between Waste 2.0 and Waste 1.3.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16181
diff
changeset
|
166 "WEObjectHandlers.c", |
|
c0f61d4f5a04
Waste and scrap now sort-of work for Carbon. Scrap is mostly empty, and waste uses a mixture between Waste 2.0 and Waste 1.3.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16181
diff
changeset
|
167 "WETabs.c", "WETabHooks.c"], |
|
c0f61d4f5a04
Waste and scrap now sort-of work for Carbon. Scrap is mostly empty, and waste uses a mixture between Waste 2.0 and Waste 1.3.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16181
diff
changeset
|
168 libraries=["WASTE.Carbon.lib"], |
|
c0f61d4f5a04
Waste and scrap now sort-of work for Carbon. Scrap is mostly empty, and waste uses a mixture between Waste 2.0 and Waste 1.3.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16181
diff
changeset
|
169 extradirs=[ |
|
c0f61d4f5a04
Waste and scrap now sort-of work for Carbon. Scrap is mostly empty, and waste uses a mixture between Waste 2.0 and Waste 1.3.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16181
diff
changeset
|
170 '{Compiler}:MacOS Support:(Third Party Support):Waste 2.0 Distribution:C_C++ Headers', |
|
c0f61d4f5a04
Waste and scrap now sort-of work for Carbon. Scrap is mostly empty, and waste uses a mixture between Waste 2.0 and Waste 1.3.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16181
diff
changeset
|
171 '{Compiler}:MacOS Support:(Third Party Support):Waste 2.0 Distribution:Static Libraries', |
|
21709
866615f0ae2a
CodeWarrior includes Waste and Internet Config nowadays, obviating the need for separate downloads.
Jack Jansen <jack.jansen@cwi.nl>
parents:
21388
diff
changeset
|
172 '::wastemods', |
|
866615f0ae2a
CodeWarrior includes Waste and Internet Config nowadays, obviating the need for separate downloads.
Jack Jansen <jack.jansen@cwi.nl>
parents:
21388
diff
changeset
|
173 ] |
|
16213
c0f61d4f5a04
Waste and scrap now sort-of work for Carbon. Scrap is mostly empty, and waste uses a mixture between Waste 2.0 and Waste 1.3.
Jack Jansen <jack.jansen@cwi.nl>
parents:
16181
diff
changeset
|
174 ) |
|
21709
866615f0ae2a
CodeWarrior includes Waste and Internet Config nowadays, obviating the need for separate downloads.
Jack Jansen <jack.jansen@cwi.nl>
parents:
21388
diff
changeset
|
175 genpluginproject("carbon", "icglue", sources=["icgluemodule.c"]) |
|
15470
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
176 |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
177 if __name__ == '__main__': |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
178 genallprojects() |
|
e0d8a6f2d091
Got it working for all important plugins, and moved it from Build to scripts.
Jack Jansen <jack.jansen@cwi.nl>
parents:
diff
changeset
|
179 |
|
16086
481c3d50a4e5
Added a force option (to force project generation, the default is now to only generate if different).
Jack Jansen <jack.jansen@cwi.nl>
parents:
15705
diff
changeset
|
180 |
