Use CLEANFILES to remove the generated symlinks, and just ignore the errors when copying the scripts in srcdir!=builddir situations. Followup of commit 40ac54829d4e71b1bac76343872a2674a40c7ac0. --- bash/Makefile.am | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/bash/Makefile.am b/bash/Makefile.am index 780da64..ee9c10c 100644 --- a/bash/Makefile.am +++ b/bash/Makefile.am @@ -42,6 +42,9 @@ EXTRA_DIST = \ README \ $(scripts) +CLEANFILES = \ + $(symlinks) + # Some of the scripts are simply symbolic links. virt-cat virt-df virt-edit virt-filesystems virt-format virt-inspector \ virt-log virt-ls virt-sysprep: @@ -60,13 +63,13 @@ bashcompletiondir = $(BASH_COMPLETIONS_DIR) #bashcompletion_DATA = $(scripts) all-local: $(scripts) $(symlinks) - test $(srcdir) != $(builddir) && cd $(srcdir) && cp $(scripts) $(abs_builddir)/ + -test $(srcdir) != $(builddir) && cd $(srcdir) && cp $(scripts) $(abs_builddir)/ install-data-local: $(mkdir_p) $(DESTDIR)$(bashcompletiondir) cp -d $(scripts) $(symlinks) $(DESTDIR)$(bashcompletiondir) clean-local: - test $(srcdir) != $(builddir) && rm -f $(symlinks) $(scripts) + -test $(srcdir) != $(builddir) && rm -f $(scripts) endif -- 1.9.3