diff --git a/builder.py b/builder.py index 78f592c7..7f4e7170 100755 --- a/builder.py +++ b/builder.py @@ -210,10 +210,16 @@ def assertHeaderFile(path): def assertSourceFile(path): if path[-2] != '.' or (path[-1] != 'c' and path[-1] != 'S'): - print("*** " + path + " does not end in .c") + print("*** " + path + " does not end in .c or .S") print("*** Move it to a header file list") sys.exit(2) +def assertHeaderOrSourceFile(path): + if path[-2] != '.' or (path[-1] != 'h' and path[-1] != 'c'): + print("*** " + path + " does not end in .h or .c") + print("*** Move it to another list") + sys.exit(2) + def diffSource(dstLines, srcLines, src, dst): global filesTotal, filesTotalLines, filesTotalInserts, filesTotalDeletes # @@ -664,7 +670,7 @@ class Module(object): def addKernelSpaceHeaderFiles(self, files): self.files += self.addFiles(files, FreeBSDPathComposer(), FromFreeBSDToRTEMSHeaderConverter(), - FromRTEMSToFreeBSDHeaderConverter(), assertHeaderFile) + FromRTEMSToFreeBSDHeaderConverter(), assertHeaderOrSourceFile) def addUserSpaceHeaderFiles(self, files): self.files += self.addFiles(files,