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