Skip to content

Commit

Permalink
scons: remove file existence check from InstallData
Browse files Browse the repository at this point in the history
It was breaking install of generated files. Also adjusted manpage
install which was relying on this behavior.
This helps with issue wesnoth#5692
  • Loading branch information
loonycyborg committed Apr 25, 2021
1 parent 546355f commit 5d8c476
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
5 changes: 3 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 1 addition & 2 deletions scons/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5d8c476

Please sign in to comment.