]> granicus.if.org Git - python/commitdiff
Allow recursive searh entries by ending the pathname in ":*".
authorJack Jansen <jack.jansen@cwi.nl>
Sun, 3 Dec 2000 22:38:34 +0000 (22:38 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Sun, 3 Dec 2000 22:38:34 +0000 (22:38 +0000)
Mac/Lib/mkcwproject/cwxmlgen.py
Mac/Lib/mkcwproject/template/template-searchdirs.xml

index ff5d0cbaf9066ab175aa16e39362edc6d8e1c4d6..959516f00923dde3548256e7f4a308b134b22639 100644 (file)
@@ -47,11 +47,16 @@ class ProjectBuilder:
                                        if not type(keyvalues) in (type(()), type([])):
                                                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'
+                                               if curkeyvalue[-2:] == ':*':
+                                                       curkeyvalue = curkeyvalue[:-2]
+                                                       self.dict['recursive'] = 'true'
+                                               else:
+                                                       self.dict['recursive'] = 'false'
+                                               self.dict[key] = curkeyvalue
                                                curkeyvalueresult = self._generate_one_value(datasource, dataname)
                                                result = result + curkeyvalueresult
                                finally:
@@ -59,6 +64,8 @@ class ProjectBuilder:
                                        self.dict[key] = keyvalues
                                        self.dict['pathtype'] = None
                                        del self.dict['pathtype']
+                                       self.dict['recursive'] = None
+                                       del self.dict['recursive']
                else:
                        # Not a multi-element rule. Simply generate
                        result = self._generate_one_value(datasource, dataname)
index c23f8f7b5b03578f0d857d9f73baaca13744c9e9..ae1b353fc40ab94a7e94c871d98d03a78b97215b 100644 (file)
@@ -4,6 +4,6 @@
                             <SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
                             <SETTING><NAME>PathRoot</NAME><VALUE>%(pathtype)s</VALUE></SETTING>
                         </SETTING>
-                        <SETTING><NAME>Recursive</NAME><VALUE>false</VALUE></SETTING>
+                        <SETTING><NAME>Recursive</NAME><VALUE>%(recursive)s</VALUE></SETTING>
                         <SETTING><NAME>HostFlags</NAME><VALUE>All</VALUE></SETTING>
                     </SETTING>