diff --git a/Mac/Lib/mkcwproject/cwxmlgen.py b/Mac/Lib/mkcwproject/cwxmlgen.py
index b29786f68a0..ff5d0cbaf90 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 00000000000..27f3cb1f546
--- /dev/null
+++ b/Mac/Lib/mkcwproject/template/template-alllibraries.xml
@@ -0,0 +1,7 @@
+
+ Name
+ %(libraries)s
+ MacOS
+ Library
+ Debug
+
diff --git a/Mac/Lib/mkcwproject/template/template-grouplistlib.xml b/Mac/Lib/mkcwproject/template/template-grouplistlib.xml
new file mode 100644
index 00000000000..043313ccdfe
--- /dev/null
+++ b/Mac/Lib/mkcwproject/template/template-grouplistlib.xml
@@ -0,0 +1,6 @@
+
+ %(mac_targetname)s
+ Name
+ %(libraries)s
+ MacOS
+
diff --git a/Mac/Lib/mkcwproject/template/template-linkorderlib.xml b/Mac/Lib/mkcwproject/template/template-linkorderlib.xml
new file mode 100644
index 00000000000..ecd2c6bb05c
--- /dev/null
+++ b/Mac/Lib/mkcwproject/template/template-linkorderlib.xml
@@ -0,0 +1,5 @@
+
+ Name
+ %(libraries)s
+ MacOS
+
diff --git a/Mac/Lib/mkcwproject/template/template-searchdirs.xml b/Mac/Lib/mkcwproject/template/template-searchdirs.xml
index 3cb59a9bfad..c23f8f7b5b0 100644
--- a/Mac/Lib/mkcwproject/template/template-searchdirs.xml
+++ b/Mac/Lib/mkcwproject/template/template-searchdirs.xml
@@ -2,7 +2,7 @@
SearchPath
Path%(extrasearchdirs)s
PathFormatMacOS
- PathRootAbsolute
+ PathRoot%(pathtype)s
Recursivefalse
HostFlagsAll
diff --git a/Mac/Lib/mkcwproject/template/template.prj.xml b/Mac/Lib/mkcwproject/template/template.prj.xml
index 6174a311ae6..8e9c0653785 100644
--- a/Mac/Lib/mkcwproject/template/template.prj.xml
+++ b/Mac/Lib/mkcwproject/template/template.prj.xml
@@ -78,7 +78,7 @@
- AlwaysSearchUserPathsfalse
+ AlwaysSearchUserPathstrue
InterpretDOSAndUnixPathstrue
UserSearchPaths
@@ -532,7 +532,7 @@
MWFrontEnd_C_onlystdkeywords0
MWFrontEnd_C_enumsalwaysint0
MWFrontEnd_C_mpwpointerstyle0
- MWFrontEnd_C_prefixnamemwerks_plugin_config.h
+ MWFrontEnd_C_prefixname%(prefixname)s
MWFrontEnd_C_ansistrict0
MWFrontEnd_C_mpwcnewline0
MWFrontEnd_C_wchar_type1
@@ -702,6 +702,7 @@
Text
Debug
+%(tmp_alllibraries)s
Name
PythonCore
@@ -736,6 +737,7 @@
%(mac_exportname)s
MacOS
+%(tmp_linkorderlib)s
Name
PythonCore
@@ -776,6 +778,7 @@
MSL ShLibRuntime.Lib
MacOS
+%(tmp_grouplistlib)s
%(mac_targetname)s
Name