1 ## automake - create Makefile.in from Makefile.am
3 ## Copyright (C) 1994-2012 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, see <http://www.gnu.org/licenses/>.
28 ## Find these programs wherever they may lie. Yes, this has
29 ## intimate knowledge of the structure of the texinfo distribution.
30 MAKEINFO = `if test -f $(top_builddir)/../texinfo/makeinfo/makeinfo; then \
31 echo $(top_builddir)/../texinfo/makeinfo/makeinfo; \
36 TEXI2DVI = `if test -f $(top_srcdir)/../texinfo/util/texi2dvi; then \
37 echo $(top_srcdir)/../texinfo/util/texi2dvi; \
43 TEXI2PDF = $(TEXI2DVI) --pdf --batch
44 MAKEINFOHTML = $(MAKEINFO) --html
45 AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
53 ## The way to make PostScript, for those who want it.
57 TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
61 .PHONY: dvi dvi-am html html-am info info-am pdf pdf-am ps ps-am
63 RECURSIVE_TARGETS += dvi-recursive html-recursive info-recursive
64 RECURSIVE_TARGETS += pdf-recursive ps-recursive
90 endif ! %?LOCAL-TEXIS%
97 ## Look in both . and srcdir because the info pages might have been
98 ## rebuilt in the build directory. Can't cd to srcdir; that might
99 ## break a possible install-sh reference.
101 ## Funny name due to --cygnus influence; we want to reserve
102 ## `install-info' for the user.
104 ## TEXINFOS primary are always installed in infodir, hence install-data
108 am__installdirs += "$(DESTDIR)$(infodir)"
109 install-data-am: install-info-am
111 endif %?INSTALL-INFO%
113 install-dvi install-dvi-am \
114 install-html install-html-am \
115 install-info install-info-am \
116 install-pdf install-pdf-am \
117 install-ps install-ps-am
120 RECURSIVE_TARGETS += \
121 install-dvi-recursive \
122 install-html-recursive \
123 install-info-recursive \
124 install-pdf-recursive \
126 install-dvi: install-dvi-recursive
127 install-html: install-html-recursive
128 install-info: install-info-recursive
129 install-pdf: install-pdf-recursive
130 install-ps: install-ps-recursive
132 install-dvi: install-dvi-am
133 install-html: install-html-am
134 install-info: install-info-am
135 install-pdf: install-pdf-am
136 install-ps: install-ps-am
143 install-dvi-am: $(DVIS)
145 @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
146 if test -n "$$list"; then \
147 echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \
148 $(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \
150 for p in $$list; do \
151 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
153 done | $(am__base_list) | \
154 while read files; do \
155 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
156 $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \
159 install-html-am: $(HTMLS)
161 @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
162 if test -n "$$list"; then \
163 echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
164 $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
166 for p in $$list; do \
167 if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
169 ## This indirection is required to work around a bug of the Solaris 10
170 ## shell /usr/xpg4/bin/sh. The description of the bug can be found at
171 ## <http://lists.gnu.org/archive/html/bug-autoconf/2011-11/msg00005.html>
172 ## and the report of the original failure can be found at automake
173 ## bug#10026 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10026#23>
175 if test -d "$$d2"; then \
176 echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
177 $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
178 echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \
179 $(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
181 list2="$$list2 $$d2"; \
184 test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
185 while read files; do \
186 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
187 $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
190 install-info-am: $(INFO_DEPS)
192 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
193 list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
194 if test -n "$$list"; then \
195 echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \
196 $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \
198 for file in $$list; do \
199 ## Strip possible $(srcdir) prefix.
201 $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
203 if test -f $$file; then d=.; else d=$(srcdir); fi; \
204 ## 8+3 filesystems cannot deal with foo.info-N filenames: they all
205 ## conflict. DJGPP comes with a tool, DJTAR, that will rename these
206 ## files to foo.iNN while extracting the archive. DJGPP's makeinfo
207 ## is patched to grok these filenames. However we have to account
208 ## for the renaming when installing the info files.
210 ## If $file == foo.info, then $file_i == foo.i. The reason we use two
211 ## shell commands instead of one ('s|\.info$$|.i|') is so that a suffix-less
212 ## `foo' becomes `foo.i' too.
213 file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
214 for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
215 $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
216 if test -f $$ifile; then \
220 done | $(am__base_list) | \
221 while read files; do \
222 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
223 $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
225 ## Only run this code if install-info actually exists, and if the user
226 ## doesn't request it not to be run (through the `AM_UPDATE_INFO_DIR'
227 ## environment variable). See automake bug#9773 and Debian Bug#543992.
228 @am__run_installinfo=yes; \
229 case $$AM_UPDATE_INFO_DIR in \
230 n|no|NO) am__run_installinfo=no;; \
231 *) (install-info --version) >/dev/null 2>&1 \
232 || am__run_installinfo=no;; \
234 if test $$am__run_installinfo = yes; then \
235 list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
236 for file in $$list; do \
238 relfile=`echo "$$file" | sed 's|^.*/||'`; \
239 ## Run `:' after install-info in case install-info fails. We really
240 ## don't care about failures here, because they can be spurious. For
241 ## instance if you don't have a dir file, install-info will fail. I
242 ## think instead it should create a new dir file for you. This bug
243 ## causes the `make distcheck' target to fail reliably.
244 echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
245 ## Use `|| :' here because Sun make passes -e to sh; if install-info
246 ## fails then we'd fail if we used `;'.
247 install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
251 install-pdf-am: $(PDFS)
253 @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
254 if test -n "$$list"; then \
255 echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \
256 $(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \
258 for p in $$list; do \
259 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
261 done | $(am__base_list) | \
262 while read files; do \
263 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \
264 $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done
266 install-ps-am: $(PSS)
268 @list='$(PSS)'; test -n "$(psdir)" || list=; \
269 if test -n "$$list"; then \
270 echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \
271 $(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \
273 for p in $$list; do \
274 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
276 done | $(am__base_list) | \
277 while read files; do \
278 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \
279 $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done
281 else ! %?LOCAL-TEXIS%
287 endif ! %?LOCAL-TEXIS%
295 .PHONY uninstall-am: \
304 @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
305 for p in $$list; do \
307 echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
308 rm -f "$(DESTDIR)$(dvidir)/$$f"; \
313 @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \
314 for p in $$list; do \
316 ## $f can be a directory, hence the -r.
317 echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
318 rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
323 ## Run two loops here so that we can handle PRE_UNINSTALL and
324 ## NORMAL_UNINSTALL correctly.
325 @if test -d '$(DESTDIR)$(infodir)' && \
326 (install-info --version && \
327 install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
328 list='$(INFO_DEPS)'; \
329 for file in $$list; do \
330 relfile=`echo "$$file" | sed 's|^.*/||'`; \
331 ## install-info needs the actual info file. We use the installed one,
332 ## rather than relying on one still being in srcdir or builddir.
333 ## However, `make uninstall && make uninstall' should not fail,
334 ## so we ignore failure if the file did not exist.
335 echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
336 if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
337 then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \
341 @list='$(INFO_DEPS)'; \
342 for file in $$list; do \
343 relfile=`echo "$$file" | sed 's|^.*/||'`; \
344 ## DJGPP-style info files. See comment in install-info-am.
345 relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
346 (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \
347 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]"; \
348 rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
354 @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
355 for p in $$list; do \
357 echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
358 rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
363 @list='$(PSS)'; test -n "$(psdir)" || list=; \
364 for p in $$list; do \
366 echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
367 rm -f "$(DESTDIR)$(psdir)/$$f"; \
373 dist-info: $(INFO_DEPS)
374 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
375 list='$(INFO_DEPS)'; \
376 for base in $$list; do \
377 ## Strip possible $(srcdir) prefix.
379 $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
381 if test -f $$base; then d=.; else d=$(srcdir); fi; \
382 base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
383 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 \
384 if test -f $$file; then \
385 ## Strip leading '$$d/'.
386 relfile=`expr "$$file" : "$$d/\(.*\)"`; \
387 test -f "$(distdir)/$$relfile" || \
388 cp -p $$file "$(distdir)/$$relfile"; \
399 ## The funny name is due to --cygnus influence; in Cygnus mode,
400 ## `clean-info' is a target that users can use.
403 .PHONY mostlyclean-am: mostlyclean-aminfo
404 .PHONY: mostlyclean-aminfo
406 ## Use `-rf', not just `-f', because the %*CLEAN% substitutions can also
407 ## contain any directory created by `makeinfo --html'.
408 -rm -rf %MOSTLYCLEAN%
410 .PHONY clean-am: clean-aminfo
412 ## Use `-rf', not just `-f', because the %*CLEAN% substitutions can also
413 ## contain any directory created by `makeinfo --html'.
414 ?TEXICLEAN? -test -z "%TEXICLEAN%" \
415 ?TEXICLEAN? || rm -rf %TEXICLEAN%
417 .PHONY maintainer-clean-am: maintainer-clean-aminfo
418 maintainer-clean-aminfo:
419 @list='$(INFO_DEPS)'; for i in $$list; do \
420 ## .iNN files are DJGPP-style info files.
421 i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
422 echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
423 rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
425 ## Use `-rf', not just `-f', because the %*CLEAN% substitutions can also
426 ## contain any directory created by `makeinfo --html'.
427 ?MAINTCLEAN? -test -z "%MAINTCLEAN%" \
428 ?MAINTCLEAN? || rm -rf %MAINTCLEAN%
430 ?CYGNUS?.PHONY: clean-info
431 ?CYGNUS?clean-info: mostlyclean-aminfo clean-aminfo