aboutsummaryrefslogtreecommitdiff
path: root/src/scripts
diff options
context:
space:
mode:
authorLasse Collin <lasse.collin@tukaani.org>2010-10-08 15:25:45 +0300
committerLasse Collin <lasse.collin@tukaani.org>2010-10-08 15:25:45 +0300
commitb1c7368f95e93ccdefdd0748e04398c26766f47f (patch)
treefbba0f79912d7d009776a1b7e89b746677fbd8df /src/scripts
parentWindows: Make build.bash work without --enable-dynamic=no. (diff)
downloadxz-b1c7368f95e93ccdefdd0748e04398c26766f47f.tar.xz
Build: Add options to disable individual command line tools.
Diffstat (limited to 'src/scripts')
-rw-r--r--src/scripts/Makefile.am62
1 files changed, 26 insertions, 36 deletions
diff --git a/src/scripts/Makefile.am b/src/scripts/Makefile.am
index 86f27388..29bdbcd7 100644
--- a/src/scripts/Makefile.am
+++ b/src/scripts/Makefile.am
@@ -8,58 +8,48 @@
nodist_bin_SCRIPTS = xzdiff xzgrep xzmore xzless
dist_man_MANS = xzdiff.1 xzgrep.1 xzmore.1 xzless.1
+links = \
+ xzdiff-xzcmp \
+ xzgrep-xzegrep \
+ xzgrep-xzfgrep
+
+if COND_LZMALINKS
+links += \
+ xzdiff-lzdiff \
+ xzdiff-lzcmp \
+ xzgrep-lzgrep \
+ xzgrep-lzegrep \
+ xzgrep-lzfgrep \
+ xzmore-lzmore \
+ xzless-lzless
+endif
+
install-exec-hook:
cd $(DESTDIR)$(bindir) && \
- target=`echo xzdiff | sed '$(transform)'` && \
- for name in xzcmp lzdiff lzcmp; do \
- link=`echo $$name | sed '$(transform)'` && \
- rm -f $$link && \
- $(LN_S) $$target $$link; \
- done && \
- target=`echo xzgrep | sed '$(transform)'` && \
- for name in xzegrep xzfgrep lzgrep lzegrep lzfgrep; do \
- link=`echo $$name | sed '$(transform)'` && \
- rm -f $$link && \
- $(LN_S) $$target $$link; \
- done && \
- for name in xzmore xzless; do \
- target=`echo $$name | sed '$(transform)'` && \
- link=`echo $$name | sed 's/xz/lz/;$(transform)'` && \
+ for pair in $(links); do \
+ target=`echo $$pair | sed 's/-.*$$//' | sed '$(transform)'` && \
+ link=`echo $$pair | sed 's/^.*-//' | sed '$(transform)'` && \
rm -f $$link && \
$(LN_S) $$target $$link; \
done
install-data-hook:
cd $(DESTDIR)$(mandir)/man1 && \
- target=`echo xzdiff | sed '$(transform)'` && \
- for name in xzcmp lzdiff lzcmp; do \
- link=`echo $$name | sed '$(transform)'` && \
- rm -f $$link.1 && \
- $(LN_S) $$target.1 $$link.1; \
- done && \
- target=`echo xzgrep | sed '$(transform)'` && \
- for name in xzegrep xzfgrep lzgrep lzegrep lzfgrep; do \
- link=`echo $$name | sed '$(transform)'` && \
- rm -f $$link.1 && \
- $(LN_S) $$target.1 $$link.1; \
- done && \
- for name in xzmore xzless; do \
- target=`echo $$name | sed '$(transform)'` && \
- link=`echo $$name | sed 's/xz/lz/;$(transform)'` && \
+ for pair in $(links); do \
+ target=`echo $$pair | sed 's/-.*$$//' | sed '$(transform)'` && \
+ link=`echo $$pair | sed 's/^.*-//' | sed '$(transform)'` && \
rm -f $$link.1 && \
$(LN_S) $$target.1 $$link.1; \
done
uninstall-hook:
cd $(DESTDIR)$(bindir) && \
- for name in xzcmp lzdiff lzcmp xzegrep xzfgrep \
- lzgrep lzegrep lzfgrep lzmore lzless; do \
- link=`echo $$name | sed '$(transform)'` && \
+ for pair in $(links); do \
+ link=`echo $$pair | sed 's/^.*-//' | sed '$(transform)'` && \
rm -f $$link; \
done
cd $(DESTDIR)$(mandir)/man1 && \
- for name in xzcmp lzdiff lzcmp xzegrep xzfgrep \
- lzgrep lzegrep lzfgrep lzmore lzless; do \
- link=`echo $$name | sed '$(transform)'` && \
+ for pair in $(links); do \
+ link=`echo $$pair | sed 's/^.*-//' | sed '$(transform)'` && \
rm -f $$link.1; \
done