1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright 1998, 2001 Free Software Foundation, Inc.
4 ## This program is free software; you can redistribute it and/or modify
5 ## it under the terms of the GNU General Public License as published by
6 ## the Free Software Foundation; either version 2, or (at your option)
9 ## This program is distributed in the hope that it will be useful,
10 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ## GNU General Public License for more details.
14 ## You should have received a copy of the GNU General Public License
15 ## along with this program; if not, write to the Free Software
16 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
19 man%SECTION%dir = $(mandir)/man%SECTION%
25 ## MANS primary are always installed in mandir, hence install-data
29 ?INSTALL-MAN?install-data-am: install-man
30 ?INSTALL-MAN?_am_installdirs += $(DESTDIR)$(man%SECTION%dir)
31 .PHONY install-man: install-man%SECTION%
32 install-man%SECTION%: $(man%SECTION%_MANS) $(man_MANS)
34 $(mkinstalldirs) $(DESTDIR)$(man%SECTION%dir)
35 @list='$(man%SECTION%_MANS) $(dist_man%SECTION%_MANS) $(nodist_man%SECTION%_MANS)'; \
36 ## Extract all items from man_MANS that should go in this section.
37 ## This must be done dynamically to support conditionals.
38 l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
41 ## Have to accept files like `foo.1c'.
42 *.%SECTION%*) list="$$list $$i" ;; \
47 if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
49 ## Extract basename of man page and run it through the program rename
51 ext=`echo $$i | sed -e 's/^.*\\.//'`; \
52 inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
53 inst=`echo $$inst | sed -e 's/^.*\///'`; \
54 inst=`echo $$inst | sed '$(transform)'`.$$ext; \
55 echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man%SECTION%dir)/$$inst"; \
56 $(INSTALL_DATA) $$file $(DESTDIR)$(man%SECTION%dir)/$$inst; \
64 ## This is just completely gross.
66 ?INSTALL-MAN?uninstall-am: uninstall-man
67 .PHONY uninstall-man: uninstall-man%SECTION%
68 uninstall-man%SECTION%:
70 @list='$(man%SECTION%_MANS) $(dist_man%SECTION%_MANS) $(nodist_man%SECTION%_MANS)'; \
71 ## Extract all items from man_MANS that should go in this section.
72 ## This must be done dynamically to support conditionals.
73 l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
76 ## Have to accept files like `foo.1c'.
77 *.%SECTION%*) list="$$list $$i" ;; \
81 ## Extract basename of man page and run it through the program rename
83 ext=`echo $$i | sed -e 's/^.*\\.//'`; \
84 inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
85 inst=`echo $$inst | sed -e 's/^.*\///'`; \
86 inst=`echo $$inst | sed '$(transform)'`.$$ext; \
87 echo " rm -f $(DESTDIR)$(man%SECTION%dir)/$$inst"; \
88 rm -f $(DESTDIR)$(man%SECTION%dir)/$$inst; \