aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2014-04-25 17:53:42 +0300
committerLasse Collin <lasse.collin@tukaani.org>2014-04-25 17:53:42 +0300
commit1555a9c5664afc7893a2b75e9970105437f01ef1 (patch)
tree1401cc5dbe8a5f84f01d6b9a6c4a0dafdee73647 /src
parentBuild: Add --disable-doc to configure. (diff)
downloadxz-1555a9c5664afc7893a2b75e9970105437f01ef1.tar.xz
Build: Fix the combination of --disable-xzdec --enable-lzmadec.
In this case "make install" could fail if the man page directory didn't already exist at the destination. If it did exist, a dangling symlink was created there. Now the link is omitted instead. This isn't the best fix but it's better than the old behavior.
Diffstat (limited to 'src')
-rw-r--r--src/xzdec/Makefile.am10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/xzdec/Makefile.am b/src/xzdec/Makefile.am
index 2348e4e6..70746c0c 100644
--- a/src/xzdec/Makefile.am
+++ b/src/xzdec/Makefile.am
@@ -59,7 +59,14 @@ endif
if COND_LZMADEC
bin_PROGRAMS += lzmadec
-# FIXME: If xzdec is disabled, this will create a dangling symlink.
+# Create the symlink lzmadec.1->xzdec.1 only if xzdec.1 was installed.
+# This is better than creating a dangling symlink, especially
+# because creating the link may fail due to the directory being missing.
+#
+# FIXME: The correct solution would be to install xzdec.1 as lzmadec.1
+# but I don't know what is the sane way to do it and since this is a bit
+# unusual situation anyway, it's not that important.
+if COND_XZDEC
install-data-hook:
cd $(DESTDIR)$(mandir)/man1 && \
target=`echo xzdec | sed '$(transform)'` && \
@@ -72,3 +79,4 @@ uninstall-hook:
link=`echo lzmadec | sed '$(transform)'` && \
rm -f $$link.1
endif
+endif