1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 1998, 2001, 2003, 2004 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 test -z "$(man%SECTION%dir)" || $(mkdir_p) "$(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 ## Change the extension if needed.
50 ext=`echo $$i | sed -e 's/^.*\\.//'`; \
53 *) ext='%SECTION%' ;; \
55 ## Extract basename of man page and run it through the program rename
57 inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
58 inst=`echo $$inst | sed -e 's/^.*\///'`; \
59 inst=`echo $$inst | sed '$(transform)'`.$$ext; \
60 echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man%SECTION%dir)/$$inst'"; \
61 $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man%SECTION%dir)/$$inst"; \
69 ## This is just completely gross.
71 ?INSTALL-MAN?uninstall-am: uninstall-man
72 .PHONY uninstall-man: uninstall-man%SECTION%
73 uninstall-man%SECTION%:
75 @list='$(man%SECTION%_MANS) $(dist_man%SECTION%_MANS) $(nodist_man%SECTION%_MANS)'; \
76 ## Extract all items from man_MANS that should go in this section.
77 ## This must be done dynamically to support conditionals.
78 l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
81 ## Have to accept files like `foo.1c'.
82 *.%SECTION%*) list="$$list $$i" ;; \
86 ## Change the extension if needed.
87 ext=`echo $$i | sed -e 's/^.*\\.//'`; \
90 *) ext='%SECTION%' ;; \
92 ## Extract basename of man page and run it through the program rename
94 inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
95 inst=`echo $$inst | sed -e 's/^.*\///'`; \
96 inst=`echo $$inst | sed '$(transform)'`.$$ext; \
97 echo " rm -f '$(DESTDIR)$(man%SECTION%dir)/$$inst'"; \
98 rm -f "$(DESTDIR)$(man%SECTION%dir)/$$inst"; \