scons: remove file existence check from InstallData

It was breaking install of generated files. Also adjusted manpage
install which was relying on this behavior.
This helps with issue #5692
This commit is contained in:
loonycyborg 2021-04-25 03:11:56 +03:00
parent 546355f32e
commit 5d8c476396
No known key found for this signature in database
GPG Key ID: 6E8233FAB8F26D61
2 changed files with 4 additions and 4 deletions

View File

@ -738,8 +738,9 @@ linguas = Split(File("po/LINGUAS").get_contents().decode("utf-8"))
def InstallManpages(env, component):
env.InstallData("mandir", component, os.path.join("doc", "man", component + ".6"), "man6")
for lingua in linguas:
manpage = os.path.join("doc", "man", lingua, component + ".6")
env.InstallData("mandir", component, manpage, os.path.join(lingua, "man6"))
manpage = FindFile(os.path.join(lingua, component + ".6"), "doc/man")
if manpage:
env.InstallData("mandir", component, manpage, os.path.join(lingua, "man6"))
# Now the actual installation productions

View File

@ -73,8 +73,7 @@ def InstallData(env, datadir, component, source, subdir = "", **kwargs):
if isinstance(source, SCons.Node.FS.Dir) or source.isdir():
dirs.append(source)
else:
if source.exists():
env.Alias("install-" + component, env.Install(installdir, source, **kwargs))
env.Alias("install-" + component, env.Install(installdir, source, **kwargs))
if dirs:
if len(dirs) == 1:
install = env.InstallFiltered(installdir.path, dirs[0].path, **kwargs)