Translations: Update the Chinese (traditional) translation.
[xz/debian.git] / src / scripts / Makefile.am
blobfe5742d0073c04ad8ab2fba9e95cb90839b024a2
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 # The installation of translated man pages abuses Automake internals
37 # by calling "install-man" with redefined dist_man_MANS and man_MANS.
38 # If this breaks some day, don't blame Automake developers.
39 install-data-hook:
40         languages= ; \
41         if test "$(USE_NLS)" = yes && test -d "$(top_srcdir)/po4a/man"; then \
42                 languages=`ls "$(top_srcdir)/po4a/man"`; \
43         fi; \
44         for lang in $$languages; do \
45                 mans= ; \
46                 for man in $(dist_man_MANS); do \
47                         man="$(top_srcdir)/po4a/man/$$lang/$$man" ; \
48                         if test -f "$$man"; then \
49                                 mans="$$mans $$man"; \
50                         fi; \
51                 done; \
52                 $(MAKE) dist_man_MANS="$$mans" man_MANS= \
53                                 mandir="$(mandir)/$$lang" install-man; \
54         done; \
55         for lang in . $$languages; do \
56                 for pair in $(links); do \
57                         target=`echo $$pair | sed 's/-.*$$//' \
58                                         | sed '$(transform)'` && \
59                         link=`echo $$pair | sed 's/^.*-//' \
60                                         | sed '$(transform)'` && \
61                         man1dir="$(DESTDIR)$(mandir)/$$lang/man1" && \
62                         if test -f "$$man1dir/$$target.1"; then ( \
63                                 cd "$$man1dir" && \
64                                 rm -f "$$link.1" && \
65                                 $(LN_S) "$$target.1" "$$link.1" \
66                         ); fi; \
67                 done; \
68         done
70 uninstall-hook:
71         cd "$(DESTDIR)$(bindir)" && \
72         for pair in $(links); do \
73                 link=`echo $$pair | sed 's/^.*-//' | sed '$(transform)'` && \
74                 rm -f "$$link"; \
75         done
76         languages= ; \
77         if test "$(USE_NLS)" = yes && test -d "$(top_srcdir)/po4a/man"; then \
78                 languages=`ls "$(top_srcdir)/po4a/man"`; \
79         fi; \
80         for lang in . $$languages; do \
81                 for pair in $(links); do \
82                         target=`echo $$pair | sed 's/-.*$$//' \
83                                         | sed '$(transform)'` && \
84                         link=`echo $$pair | sed 's/^.*-//' \
85                                         | sed '$(transform)'` && \
86                         rm -f "$(DESTDIR)$(mandir)/$$lang/man1/$$target.1" \
87                                 "$(DESTDIR)$(mandir)/$$lang/man1/$$link.1"; \
88                 done; \
89         done