1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 1998, 2001, 2003, 2004, 2006, 2008 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 3, 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, see <http://www.gnu.org/licenses/>.
17 man%SECTION%dir = $(mandir)/man%SECTION%
23 ## MANS primary are always installed in mandir, hence install-data
27 ?INSTALL-MAN?install-data-am: install-man
28 ?INSTALL-MAN?am__installdirs += "$(DESTDIR)$(man%SECTION%dir)"
29 .PHONY install-man: install-man%SECTION%
30 install-man%SECTION%: $(man%SECTION%_MANS) $(man_MANS)
32 test -z "$(man%SECTION%dir)" || $(MKDIR_P) "$(DESTDIR)$(man%SECTION%dir)"
33 @list='$(man%SECTION%_MANS) $(dist_man%SECTION%_MANS) $(nodist_man%SECTION%_MANS)'; \
34 ## Extract all items from man_MANS that should go in this section.
35 ## This must be done dynamically to support conditionals.
36 l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
39 ## Have to accept files like `foo.1c'.
40 *.%SECTION%*) list="$$list $$i" ;; \
45 if test -f $$i; then file=$$i; \
46 else file=$(srcdir)/$$i; fi; \
47 ## Change the extension if needed.
48 ext=`echo $$i | sed -e 's/^.*\\.//'`; \
51 *) ext='%SECTION%' ;; \
53 ## Extract basename of man page and run it through the program rename
55 inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
56 inst=`echo $$inst | sed -e 's/^.*\///'`; \
57 inst=`echo $$inst | sed '$(transform)'`.$$ext; \
58 echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man%SECTION%dir)/$$inst'"; \
59 $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man%SECTION%dir)/$$inst"; \
67 ## This is just completely gross.
69 ?INSTALL-MAN?uninstall-am: uninstall-man
70 .PHONY uninstall-man: uninstall-man%SECTION%
71 uninstall-man%SECTION%:
73 @list='$(man%SECTION%_MANS) $(dist_man%SECTION%_MANS) $(nodist_man%SECTION%_MANS)'; \
74 ## Extract all items from man_MANS that should go in this section.
75 ## This must be done dynamically to support conditionals.
76 l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
79 ## Have to accept files like `foo.1c'.
80 *.%SECTION%*) list="$$list $$i" ;; \
84 ## Change the extension if needed.
85 ext=`echo $$i | sed -e 's/^.*\\.//'`; \
88 *) ext='%SECTION%' ;; \
90 ## Extract basename of man page and run it through the program rename
92 inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
93 inst=`echo $$inst | sed -e 's/^.*\///'`; \
94 inst=`echo $$inst | sed '$(transform)'`.$$ext; \
95 echo " rm -f '$(DESTDIR)$(man%SECTION%dir)/$$inst'"; \
96 rm -f "$(DESTDIR)$(man%SECTION%dir)/$$inst"; \