From dd60daaaa3c76178ace3605033bef4f3f3b974f3 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 9 Aug 2018 12:59:55 +0200 Subject: Allow *.c as kernel space header files This is a workaround for the FreeBSD kernel space source file sys/opencrypto/xform.c which includes a bunch of *.c files. Update #3472. --- builder.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'builder.py') 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, -- cgit v1.2.3