Added clean targets.
[automake.git] / mans.am
blob582d265a9a129226008a8391bd6a4c5e647a534a
1 install-man:
2         for man in $(MANS); do                  \
3           sect=`echo $$man|sed 's%.*\.\([0-9][a-z]*\)$$%\1%'`; \
4           inst=`basename $$man $$sect|sed '$(transform)'`$$sect; \
5           mdir=$(mandir)/man$$sect;             \
6           $(top_srcdir)/mkinstalldirs $$mdir;   \
7           echo installing $$man as $$mdir/$$inst; \
8           $(INSTALL_DATA) $(srcdir)/$$man $$mdir/$$inst; \
9           cdir=$(mandir)/cat$$sect;             \
10           if test -d $$cdir; then               \
11             echo formatting $$man as $$cdir/$$inst; \
12             $(NROFF) -man $(srcdir)/$$man > $$cdir/$$inst; \
13           else                                  \
14             true;                               \
15           fi;                                   \
16         done
18 uninstall-man:
19         for man in $(MANS); do
20           sect=`echo $$man|sed 's%.*\(\.[0-9][a-z]*\)$$%\1%'`; \
21           inst=`basename $$man $sect|sed '$(transform)'`.$$sect; \
22           mdir=$(mandir)/man$$sect; \
23           cdir=$(mandir)/cat$$sect; \
24           rm -f $$mdir/$$inst $$cdir/$$inst; \
25         done