1 ## automake - create Makefile.in from Makefile.am
3 ## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
4 ## Free Software Foundation, Inc.
6 ## This program is free software; you can redistribute it and/or modify
7 ## it under the terms of the GNU General Public License as published by
8 ## the Free Software Foundation; either version 2, or (at your option)
11 ## This program is distributed in the hope that it will be useful,
12 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ## GNU General Public License for more details.
16 ## You should have received a copy of the GNU General Public License
17 ## along with this program; if not, write to the Free Software
18 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
32 ## Find these programs wherever they may lie. Yes, this has
33 ## intimate knowledge of the structure of the texinfo distribution.
34 MAKEINFO = `if test -f $(top_builddir)/../texinfo/makeinfo/makeinfo; then \
35 echo $(top_builddir)/../texinfo/makeinfo/makeinfo; \
40 TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then \
41 echo $(top_srcdir)/../texinfo/util/texi2dvi; \
47 TEXI2PDF = $(TEXI2DVI) --pdf
55 ## The way to make PostScript, for those who want it.
62 .PHONY: info info-am dvi dvi-am pdf pdf-am
64 RECURSIVE_TARGETS += info-recursive dvi-recursive pdf-recursive ps-recursive
65 .PHONY info: info-recursive
66 .PHONY dvi: dvi-recursive
67 .PHONY pdf: pdf-recursive
68 .PHONY ps: ps-recursive
86 endif ! %?LOCAL-TEXIS%
93 ## Look in both . and srcdir because the info pages might have been
94 ## rebuilt in the build directory. Can't cd to srcdir; that might
95 ## break a possible install-sh reference.
97 ## Funny name due to --cygnus influence; we want to reserve
98 ## `install-info' for the user.
100 ## TEXINFOS primary are always installed in infodir, hence install-data
104 am__installdirs += $(DESTDIR)$(infodir)
105 install-data-am: install-info-am
108 RECURSIVE_TARGETS += install-info-recursive
109 .PHONY install-info: install-info-recursive
111 install-info: install-info-am
113 endif %?INSTALL-INFO%
115 .PHONY: install-info-am
118 install-info-am: $(INFO_DEPS)
120 $(mkinstalldirs) $(DESTDIR)$(infodir)
121 @list='$(INFO_DEPS)'; \
122 for file in $$list; do \
123 if test -f $$file; then d=.; else d=$(srcdir); fi; \
124 for ifile in echo $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9]; do \
125 if test -f $$ifile; then \
126 ## Strip leading '$$d/'.
127 relfile=`expr "$$ifile" : "$$d/\(.*\)"`; \
128 echo " $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile"; \
129 $(INSTALL_DATA) $$ifile $(DESTDIR)$(infodir)/$$relfile; \
134 ## Only run this code if install-info actually exists, and it is not
135 ## the Debian install-info. FIXME: once Debian install-info goes
136 ## away, we can remove this hack. Debian install-info v1.8.3
137 ## prints version info to stderr.
140 ## install-info --version 2>&1 | sed 1q | grep -s -v -i debian
141 ## as if install-info does not exist, grep -v will be happy, and
142 ## therefore the code will be triggered although install-info is missing.
143 @if (install-info --version && \
144 install-info --version | grep -i -v debian) >/dev/null 2>&1; then \
145 list='$(INFO_DEPS)'; \
146 for file in $$list; do \
147 ## Run `:' after install-info in case install-info fails. We really
148 ## don't care about failures here, because they can be spurious. For
149 ## instance if you don't have a dir file, install-info will fail. I
150 ## think instead it should create a new dir file for you. This bug
151 ## causes the `make distcheck' target to fail reliably.
152 echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\
153 ## Use `|| :' here because Sun make passes -e to sh; if install-info
154 ## fails then we'd fail if we used `;'.
155 install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\
158 else ! %?LOCAL-TEXIS%
160 endif ! %?LOCAL-TEXIS%
167 ?SUBDIRS?RECURSIVE_TARGETS += uninstall-info-recursive
168 ?SUBDIRS?.PHONY uninstall-info: uninstall-info-recursive
169 ?INSTALL-INFO?uninstall-am: uninstall-info-am
171 .PHONY: uninstall-info-am
176 ## Run two loops here so that we can handle PRE_UNINSTALL and
177 ## NORMAL_UNINSTALL correctly. Debian install-info v1.8.3 prints
178 ## version info to stderr.
179 @if (install-info --version && \
180 install-info --version | grep -i -v debian) >/dev/null 2>&1; then \
181 list='$(INFO_DEPS)'; \
182 for file in $$list; do \
183 ## install-info needs the actual info file. We use the installed one,
184 ## rather than relying on one still being in srcdir or builddir.
185 echo " install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file"; \
186 install-info --info-dir=$(DESTDIR)$(infodir) --remove $(DESTDIR)$(infodir)/$$file; \
190 @list='$(INFO_DEPS)'; \
191 for file in $$list; do \
192 (if cd $(DESTDIR)$(infodir); then \
193 echo " rm -f $$file $$file-[0-9] $$file-[0-9][0-9])"; \
194 rm -f $$file $$file-[0-9] $$file-[0-9][0-9]; \
197 else ! %?LOCAL-TEXIS%
199 endif ! %?LOCAL-TEXIS%
203 dist-info: $(INFO_DEPS)
204 list='$(INFO_DEPS)'; \
205 for base in $$list; do \
206 if test -f $$base; then d=.; else d=$(srcdir); fi; \
207 for file in $$d/$$base*; do \
208 ## Strip leading '$$d/'.
209 relfile=`expr "$$file" : "$$d/\(.*\)"`; \
210 test -f $(distdir)/$$relfile || \
211 cp -p $$file $(distdir)/$$relfile; \
221 ## The funny name is due to --cygnus influence; in Cygnus mode,
222 ## `clean-info' is a target that users can use.
225 .PHONY: mostlyclean-aminfo
226 mostlyclean-am: mostlyclean-aminfo
230 .PHONY: maintainer-clean-aminfo
231 maintainer-clean-am: maintainer-clean-aminfo
232 maintainer-clean-aminfo:
233 ## Eww. But how else can we find all the output files from makeinfo?
234 list='$(INFO_DEPS)'; for i in $$list; do \
236 if test "`echo $$i-[0-9]*`" != "$$i-[0-9]*"; then \
241 ?CYGNUS?.PHONY: clean-info
242 ?CYGNUS?clean-info: mostlyclean-aminfo