summaryrefslogtreecommitdiffstats
path: root/Mac/Lib
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2001-01-24 16:04:50 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2001-01-24 16:04:50 (GMT)
commit4a4adf4293f298b5fe47d33d174085070a5a8b2f (patch)
treea01b616d86a5ef2898e0e1c4e30350e781576ad2 /Mac/Lib
parent7b3cc1f9c3313aee0865909c256670df1a32439e (diff)
downloadcpython-4a4adf4293f298b5fe47d33d174085070a5a8b2f.zip
cpython-4a4adf4293f298b5fe47d33d174085070a5a8b2f.tar.gz
cpython-4a4adf4293f298b5fe47d33d174085070a5a8b2f.tar.bz2
Recognize {compiler} and {project} prefixes to pathnames and output the correct XML.
Diffstat (limited to 'Mac/Lib')
-rw-r--r--Mac/Lib/mkcwproject/cwxmlgen.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/Mac/Lib/mkcwproject/cwxmlgen.py b/Mac/Lib/mkcwproject/cwxmlgen.py
index c3218a3..ef6f93a 100644
--- a/Mac/Lib/mkcwproject/cwxmlgen.py
+++ b/Mac/Lib/mkcwproject/cwxmlgen.py
@@ -1,6 +1,7 @@
# First attempt at automatically generating CodeWarior projects
import os
import MacOS
+import string
Error="gencwproject.Error"
#
@@ -55,7 +56,15 @@ class ProjectBuilder:
if not type(keyvalues) in (type(()), type([])):
raise Error, "List or tuple expected for %s"%key
for curkeyvalue in keyvalues:
- if os.path.isabs(curkeyvalue):
+ if string.lower(curkeyvalue[:10]) == '{compiler}':
+ curkeyvalue = curkeyvalue[10:]
+ self.dict['pathtype'] = 'CodeWarrior'
+ elif string.lower(curkeyvalue[:9]) == '{project}':
+ curkeyvalue = curkeyvalue[9:]
+ self.dict['pathtype'] = 'Project'
+ elif curkeyvalue[0] == '{':
+ raise Error, "Unknown {} escape in %s"%curkeyvalue
+ elif os.path.isabs(curkeyvalue):
self.dict['pathtype'] = 'Absolute'
else:
self.dict['pathtype'] = 'Project'