summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2000-11-26 23:02:38 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2000-11-26 23:02:38 (GMT)
commitcb54be869c36a04a6e1cb1e964a9e22c37c276c7 (patch)
treef8fb2353d12b9df99564e99f96628d4627c2e533 /Mac
parentc10a11b7c746587768ab716cc775c1a30c95c857 (diff)
downloadcpython-cb54be869c36a04a6e1cb1e964a9e22c37c276c7.zip
cpython-cb54be869c36a04a6e1cb1e964a9e22c37c276c7.tar.gz
cpython-cb54be869c36a04a6e1cb1e964a9e22c37c276c7.tar.bz2
Added support for adding libraries.
Added support for project-relative and absolute path names in the search path entries.
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Lib/mkcwproject/cwxmlgen.py11
-rw-r--r--Mac/Lib/mkcwproject/template/template-alllibraries.xml7
-rw-r--r--Mac/Lib/mkcwproject/template/template-grouplistlib.xml6
-rw-r--r--Mac/Lib/mkcwproject/template/template-linkorderlib.xml5
-rw-r--r--Mac/Lib/mkcwproject/template/template-searchdirs.xml2
-rw-r--r--Mac/Lib/mkcwproject/template/template.prj.xml7
6 files changed, 35 insertions, 3 deletions
diff --git a/Mac/Lib/mkcwproject/cwxmlgen.py b/Mac/Lib/mkcwproject/cwxmlgen.py
index b29786f..ff5d0cb 100644
--- a/Mac/Lib/mkcwproject/cwxmlgen.py
+++ b/Mac/Lib/mkcwproject/cwxmlgen.py
@@ -9,6 +9,9 @@ TEMPLATELIST= [
("tmp_allsources", "file", "template-allsources.xml", "sources"),
("tmp_linkorder", "file", "template-linkorder.xml", "sources"),
("tmp_grouplist", "file", "template-grouplist.xml", "sources"),
+ ("tmp_alllibraries", "file", "template-alllibraries.xml", "libraries"),
+ ("tmp_linkorderlib", "file", "template-linkorderlib.xml", "libraries"),
+ ("tmp_grouplistlib", "file", "template-grouplistlib.xml", "libraries"),
("tmp_extrasearchdirs", "file", "template-searchdirs.xml", "extrasearchdirs"),
("tmp_projectxmldata", "file", "template.prj.xml", None)
]
@@ -24,6 +27,8 @@ class ProjectBuilder:
if not os.path.exists(templatedir):
raise Error, "Cannot file templatedir"
self.dict = dict
+ if not dict.has_key('prefixname'):
+ dict['prefixname'] = 'mwerks_plugin_config.h'
self.templatelist = templatelist
self.templatedir = templatedir
@@ -43,11 +48,17 @@ class ProjectBuilder:
raise Error, "List or tuple expected for %s"%key
for curkeyvalue in keyvalues:
self.dict[key] = curkeyvalue
+ if os.path.isabs(curkeyvalue):
+ self.dict['pathtype'] = 'Absolute'
+ else:
+ self.dict['pathtype'] = 'Project'
curkeyvalueresult = self._generate_one_value(datasource, dataname)
result = result + curkeyvalueresult
finally:
# Restore the list
self.dict[key] = keyvalues
+ self.dict['pathtype'] = None
+ del self.dict['pathtype']
else:
# Not a multi-element rule. Simply generate
result = self._generate_one_value(datasource, dataname)
diff --git a/Mac/Lib/mkcwproject/template/template-alllibraries.xml b/Mac/Lib/mkcwproject/template/template-alllibraries.xml
new file mode 100644
index 0000000..27f3cb1
--- /dev/null
+++ b/Mac/Lib/mkcwproject/template/template-alllibraries.xml
@@ -0,0 +1,7 @@
+ <FILE>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>%(libraries)s</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ <FILEKIND>Library</FILEKIND>
+ <FILEFLAGS>Debug</FILEFLAGS>
+ </FILE>
diff --git a/Mac/Lib/mkcwproject/template/template-grouplistlib.xml b/Mac/Lib/mkcwproject/template/template-grouplistlib.xml
new file mode 100644
index 0000000..043313c
--- /dev/null
+++ b/Mac/Lib/mkcwproject/template/template-grouplistlib.xml
@@ -0,0 +1,6 @@
+ <FILEREF>
+ <TARGETNAME>%(mac_targetname)s</TARGETNAME>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>%(libraries)s</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
diff --git a/Mac/Lib/mkcwproject/template/template-linkorderlib.xml b/Mac/Lib/mkcwproject/template/template-linkorderlib.xml
new file mode 100644
index 0000000..ecd2c6b
--- /dev/null
+++ b/Mac/Lib/mkcwproject/template/template-linkorderlib.xml
@@ -0,0 +1,5 @@
+ <FILEREF>
+ <PATHTYPE>Name</PATHTYPE>
+ <PATH>%(libraries)s</PATH>
+ <PATHFORMAT>MacOS</PATHFORMAT>
+ </FILEREF>
diff --git a/Mac/Lib/mkcwproject/template/template-searchdirs.xml b/Mac/Lib/mkcwproject/template/template-searchdirs.xml
index 3cb59a9..c23f8f7 100644
--- a/Mac/Lib/mkcwproject/template/template-searchdirs.xml
+++ b/Mac/Lib/mkcwproject/template/template-searchdirs.xml
@@ -2,7 +2,7 @@
<SETTING><NAME>SearchPath</NAME>
<SETTING><NAME>Path</NAME><VALUE>%(extrasearchdirs)s</VALUE></SETTING>
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
- <SETTING><NAME>PathRoot</NAME><VALUE>Absolute</VALUE></SETTING>
+ <SETTING><NAME>PathRoot</NAME><VALUE>%(pathtype)s</VALUE></SETTING>
</SETTING>
<SETTING><NAME>Recursive</NAME><VALUE>false</VALUE></SETTING>
<SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
diff --git a/Mac/Lib/mkcwproject/template/template.prj.xml b/Mac/Lib/mkcwproject/template/template.prj.xml
index 6174a31..8e9c065 100644
--- a/Mac/Lib/mkcwproject/template/template.prj.xml
+++ b/Mac/Lib/mkcwproject/template/template.prj.xml
@@ -78,7 +78,7 @@
</SETTING>
<!-- Settings for "Access Paths" panel -->
- <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>false</VALUE></SETTING>
+ <SETTING><NAME>AlwaysSearchUserPaths</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>InterpretDOSAndUnixPaths</NAME><VALUE>true</VALUE></SETTING>
<SETTING><NAME>UserSearchPaths</NAME>
<SETTING>
@@ -532,7 +532,7 @@
<SETTING><NAME>MWFrontEnd_C_onlystdkeywords</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_enumsalwaysint</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_mpwpointerstyle</NAME><VALUE>0</VALUE></SETTING>
- <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>mwerks_plugin_config.h</VALUE></SETTING>
+ <SETTING><NAME>MWFrontEnd_C_prefixname</NAME><VALUE>%(prefixname)s</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_ansistrict</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_mpwcnewline</NAME><VALUE>0</VALUE></SETTING>
<SETTING><NAME>MWFrontEnd_C_wchar_type</NAME><VALUE>1</VALUE></SETTING>
@@ -702,6 +702,7 @@
<FILEKIND>Text</FILEKIND>
<FILEFLAGS>Debug</FILEFLAGS>
</FILE>
+%(tmp_alllibraries)s
<FILE>
<PATHTYPE>Name</PATHTYPE>
<PATH>PythonCore</PATH>
@@ -736,6 +737,7 @@
<PATH>%(mac_exportname)s</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
</FILEREF>
+%(tmp_linkorderlib)s
<FILEREF>
<PATHTYPE>Name</PATHTYPE>
<PATH>PythonCore</PATH>
@@ -776,6 +778,7 @@
<PATH>MSL ShLibRuntime.Lib</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
</FILEREF>
+%(tmp_grouplistlib)s
<FILEREF>
<TARGETNAME>%(mac_targetname)s</TARGETNAME>
<PATHTYPE>Name</PATHTYPE>