1 ## automake - create Makefile.in from Makefile.am
3 ## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
4 ## 2003, 2004, 2005, 2006, 2007, 2008 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 3, 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, see <http://www.gnu.org/licenses/>.
29 ## Find these programs wherever they may lie. Yes, this has
30 ## intimate knowledge of the structure of the texinfo distribution.
31 MAKEINFO = `if test -f $(top_builddir)/../texinfo/makeinfo/makeinfo; then \
32 echo $(top_builddir)/../texinfo/makeinfo/makeinfo; \
37 TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then \
38 echo $(top_srcdir)/../texinfo/util/texi2dvi; \
44 TEXI2PDF = $(TEXI2DVI) --pdf --batch
45 MAKEINFOHTML = $(MAKEINFO) --html
46 AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
54 ## The way to make PostScript, for those who want it.
58 TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
62 .PHONY: dvi dvi-am html html-am info info-am pdf pdf-am ps ps-am
64 RECURSIVE_TARGETS += dvi-recursive html-recursive info-recursive
65 RECURSIVE_TARGETS += pdf-recursive ps-recursive
91 endif ! %?LOCAL-TEXIS%
98 ## Look in both . and srcdir because the info pages might have been
99 ## rebuilt in the build directory. Can't cd to srcdir; that might
100 ## break a possible install-sh reference.
102 ## Funny name due to --cygnus influence; we want to reserve
103 ## `install-info' for the user.
105 ## TEXINFOS primary are always installed in infodir, hence install-data
109 am__installdirs += "$(DESTDIR)$(infodir)"
110 install-data-am: install-info-am
112 endif %?INSTALL-INFO%
114 install-dvi install-dvi-am \
115 install-html install-html-am \
116 install-info install-info-am \
117 install-pdf install-pdf-am \
118 install-ps install-ps-am
121 RECURSIVE_TARGETS += \
122 install-dvi-recursive \
123 install-html-recursive \
124 install-info-recursive \
125 install-pdf-recursive \
127 install-dvi: install-dvi-recursive
128 install-html: install-html-recursive
129 install-info: install-info-recursive
130 install-pdf: install-pdf-recursive
131 install-ps: install-ps-recursive
133 install-dvi: install-dvi-am
134 install-html: install-html-am
135 install-info: install-info-am
136 install-pdf: install-pdf-am
137 install-ps: install-ps-am
144 install-dvi-am: $(DVIS)
146 test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)"
147 @list='$(DVIS)'; for p in $$list; do \
148 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
150 done | $(am__base_list) | \
151 while read files; do \
152 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
153 $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)"; done
155 install-html-am: $(HTMLS)
157 test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
158 @list='$(HTMLS)'; list2=; for p in $$list; do \
159 if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
161 if test -d "$$d$$p"; then \
162 echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
163 $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
164 echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
165 $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f"; \
167 list2="$$list2 $$d$$p"; \
170 test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
171 while read files; do \
172 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
173 $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)"; done; }
175 install-info-am: $(INFO_DEPS)
177 test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)"
178 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
179 list='$(INFO_DEPS)'; \
180 for file in $$list; do \
181 ## Strip possible $(srcdir) prefix.
183 $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
185 if test -f $$file; then d=.; else d=$(srcdir); fi; \
186 ## 8+3 filesystems cannot deal with foo.info-N filenames: they all
187 ## conflict. DJGPP comes with a tool, DJTAR, that will rename these
188 ## files to foo.iNN while extracting the archive. DJGPP's makeinfo
189 ## is patched to grok these filenames. However we have to account
190 ## for the renaming when installing the info files.
192 ## If $file == foo.info, then $file_i == foo.i. The reason we use two
193 ## shell commands instead of one ('s|\.info$$|.i|') is so that a suffix-less
194 ## `foo' becomes `foo.i' too.
195 file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
196 for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
197 $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
198 if test -f $$ifile; then \
202 done | $(am__base_list) | \
203 while read files; do \
204 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
205 $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)"; done
207 ## Only run this code if install-info actually exists, and it is not
208 ## the Debian install-info. FIXME: once Debian install-info goes
209 ## away, we can remove this hack. Some versions of Debian install-info
210 ## print their version on stderr (e.g. 1.8.3), other do it in
211 ## on stdout (e.g. 1.10.15).
214 ## install-info --version 2>&1 | sed 1q | grep -v -i debian
215 ## as if install-info does not exist, grep -v will be happy, and
216 ## therefore the code will be triggered although install-info is missing.
217 @if (install-info --version && \
218 install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
219 list='$(INFO_DEPS)'; \
220 for file in $$list; do \
222 relfile=`echo "$$file" | sed 's|^.*/||'`; \
223 ## Run `:' after install-info in case install-info fails. We really
224 ## don't care about failures here, because they can be spurious. For
225 ## instance if you don't have a dir file, install-info will fail. I
226 ## think instead it should create a new dir file for you. This bug
227 ## causes the `make distcheck' target to fail reliably.
228 echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
229 ## Use `|| :' here because Sun make passes -e to sh; if install-info
230 ## fails then we'd fail if we used `;'.
231 install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
235 install-pdf-am: $(PDFS)
237 test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
238 @list='$(PDFS)'; for p in $$list; do \
239 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
241 done | $(am__base_list) | \
242 while read files; do \
243 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \
244 $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)"; done
246 install-ps-am: $(PSS)
248 test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)"
249 @list='$(PSS)'; for p in $$list; do \
250 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
252 done | $(am__base_list) | \
253 while read files; do \
254 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \
255 $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)"; done
257 else ! %?LOCAL-TEXIS%
263 endif ! %?LOCAL-TEXIS%
271 .PHONY uninstall-am: \
280 @list='$(DVIS)'; for p in $$list; do \
282 echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
283 rm -f "$(DESTDIR)$(dvidir)/$$f"; \
288 @list='$(HTMLS)'; for p in $$list; do \
290 ## $f can be a directory, hence the -r.
291 echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
292 rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
297 ## Run two loops here so that we can handle PRE_UNINSTALL and
298 ## NORMAL_UNINSTALL correctly.
299 @if test -d '$(DESTDIR)$(infodir)' && \
300 (install-info --version && \
301 install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
302 list='$(INFO_DEPS)'; \
303 for file in $$list; do \
304 relfile=`echo "$$file" | sed 's|^.*/||'`; \
305 ## install-info needs the actual info file. We use the installed one,
306 ## rather than relying on one still being in srcdir or builddir.
307 echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
308 install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
312 @list='$(INFO_DEPS)'; \
313 for file in $$list; do \
314 relfile=`echo "$$file" | sed 's|^.*/||'`; \
315 ## DJGPP-style info files. See comment in install-info-am.
316 relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
317 (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \
318 echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
319 rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
325 @list='$(PDFS)'; for p in $$list; do \
327 echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
328 rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
333 @list='$(PSS)'; for p in $$list; do \
335 echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
336 rm -f "$(DESTDIR)$(psdir)/$$f"; \
342 dist-info: $(INFO_DEPS)
343 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
344 list='$(INFO_DEPS)'; \
345 for base in $$list; do \
346 ## Strip possible $(srcdir) prefix.
348 $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
350 if test -f $$base; then d=.; else d=$(srcdir); fi; \
351 base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
352 for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
353 if test -f $$file; then \
354 ## Strip leading '$$d/'.
355 relfile=`expr "$$file" : "$$d/\(.*\)"`; \
356 test -f "$(distdir)/$$relfile" || \
357 cp -p $$file "$(distdir)/$$relfile"; \
368 ## The funny name is due to --cygnus influence; in Cygnus mode,
369 ## `clean-info' is a target that users can use.
372 .PHONY mostlyclean-am: mostlyclean-aminfo
373 .PHONY: mostlyclean-aminfo
375 ## Use `-rf', not just `-f', because %TEXICLEAN% also contains
376 ## any directory created by `makeinfo --html'.
379 .PHONY maintainer-clean-am: maintainer-clean-aminfo
380 maintainer-clean-aminfo:
381 @list='$(INFO_DEPS)'; for i in $$list; do \
382 ## .iNN files are DJGPP-style info files.
383 i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
384 echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
385 rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
388 ?CYGNUS?.PHONY: clean-info
389 ?CYGNUS?clean-info: mostlyclean-aminfo