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 %AM_V_DVIPS%TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
58 $(DVIPS) %TEXIQUIET% -o $@ $<
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 ## Some code should be run only if install-info actually exists, and
98 ## if the user doesn't request it not to be run (through the
99 ## 'AM_UPDATE_INFO_DIR' environment variable). See automake bug#9773
100 ## and Debian Bug#543992.
102 am__can_run_installinfo = \
103 case $$AM_UPDATE_INFO_DIR in \
105 *) (install-info --version) >/dev/null 2>&1;; \
109 ## Look in both . and srcdir because the info pages might have been
110 ## rebuilt in the build directory. Can't cd to srcdir; that might
111 ## break a possible install-sh reference.
113 ## Funny name due to --cygnus influence; we want to reserve
114 ## 'install-info' for the user.
116 ## TEXINFOS primary are always installed in infodir, hence install-data
120 am__installdirs += "$(DESTDIR)$(infodir)"
121 install-data-am: install-info-am
123 endif %?INSTALL-INFO%
125 install-dvi install-dvi-am \
126 install-html install-html-am \
127 install-info install-info-am \
128 install-pdf install-pdf-am \
129 install-ps install-ps-am
132 RECURSIVE_TARGETS += \
133 install-dvi-recursive \
134 install-html-recursive \
135 install-info-recursive \
136 install-pdf-recursive \
138 install-dvi: install-dvi-recursive
139 install-html: install-html-recursive
140 install-info: install-info-recursive
141 install-pdf: install-pdf-recursive
142 install-ps: install-ps-recursive
144 install-dvi: install-dvi-am
145 install-html: install-html-am
146 install-info: install-info-am
147 install-pdf: install-pdf-am
148 install-ps: install-ps-am
155 install-dvi-am: $(DVIS)
157 @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
158 if test -n "$$list"; then \
159 echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \
160 $(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \
162 for p in $$list; do \
163 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
165 done | $(am__base_list) | \
166 while read files; do \
167 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
168 $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \
171 install-html-am: $(HTMLS)
173 @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
174 if test -n "$$list"; then \
175 echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
176 $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
178 for p in $$list; do \
179 if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
181 ## This indirection is required to work around a bug of the Solaris 10
182 ## shell /usr/xpg4/bin/sh. The description of the bug can be found at
183 ## <http://lists.gnu.org/archive/html/bug-autoconf/2011-11/msg00005.html>
184 ## and the report of the original failure can be found at automake
185 ## bug#10026 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10026#23>
187 if test -d "$$d2"; then \
188 echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
189 $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
190 echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \
191 $(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
193 list2="$$list2 $$d2"; \
196 test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
197 while read files; do \
198 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
199 $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
202 install-info-am: $(INFO_DEPS)
204 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
205 list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
206 if test -n "$$list"; then \
207 echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \
208 $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \
210 for file in $$list; do \
211 ## Strip possible $(srcdir) prefix.
213 $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
215 if test -f $$file; then d=.; else d=$(srcdir); fi; \
216 ## 8+3 filesystems cannot deal with foo.info-N filenames: they all
217 ## conflict. DJGPP comes with a tool, DJTAR, that will rename these
218 ## files to foo.iNN while extracting the archive. DJGPP's makeinfo
219 ## is patched to grok these filenames. However we have to account
220 ## for the renaming when installing the info files.
222 ## If $file == foo.info, then $file_i == foo.i. The reason we use two
223 ## shell commands instead of one ('s|\.info$$|.i|') is so that a suffix-less
224 ## 'foo' becomes 'foo.i' too.
225 file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
226 for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
227 $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
228 if test -f $$ifile; then \
232 done | $(am__base_list) | \
233 while read files; do \
234 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
235 $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
237 @if $(am__can_run_installinfo); then \
238 list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
239 for file in $$list; do \
241 relfile=`echo "$$file" | sed 's|^.*/||'`; \
242 ## Run ":" after install-info in case install-info fails. We really
243 ## don't care about failures here, because they can be spurious. For
244 ## instance if you don't have a dir file, install-info will fail. I
245 ## think instead it should create a new dir file for you. This bug
246 ## causes the "make distcheck" target to fail reliably.
247 echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
248 ## Use "|| :" here because Sun make passes -e to sh; if install-info
249 ## fails then we'd fail if we used ";".
250 install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
254 install-pdf-am: $(PDFS)
256 @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
257 if test -n "$$list"; then \
258 echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \
259 $(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \
261 for p in $$list; do \
262 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
264 done | $(am__base_list) | \
265 while read files; do \
266 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \
267 $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done
269 install-ps-am: $(PSS)
271 @list='$(PSS)'; test -n "$(psdir)" || list=; \
272 if test -n "$$list"; then \
273 echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \
274 $(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \
276 for p in $$list; do \
277 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
279 done | $(am__base_list) | \
280 while read files; do \
281 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \
282 $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done
284 else ! %?LOCAL-TEXIS%
290 endif ! %?LOCAL-TEXIS%
298 .PHONY uninstall-am: \
307 @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
308 for p in $$list; do \
310 echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
311 rm -f "$(DESTDIR)$(dvidir)/$$f"; \
316 @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \
317 for p in $$list; do \
319 ## $f can be a directory, hence the -r.
320 echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
321 rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
326 ## Run two loops here so that we can handle PRE_UNINSTALL and
327 ## NORMAL_UNINSTALL correctly.
328 @if test -d '$(DESTDIR)$(infodir)' && $(am__can_run_installinfo); then \
329 list='$(INFO_DEPS)'; \
330 for file in $$list; do \
331 relfile=`echo "$$file" | sed 's|^.*/||'`; \
332 ## install-info needs the actual info file. We use the installed one,
333 ## rather than relying on one still being in srcdir or builddir.
334 ## However, "make uninstall && make uninstall" should not fail,
335 ## so we ignore failure if the file did not exist.
336 echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
337 if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
338 then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \
342 @list='$(INFO_DEPS)'; \
343 for file in $$list; do \
344 relfile=`echo "$$file" | sed 's|^.*/||'`; \
345 ## DJGPP-style info files. See comment in install-info-am.
346 relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
347 (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \
348 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]"; \
349 rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
355 @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
356 for p in $$list; do \
358 echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
359 rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
364 @list='$(PSS)'; test -n "$(psdir)" || list=; \
365 for p in $$list; do \
367 echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
368 rm -f "$(DESTDIR)$(psdir)/$$f"; \
374 dist-info: $(INFO_DEPS)
375 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
376 list='$(INFO_DEPS)'; \
377 for base in $$list; do \
378 ## Strip possible $(srcdir) prefix.
380 $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
382 if test -f $$base; then d=.; else d=$(srcdir); fi; \
383 base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
384 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 \
385 if test -f $$file; then \
386 ## Strip leading '$$d/'.
387 relfile=`expr "$$file" : "$$d/\(.*\)"`; \
388 test -f "$(distdir)/$$relfile" || \
389 cp -p $$file "$(distdir)/$$relfile"; \
400 ## The funny name is due to --cygnus influence; in Cygnus mode,
401 ## 'clean-info' is a target that users can use.
404 .PHONY mostlyclean-am: mostlyclean-aminfo
405 .PHONY: mostlyclean-aminfo
407 ## Use '-rf', not just '-f', because the %*CLEAN% substitutions can also
408 ## contain any directory created by "makeinfo --html".
409 -rm -rf %MOSTLYCLEAN%
411 .PHONY clean-am: clean-aminfo
413 ## Use '-rf', not just '-f', because the %*CLEAN% substitutions can also
414 ## contain any directory created by "makeinfo --html".
415 ?TEXICLEAN? -test -z "%TEXICLEAN%" \
416 ?TEXICLEAN? || rm -rf %TEXICLEAN%
418 .PHONY maintainer-clean-am: maintainer-clean-aminfo
419 maintainer-clean-aminfo:
420 @list='$(INFO_DEPS)'; for i in $$list; do \
421 ## .iNN files are DJGPP-style info files.
422 i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
423 echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
424 rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
426 ## Use '-rf', not just '-f', because the %*CLEAN% substitutions can also
427 ## contain any directory created by "makeinfo --html".
428 ?MAINTCLEAN? -test -z "%MAINTCLEAN%" \
429 ?MAINTCLEAN? || rm -rf %MAINTCLEAN%
431 ?CYGNUS?.PHONY: clean-info
432 ?CYGNUS?clean-info: mostlyclean-aminfo clean-aminfo