Upstream tarball 10051
[amule.git] / automake / manpages.am
blobabd1e29a5d19831f18a129d08bd26e0226a3865b
1 install-data-hook:
2         @test -z "`echo $(SELECTED_MANPAGES)`" || \
3         for file in $(SELECTED_MANPAGES); do \
4                 lang=`echo $$file |  sed -e 's/^[^.]*\.//'`; \
5                 if test $$lang = 1; then \
6                         echo " $(mkinstalldirs) $(DESTDIR)$(mandir)/man1" ; \
7                         $(mkinstalldirs) $(DESTDIR)$(mandir)/man1 ; \
8                         if test -f $(srcdir)/$$file; then name=$(srcdir)/$$file; \
9                         else name=$$file; fi; \
10                         inst=`echo $$file | sed -e "s/\.1//" -e '$(transform)'`.1 ; \
11                         echo " $(INSTALL_DATA) $$name $(DESTDIR)$(mandir)/man1/$$inst" ; \
12                         $(INSTALL_DATA) $$name $(DESTDIR)$(mandir)/man1/$$inst ; \
13                 else \
14                         locale=`echo $$lang | sed -e 's/\..*//'` ; \
15                         echo " $(mkinstalldirs) $(DESTDIR)$(mandir)/$$locale/man1" ; \
16                         $(mkinstalldirs) $(DESTDIR)$(mandir)/$$locale/man1 ; \
17                         if test -f $(srcdir)/$$file; then name=$(srcdir)/$$file; \
18                         else name=$$file; fi; \
19                         inst=`echo $$file | sed -e "s/\.$${locale}\.1//" -e '$(transform)'`.1 ; \
20                         echo " $(INSTALL_DATA) $$name $(DESTDIR)$(mandir)/$$locale/man1/$$inst" ; \
21                         $(INSTALL_DATA) $$name $(DESTDIR)$(mandir)/$$locale/man1/$$inst ; \
22                 fi; \
23         done
25 uninstall-hook:
26         @test -z "`echo $(SELECTED_MANPAGES)`" || \
27         for file in $(SELECTED_MANPAGES); do \
28                 lang=`echo $$file |  sed -e 's/^[^.]*\.//'`; \
29                 if test $$lang = 1; then \
30                         inst=`echo $$file | sed -e "s/\.1//" -e '$(transform)'`.1 ; \
31                         rm -f $(DESTDIR)$(mandir)/man1/$$inst ; \
32                 else \
33                         locale=`echo $$lang | sed -e 's/\..*//'` ; \
34                         inst=`echo $$file | sed -e "s/\.$${locale}\.1//" -e '$(transform)'`.1 ; \
35                         rm -f $(DESTDIR)$(mandir)/$$locale/man1/$$inst ; \
36                 fi; \
37         done