mirror of
https://github.com/systemd/systemd.git
synced 2026-08-04 15:10:33 +00:00
meson: Check if files returned by git ls-files actually exist
Otherwise you run into errors such as: """ ../meson.build:2899:28: ERROR: File src/test/test-loop-util.c does not exist. """ when deleting a file in git without staging the deletion.
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
92d87ac302
commit
8355eb6e11
@@ -2896,7 +2896,13 @@ if git.found()
|
|||||||
'ls-files', ':/*.[ch]', ':/*.cc',
|
'ls-files', ':/*.[ch]', ':/*.cc',
|
||||||
check : false)
|
check : false)
|
||||||
if all_files.returncode() == 0
|
if all_files.returncode() == 0
|
||||||
all_files = files(all_files.stdout().split())
|
existing_files = []
|
||||||
|
foreach f : all_files.stdout().split()
|
||||||
|
if fs.exists(f)
|
||||||
|
existing_files += f
|
||||||
|
endif
|
||||||
|
endforeach
|
||||||
|
all_files = files(existing_files)
|
||||||
|
|
||||||
custom_target(
|
custom_target(
|
||||||
output : 'tags',
|
output : 'tags',
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ foreach p : out.stdout().split()
|
|||||||
#
|
#
|
||||||
# Also, backslashes get mangled, so skip test. See
|
# Also, backslashes get mangled, so skip test. See
|
||||||
# https://github.com/mesonbuild/meson/issues/1564.
|
# https://github.com/mesonbuild/meson/issues/1564.
|
||||||
if p.contains('\\')
|
if p.contains('\\') or not fs.exists(p)
|
||||||
continue
|
continue
|
||||||
endif
|
endif
|
||||||
fuzzer = fs.name(fs.parent(p))
|
fuzzer = fs.name(fs.parent(p))
|
||||||
|
|||||||
Reference in New Issue
Block a user