[meson] Don’t tamper with paths in amalgam files

Using os.path.basename() breaks files in subdirectories
(gsubgpos-graph.cc instead of graph/gsubgpos-graph.cc).

Use paths relative to current source dir instead.
This commit is contained in:
Khaled Hosny 2022-07-28 02:19:26 +02:00 committed by خالد حسني (Khaled Hosny)
parent 0c5b60acbd
commit 5df2347cf3
2 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ CURRENT_SOURCE_DIR = sys.argv[2]
sources = sorted(set(sys.argv[3:]))
with open (OUTPUT, "wb") as f:
f.write ("".join ('#include "{}"\n'.format (os.path.basename (x)) for x in sources if x.endswith (".cc")).encode ())
f.write ("".join ('#include "{}"\n'.format (os.path.relpath (os.path.abspath (x), CURRENT_SOURCE_DIR)) for x in sources if x.endswith (".cc")).encode ())
# copy it also to the source tree, but only if it has changed
baseline_filename = os.path.join (CURRENT_SOURCE_DIR, os.path.basename (OUTPUT))

View File

@ -1,4 +1,4 @@
#include "gsubgpos-graph.cc"
#include "graph/gsubgpos-graph.cc"
#include "hb-aat-layout.cc"
#include "hb-aat-map.cc"
#include "hb-blob.cc"