1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
3 ## Free Software Foundation, Inc.
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 2, or (at your option)
10 ## This program is distributed in the hope that it will be useful,
11 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 ## GNU General Public License for more details.
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program; if not, write to the Free Software
17 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
20 ## The way to make PostScript, for those who want it.
25 ## Look in both . and srcdir because the info pages might have been
26 ## rebuilt in the build directory. Can't cd to srcdir; that might
27 ## break a possible install-sh reference.
29 ## Funny name due to --cygnus influence; we want to reserve
30 ## `install-info' for the user.
32 ## TEXINFOS primary are always installed in infodir, hence install-data
34 ?INSTALL-INFO?_am_installdirs += $(DESTDIR)$(infodir)
35 .PHONY: install-info-am
36 ?INSTALL-INFO?install-data-am: install-info-am
37 install-info-am: $(INFO_DEPS)
39 $(mkinstalldirs) $(DESTDIR)$(infodir)
40 @list='$(INFO_DEPS)'; \
41 for file in $$list; do \
42 ?CYGNUS? if test -f $$file; then d=.; else d=$(srcdir); fi; \
43 ?!CYGNUS? d=$(srcdir); \
44 ## We use these strange circumlocutions because we want the "ifile" to
45 ## be relative, for the install.
46 for ifile in `CDPATH=: && cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
47 if test -f $$d/$$ifile; then \
48 echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
49 $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
54 ## Only run this code if install-info actually exists, and it is not
55 ## the Debian install-info. FIXME: once Debian install-info goes
56 ## away, we can remove this hack.
57 @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
58 list='$(INFO_DEPS)'; \
59 for file in $$list; do \
60 ## Run `:' after install-info in case install-info fails. We really
61 ## don't care about failures here, because they can be spurious. For
62 ## instance if you don't have a dir file, install-info will fail. I
63 ## think instead it should create a new dir file for you. This bug
64 ## causes the `make distcheck' target to fail reliably.
65 echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
66 ## Use `|| :' here because Sun make passes -e to sh; if install-info
67 ## fails then we'd fail if we used `;'.
68 install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
72 .PHONY: uninstall-info
73 ?INSTALL-INFO?uninstall-am: uninstall-info
76 ## Run two loops here so that we can handle PRE_UNINSTALL and
77 ## NORMAL_UNINSTALL correctly.
78 @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
79 list='$(INFO_DEPS)'; \
80 for file in $$list; do \
81 ## install-info needs the actual info file. We use the installed one,
82 ## rather than relying on one still being in srcdir or builddir.
83 echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file"; \
84 install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file; \
88 @list='$(INFO_DEPS)'; \
89 for file in $$list; do \
90 (if cd $(DESTDIR)$(infodir); then \
91 echo " rm -f $$file $$file-[0-9] $$file-[0-9][0-9])"; \
92 rm -f $$file $$file-[0-9] $$file-[0-9][0-9]; \
97 dist-info: $(INFO_DEPS)
98 list='$(INFO_DEPS)'; \
99 for base in $$list; do \
100 ## In Cygnus mode, allow info file to be in source or build dir. In
101 ## other modes, allow only source dir.
102 ?!CYGNUS? d=$(srcdir); \
103 ?CYGNUS? if test -f $$base; then d=.; else d=$(srcdir); fi; \
104 for file in `CDPATH=: && cd $$d && eval echo $$base*`; do \
105 test -f $(distdir)/$$file \
106 || cp -p $$d/$$file $(distdir)/$$file; \
111 ## How to clean. The funny name is due to --cygnus influence; in
112 ## Cygnus mode, `clean-info' is a target that users can use.
114 .PHONY: mostlyclean-aminfo
115 mostlyclean-am: mostlyclean-aminfo
119 .PHONY: maintainer-clean-aminfo
120 maintainer-clean-am: maintainer-clean-aminfo
121 maintainer-clean-aminfo:
122 ## Eww. But how else can we find all the output files from makeinfo?
123 ?!CYGNUS? cd $(srcdir) && \
124 for i in $(INFO_DEPS); do \
126 if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
131 ?CYGNUS?.PHONY: clean-info
132 ?CYGNUS?clean-info: mostlyclean-aminfo