@@ -90,35 +90,6 @@ def add_source_files_orig(self, sources, files, allow_gen=False):
9090 sources .append (obj )
9191
9292
93- # The section name is used for checking
94- # the hash table to see whether the folder
95- # is included in the SCU build.
96- # It will be something like "core/math".
97- def _find_scu_section_name (subdir ):
98- section_path = os .path .abspath (subdir ) + "/"
99-
100- folders = []
101- folder = ""
102-
103- for i in range (8 ):
104- folder = os .path .dirname (section_path )
105- folder = os .path .basename (folder )
106- if folder == base_folder_only :
107- break
108- folders += [folder ]
109- section_path += "../"
110- section_path = os .path .abspath (section_path ) + "/"
111-
112- section_name = ""
113- for n in range (len (folders )):
114- # section_name += folders[len(folders) - n - 1] + " "
115- section_name += folders [len (folders ) - n - 1 ]
116- if n != (len (folders ) - 1 ):
117- section_name += "/"
118-
119- return section_name
120-
121-
12293def add_source_files_scu (self , sources , files , allow_gen = False ):
12394 if self ["scu_build" ] and isinstance (files , str ):
12495 if "*." not in files :
@@ -127,10 +98,8 @@ def add_source_files_scu(self, sources, files, allow_gen=False):
12798 # If the files are in a subdirectory, we want to create the scu gen
12899 # files inside this subdirectory.
129100 subdir = os .path .dirname (files )
130- if subdir != "" :
131- subdir += "/"
132-
133- section_name = _find_scu_section_name (subdir )
101+ subdir = subdir if subdir == "" else subdir + "/"
102+ section_name = self .Dir (subdir ).tpath
134103 # if the section name is in the hash table?
135104 # i.e. is it part of the SCU build?
136105 global _scu_folders
0 commit comments