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, 2009 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, 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)'; test -n "$(dvidir)" || list=; \
148 for p in $$list; do \
149 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
151 done | $(am__base_list) | \
152 while read files; do \
153 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
154 $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \
157 install-html-am: $(HTMLS)
159 test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
160 @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
161 for p in $$list; do \
162 if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
164 ## This indirection is required to work around a bug of the Solaris 10
165 ## shell /usr/xpg4/bin/sh. The description of the bug can be found at
166 ## <http://lists.gnu.org/archive/html/bug-autoconf/2011-11/msg00005.html>
167 ## and the report of the original failure can be found at automake
168 ## bug#10026 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10026#23>
170 if test -d "$$d2"; then \
171 echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
172 $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
173 echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \
174 $(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
176 list2="$$list2 $$d2"; \
179 test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
180 while read files; do \
181 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
182 $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
185 install-info-am: $(INFO_DEPS)
187 test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)"
188 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
189 list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
190 for file in $$list; do \
191 ## Strip possible $(srcdir) prefix.
193 $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
195 if test -f $$file; then d=.; else d=$(srcdir); fi; \
196 ## 8+3 filesystems cannot deal with foo.info-N filenames: they all
197 ## conflict. DJGPP comes with a tool, DJTAR, that will rename these
198 ## files to foo.iNN while extracting the archive. DJGPP's makeinfo
199 ## is patched to grok these filenames. However we have to account
200 ## for the renaming when installing the info files.
202 ## If $file == foo.info, then $file_i == foo.i. The reason we use two
203 ## shell commands instead of one ('s|\.info$$|.i|') is so that a suffix-less
204 ## `foo' becomes `foo.i' too.
205 file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
206 for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
207 $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
208 if test -f $$ifile; then \
212 done | $(am__base_list) | \
213 while read files; do \
214 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
215 $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
217 ## Only run this code if install-info actually exists, and if the user
218 ## doesn't request it not to be run (through the `AM_UPDATE_INFO_DIR'
219 ## environment variable). See automake bug#9773 and Debian Bug#543992.
220 @am__run_installinfo=yes; \
221 case $$AM_UPDATE_INFO_DIR in \
222 n|no|NO) am__run_installinfo=no;; \
223 *) (install-info --version) >/dev/null 2>&1 \
224 || am__run_installinfo=no;; \
226 if test $$am__run_installinfo = yes; then \
227 list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
228 for file in $$list; do \
230 relfile=`echo "$$file" | sed 's|^.*/||'`; \
231 ## Run `:' after install-info in case install-info fails. We really
232 ## don't care about failures here, because they can be spurious. For
233 ## instance if you don't have a dir file, install-info will fail. I
234 ## think instead it should create a new dir file for you. This bug
235 ## causes the `make distcheck' target to fail reliably.
236 echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
237 ## Use `|| :' here because Sun make passes -e to sh; if install-info
238 ## fails then we'd fail if we used `;'.
239 install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
243 install-pdf-am: $(PDFS)
245 test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
246 @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
247 for p in $$list; do \
248 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
250 done | $(am__base_list) | \
251 while read files; do \
252 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \
253 $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done
255 install-ps-am: $(PSS)
257 test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)"
258 @list='$(PSS)'; test -n "$(psdir)" || list=; \
259 for p in $$list; do \
260 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
262 done | $(am__base_list) | \
263 while read files; do \
264 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \
265 $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done
267 else ! %?LOCAL-TEXIS%
273 endif ! %?LOCAL-TEXIS%
281 .PHONY uninstall-am: \
290 @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
291 for p in $$list; do \
293 echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
294 rm -f "$(DESTDIR)$(dvidir)/$$f"; \
299 @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \
300 for p in $$list; do \
302 ## $f can be a directory, hence the -r.
303 echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
304 rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
309 ## Run two loops here so that we can handle PRE_UNINSTALL and
310 ## NORMAL_UNINSTALL correctly.
311 @if test -d '$(DESTDIR)$(infodir)' && \
312 (install-info --version && \
313 install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
314 list='$(INFO_DEPS)'; \
315 for file in $$list; do \
316 relfile=`echo "$$file" | sed 's|^.*/||'`; \
317 ## install-info needs the actual info file. We use the installed one,
318 ## rather than relying on one still being in srcdir or builddir.
319 ## However, `make uninstall && make uninstall' should not fail,
320 ## so we ignore failure if the file did not exist.
321 echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
322 if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
323 then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \
327 @list='$(INFO_DEPS)'; \
328 for file in $$list; do \
329 relfile=`echo "$$file" | sed 's|^.*/||'`; \
330 ## DJGPP-style info files. See comment in install-info-am.
331 relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
332 (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \
333 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]"; \
334 rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
340 @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
341 for p in $$list; do \
343 echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
344 rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
349 @list='$(PSS)'; test -n "$(psdir)" || list=; \
350 for p in $$list; do \
352 echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
353 rm -f "$(DESTDIR)$(psdir)/$$f"; \
359 dist-info: $(INFO_DEPS)
360 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
361 list='$(INFO_DEPS)'; \
362 for base in $$list; do \
363 ## Strip possible $(srcdir) prefix.
365 $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
367 if test -f $$base; then d=.; else d=$(srcdir); fi; \
368 base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
369 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 \
370 if test -f $$file; then \
371 ## Strip leading '$$d/'.
372 relfile=`expr "$$file" : "$$d/\(.*\)"`; \
373 test -f "$(distdir)/$$relfile" || \
374 cp -p $$file "$(distdir)/$$relfile"; \
385 ## The funny name is due to --cygnus influence; in Cygnus mode,
386 ## `clean-info' is a target that users can use.
389 .PHONY mostlyclean-am: mostlyclean-aminfo
390 .PHONY: mostlyclean-aminfo
392 ## Use `-rf', not just `-f', because the %*CLEAN% substitutions can also
393 ## contain any directory created by `makeinfo --html'.
394 -rm -rf %MOSTLYCLEAN%
396 .PHONY clean-am: clean-aminfo
398 ## Use `-rf', not just `-f', because the %*CLEAN% substitutions can also
399 ## contain any directory created by `makeinfo --html'.
400 ?TEXICLEAN? -test -z "%TEXICLEAN%" \
401 ?TEXICLEAN? || rm -rf %TEXICLEAN%
403 .PHONY maintainer-clean-am: maintainer-clean-aminfo
404 maintainer-clean-aminfo:
405 @list='$(INFO_DEPS)'; for i in $$list; do \
406 ## .iNN files are DJGPP-style info files.
407 i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
408 echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
409 rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
411 ## Use `-rf', not just `-f', because the %*CLEAN% substitutions can also
412 ## contain any directory created by `makeinfo --html'.
413 ?MAINTCLEAN? -test -z "%MAINTCLEAN%" \
414 ?MAINTCLEAN? || rm -rf %MAINTCLEAN%
416 ?CYGNUS?.PHONY: clean-info
417 ?CYGNUS?clean-info: mostlyclean-aminfo clean-aminfo