From cb54be869c36a04a6e1cb1e964a9e22c37c276c7 Mon Sep 17 00:00:00 2001 From: Jack Jansen Date: Sun, 26 Nov 2000 23:02:38 +0000 Subject: Added support for adding libraries. Added support for project-relative and absolute path names in the search path entries. --- Mac/Lib/mkcwproject/cwxmlgen.py | 11 +++++++++++ Mac/Lib/mkcwproject/template/template-alllibraries.xml | 7 +++++++ Mac/Lib/mkcwproject/template/template-grouplistlib.xml | 6 ++++++ Mac/Lib/mkcwproject/template/template-linkorderlib.xml | 5 +++++ Mac/Lib/mkcwproject/template/template-searchdirs.xml | 2 +- Mac/Lib/mkcwproject/template/template.prj.xml | 7 +++++-- 6 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 Mac/Lib/mkcwproject/template/template-alllibraries.xml create mode 100644 Mac/Lib/mkcwproject/template/template-grouplistlib.xml create mode 100644 Mac/Lib/mkcwproject/template/template-linkorderlib.xml 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 @@ + + 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 0000000..043313c --- /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 0000000..ecd2c6b --- /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 3cb59a9..c23f8f7 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 6174a31..8e9c065 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 -- cgit v0.12