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
31 ## Find these programs wherever they may lie. Yes, this has
32 ## intimate knowledge of the structure of the texinfo distribution.
33 MAKEINFO = `if test -f $(top_builddir)/../texinfo/makeinfo/makeinfo; then \
34 echo $(top_builddir)/../texinfo/makeinfo/makeinfo; \
39 TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then \
40 echo $(top_srcdir)/../texinfo/util/texi2dvi; \
52 ## The way to make PostScript, for those who want it.
59 .PHONY: info info-am dvi dvi-am
61 RECURSIVE_TARGETS += info-recursive dvi-recursive
62 .PHONY info: info-recursive
63 .PHONY dvi: dvi-recursive
75 endif ! %?LOCAL-TEXIS%
82 ## Look in both . and srcdir because the info pages might have been
83 ## rebuilt in the build directory. Can't cd to srcdir; that might
84 ## break a possible install-sh reference.
86 ## Funny name due to --cygnus influence; we want to reserve
87 ## `install-info' for the user.
89 ## TEXINFOS primary are always installed in infodir, hence install-data
93 _am_installdirs += $(DESTDIR)$(infodir)
94 install-data-am: install-info-am
97 RECURSIVE_TARGETS += install-info-recursive
98 .PHONY install-info: install-info-recursive
100 .PHONY install-info: install-info-am
102 endif %?INSTALL-INFO%
105 install-info-am: $(INFO_DEPS)
107 $(mkinstalldirs) $(DESTDIR)$(infodir)
108 @list='$(INFO_DEPS)'; \
109 for file in $$list; do \
110 ?CYGNUS? if test -f $$file; then d=.; else d=$(srcdir); fi; \
111 ?!CYGNUS? d=$(srcdir); \
112 ## We use these strange circumlocutions because we want the "ifile" to
113 ## be relative, for the install.
114 for ifile in `CDPATH=: && cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
115 if test -f $$d/$$ifile; then \
116 echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; \
117 $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
122 ## Only run this code if install-info actually exists, and it is not
123 ## the Debian install-info. FIXME: once Debian install-info goes
124 ## away, we can remove this hack. Debian install-info v1.8.3
125 ## prints version info to stderr.
126 @if $(SHELL) -c 'install-info --version 2>&1 | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
127 list='$(INFO_DEPS)'; \
128 for file in $$list; do \
129 ## Run `:' after install-info in case install-info fails. We really
130 ## don't care about failures here, because they can be spurious. For
131 ## instance if you don't have a dir file, install-info will fail. I
132 ## think instead it should create a new dir file for you. This bug
133 ## causes the `make distcheck' target to fail reliably.
134 echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
135 ## Use `|| :' here because Sun make passes -e to sh; if install-info
136 ## fails then we'd fail if we used `;'.
137 install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
140 else ! %?LOCAL-TEXIS%
142 endif ! %?LOCAL-TEXIS%
149 ?SUBDIRS?RECURSIVE_TARGETS += uninstall-info-recursive
150 ?SUBDIRS?.PHONY uninstall-info: uninstall-info-recursive
151 ?!SUBDIRS?.PHONY uninstall-info: uninstall-info-am
152 ?INSTALL-INFO?uninstall-am: uninstall-info-am
157 ## Run two loops here so that we can handle PRE_UNINSTALL and
158 ## NORMAL_UNINSTALL correctly. Debian install-info v1.8.3 prints
159 ## version info to stderr.
160 @if $(SHELL) -c 'install-info --version 2>&1 | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \
161 list='$(INFO_DEPS)'; \
162 for file in $$list; do \
163 ## install-info needs the actual info file. We use the installed one,
164 ## rather than relying on one still being in srcdir or builddir.
165 echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file"; \
166 install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file; \
170 @list='$(INFO_DEPS)'; \
171 for file in $$list; do \
172 (if cd $(DESTDIR)$(infodir); then \
173 echo " rm -f $$file $$file-[0-9] $$file-[0-9][0-9])"; \
174 rm -f $$file $$file-[0-9] $$file-[0-9][0-9]; \
177 else ! %?LOCAL-TEXIS%
179 endif ! %?LOCAL-TEXIS%
183 dist-info: $(INFO_DEPS)
184 list='$(INFO_DEPS)'; \
185 for base in $$list; do \
186 ## In Cygnus mode, allow info file to be in source or build dir. In
187 ## other modes, allow only source dir.
188 ?!CYGNUS? d=$(srcdir); \
189 ?CYGNUS? if test -f $$base; then d=.; else d=$(srcdir); fi; \
190 for file in `CDPATH=: && cd $$d && eval echo $$base*`; do \
191 test -f $(distdir)/$$file \
192 || cp -p $$d/$$file $(distdir)/$$file; \
202 ## The funny name is due to --cygnus influence; in Cygnus mode,
203 ## `clean-info' is a target that users can use.
206 .PHONY: mostlyclean-aminfo
207 mostlyclean-am: mostlyclean-aminfo
211 .PHONY: maintainer-clean-aminfo
212 maintainer-clean-am: maintainer-clean-aminfo
213 maintainer-clean-aminfo:
214 ## Eww. But how else can we find all the output files from makeinfo?
215 ?!CYGNUS? cd $(srcdir) && \
216 for i in $(INFO_DEPS); do \
218 if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
223 ?CYGNUS?.PHONY: clean-info
224 ?CYGNUS?clean-info: mostlyclean-aminfo