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