debian: Prepare for upload
[xz/debian.git] / src / scripts / Makefile.am
blob29bdbcd76de5370c8ec2fdfaec8719aa2c6a3c10
1 ##
2 ## Author: Lasse Collin
3 ##
4 ## This file has been put into the public domain.
5 ## You can do whatever you want with this file.
6 ##
8 nodist_bin_SCRIPTS = xzdiff xzgrep xzmore xzless
9 dist_man_MANS = xzdiff.1 xzgrep.1 xzmore.1 xzless.1
11 links = \
12         xzdiff-xzcmp \
13         xzgrep-xzegrep \
14         xzgrep-xzfgrep
16 if COND_LZMALINKS
17 links += \
18         xzdiff-lzdiff \
19         xzdiff-lzcmp \
20         xzgrep-lzgrep \
21         xzgrep-lzegrep \
22         xzgrep-lzfgrep \
23         xzmore-lzmore \
24         xzless-lzless
25 endif
27 install-exec-hook:
28         cd $(DESTDIR)$(bindir) && \
29         for pair in $(links); do \
30                 target=`echo $$pair | sed 's/-.*$$//' | sed '$(transform)'` && \
31                 link=`echo $$pair | sed 's/^.*-//' | sed '$(transform)'` && \
32                 rm -f $$link && \
33                 $(LN_S) $$target $$link; \
34         done
36 install-data-hook:
37         cd $(DESTDIR)$(mandir)/man1 && \
38         for pair in $(links); do \
39                 target=`echo $$pair | sed 's/-.*$$//' | sed '$(transform)'` && \
40                 link=`echo $$pair | sed 's/^.*-//' | sed '$(transform)'` && \
41                 rm -f $$link.1 && \
42                 $(LN_S) $$target.1 $$link.1; \
43         done
45 uninstall-hook:
46         cd $(DESTDIR)$(bindir) && \
47         for pair in $(links); do \
48                 link=`echo $$pair | sed 's/^.*-//' | sed '$(transform)'` && \
49                 rm -f $$link; \
50         done
51         cd $(DESTDIR)$(mandir)/man1 && \
52         for pair in $(links); do \
53                 link=`echo $$pair | sed 's/^.*-//' | sed '$(transform)'` && \
54                 rm -f $$link.1; \
55         done