diff options
Diffstat (limited to 'Build/source/libs/harfbuzz/harfbuzz-src/src/check-c-linkage-decls.py')
-rw-r--r-- | Build/source/libs/harfbuzz/harfbuzz-src/src/check-c-linkage-decls.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Build/source/libs/harfbuzz/harfbuzz-src/src/check-c-linkage-decls.py b/Build/source/libs/harfbuzz/harfbuzz-src/src/check-c-linkage-decls.py index b7532a7e944..49cd29628c6 100644 --- a/Build/source/libs/harfbuzz/harfbuzz-src/src/check-c-linkage-decls.py +++ b/Build/source/libs/harfbuzz/harfbuzz-src/src/check-c-linkage-decls.py @@ -4,11 +4,19 @@ import sys, os os.chdir (os.getenv ('srcdir', os.path.dirname (__file__))) +def removeprefix(s, prefix): + if s.startswith(prefix): + return s[len(prefix):] + else: + return s[:] + HBHEADERS = [os.path.basename (x) for x in os.getenv ('HBHEADERS', '').split ()] or \ [x for x in os.listdir ('.') if x.startswith ('hb') and x.endswith ('.h')] -HBSOURCES = [os.path.basename (x) for x in os.getenv ('HBSOURCES', '').split ()] or \ - [x for x in os.listdir ('.') if x.startswith ('hb') and x.endswith (('.cc', '.hh'))] - +HBSOURCES = [ + removeprefix(x, 'src%s' % os.path.sep) for x in os.getenv ('HBSOURCES', '').split () +] or [ + x for x in os.listdir ('.') if x.startswith ('hb') and x.endswith (('.cc', '.hh')) +] stat = 0 for x in HBHEADERS: |