1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 1998-2012 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, see <http://www.gnu.org/licenses/>.
18 man%SECTION%dir = $(mandir)/man%SECTION%
24 ## MANS primary are always installed in mandir, hence install-data
28 ?INSTALL-MAN?install-data-am: install-man
29 ?INSTALL-MAN?am__installdirs += "$(DESTDIR)$(man%SECTION%dir)"
30 .PHONY install-man: install-man%SECTION%
31 install-man%SECTION%: %DEPS%
33 test -z "$(man%SECTION%dir)" || $(MKDIR_P) "$(DESTDIR)$(man%SECTION%dir)"
35 ## Handle MANS with notrans_ prefix
36 @list='%NOTRANS_SECT_LIST%'; test -n "$(man%SECTION%dir)" || exit 0; \
37 { for i in $$list; do echo "$$i"; done; \
38 ## Extract all items from notrans_man_MANS that should go in this section.
39 ## This must be done dynamically to support conditionals.
40 ?HAVE_NOTRANS? l2='%NOTRANS_LIST%'; for i in $$l2; do echo "$$i"; done | \
41 ## Accept for `man1' files like `foo.1c' but not `sub.1/foo.2' or `foo-2.1.4'.
42 ?HAVE_NOTRANS? sed -n '/\.%SECTION%[a-z]*$$/p'; \
43 ## Extract basename of manpage, change the extension if needed.
44 } | while read p; do \
46 if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
47 echo "$$d$$p"; echo "$$p"; \
49 ## Extract the basename of the man page and change the extension if needed.
50 sed 'n;s,.*/,,;p;s,\.[^%SECTION%][0-9a-z]*$$,.%SECTION%,' | \
51 sed 'N;N;s,\n, ,g' | { \
52 ## We now have a list "sourcefile basename installed-name".
53 list=; while read file base inst; do \
54 if test "$$base" = "$$inst"; then list="$$list $$file"; else \
55 echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man%SECTION%dir)/$$inst'"; \
56 $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man%SECTION%dir)/$$inst" || exit $$?; \
59 for i in $$list; do echo "$$i"; done | $(am__base_list) | \
60 while read files; do \
61 test -z "$$files" || { \
62 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man%SECTION%dir)'"; \
63 $(INSTALL_DATA) $$files "$(DESTDIR)$(man%SECTION%dir)" || exit $$?; }; \
67 ## Handle MANS without notrans_ prefix
68 @list='%TRANS_SECT_LIST%'; test -n "$(man%SECTION%dir)" || exit 0; \
69 { for i in $$list; do echo "$$i"; done; \
70 ## Extract all items from notrans_man_MANS that should go in this section.
71 ## This must be done dynamically to support conditionals.
72 ?HAVE_TRANS? l2='%TRANS_LIST%'; for i in $$l2; do echo "$$i"; done | \
73 ## Accept for `man1' files like `foo.1c' but not `sub.1/foo.2' or `foo-2.1.4'.
74 ?HAVE_TRANS? sed -n '/\.%SECTION%[a-z]*$$/p'; \
75 ## Extract basename of manpage, change the extension if needed.
76 } | while read p; do \
78 if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
79 echo "$$d$$p"; echo "$$p"; \
81 ## Extract the basename of the man page and change the extension if needed.
82 sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^%SECTION%][0-9a-z]*$$,%SECTION%,;x' \
83 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
84 sed 'N;N;s,\n, ,g' | { \
85 ## We now have a list "sourcefile basename installed-name".
86 list=; while read file base inst; do \
87 if test "$$base" = "$$inst"; then list="$$list $$file"; else \
88 echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man%SECTION%dir)/$$inst'"; \
89 $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man%SECTION%dir)/$$inst" || exit $$?; \
92 for i in $$list; do echo "$$i"; done | $(am__base_list) | \
93 while read files; do \
94 test -z "$$files" || { \
95 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man%SECTION%dir)'"; \
96 $(INSTALL_DATA) $$files "$(DESTDIR)$(man%SECTION%dir)" || exit $$?; }; \
105 .PHONY: uninstall-man
106 ?INSTALL-MAN?uninstall-am: uninstall-man
107 .PHONY uninstall-man: uninstall-man%SECTION%
108 uninstall-man%SECTION%:
111 ## Handle MANS with notrans_ prefix
112 @list='%NOTRANS_SECT_LIST%'; test -n "$(man%SECTION%dir)" || exit 0; \
113 files=`{ for i in $$list; do echo "$$i"; done; \
114 ## Extract all items from notrans_man_MANS that should go in this section.
115 ## This must be done dynamically to support conditionals.
116 ?HAVE_NOTRANS? l2='%NOTRANS_LIST%'; for i in $$l2; do echo "$$i"; done | \
117 ## Accept for `man1' files like `foo.1c' but not `sub.1/foo.2' or `foo-2.1.4'.
118 ?HAVE_NOTRANS? sed -n '/\.%SECTION%[a-z]*$$/p'; \
119 ## Extract basename of manpage, change the extension if needed.
120 } | sed 's,.*/,,;s,\.[^%SECTION%][0-9a-z]*$$,.%SECTION%,'`; \
121 dir='$(DESTDIR)$(man%SECTION%dir)'; $(am__uninstall_files_from_dir)
122 endif %?NOTRANS_MANS%
124 ## Handle MANS without notrans_ prefix
125 @list='%TRANS_SECT_LIST%'; test -n "$(man%SECTION%dir)" || exit 0; \
126 files=`{ for i in $$list; do echo "$$i"; done; \
127 ## Extract all items from man_MANS that should go in this section.
128 ## This must be done dynamically to support conditionals.
129 ?HAVE_TRANS? l2='%TRANS_LIST%'; for i in $$l2; do echo "$$i"; done | \
130 ## Accept for `man1' files like `foo.1c' but not `sub.1/foo.2' or `foo-2.1.4'.
131 ?HAVE_TRANS? sed -n '/\.%SECTION%[a-z]*$$/p'; \
132 ## Extract basename of manpage, run it through the program rename
133 ## transform, and change the extension if needed.
134 } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^%SECTION%][0-9a-z]*$$,%SECTION%,;x' \
135 -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
136 dir='$(DESTDIR)$(man%SECTION%dir)'; $(am__uninstall_files_from_dir)