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/>.
24 TEXI2PDF = $(TEXI2DVI) --pdf --batch
25 MAKEINFOHTML = $(MAKEINFO) --html
26 AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
34 ## The way to make PostScript, for those who want it.
38 %AM_V_DVIPS%TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
39 $(DVIPS) %TEXIQUIET% -o $@ $<
42 .PHONY: dvi dvi-am html html-am info info-am pdf pdf-am ps ps-am
44 RECURSIVE_TARGETS += dvi-recursive html-recursive info-recursive
45 RECURSIVE_TARGETS += pdf-recursive ps-recursive
71 endif ! %?LOCAL-TEXIS%
78 ## Some code should be run only if install-info actually exists, and
79 ## if the user doesn't request it not to be run (through the
80 ## 'AM_UPDATE_INFO_DIR' environment variable). See automake bug#9773
81 ## and Debian Bug#543992.
83 am__can_run_installinfo = \
84 case $$AM_UPDATE_INFO_DIR in \
86 *) (install-info --version) >/dev/null 2>&1;; \
90 ## Look in both . and srcdir because the info pages might have been
91 ## rebuilt in the build directory. Can't cd to srcdir; that might
92 ## break a possible install-sh reference.
94 ## Funny name due to --cygnus influence; we want to reserve
95 ## 'install-info' for the user.
97 ## TEXINFOS primary are always installed in infodir, hence install-data
101 am__installdirs += "$(DESTDIR)$(infodir)"
102 install-data-am: install-info-am
104 endif %?INSTALL-INFO%
106 install-dvi install-dvi-am \
107 install-html install-html-am \
108 install-info install-info-am \
109 install-pdf install-pdf-am \
110 install-ps install-ps-am
113 RECURSIVE_TARGETS += \
114 install-dvi-recursive \
115 install-html-recursive \
116 install-info-recursive \
117 install-pdf-recursive \
119 install-dvi: install-dvi-recursive
120 install-html: install-html-recursive
121 install-info: install-info-recursive
122 install-pdf: install-pdf-recursive
123 install-ps: install-ps-recursive
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
136 install-dvi-am: $(DVIS)
138 @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
139 if test -n "$$list"; then \
140 echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \
141 $(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \
143 for p in $$list; do \
144 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
146 done | $(am__base_list) | \
147 while read files; do \
148 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
149 $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \
152 install-html-am: $(HTMLS)
154 @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
155 if test -n "$$list"; then \
156 echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
157 $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
159 for p in $$list; do \
160 if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
162 ## This indirection is required to work around a bug of the Solaris 10
163 ## shell /usr/xpg4/bin/sh. The description of the bug can be found at
164 ## <http://lists.gnu.org/archive/html/bug-autoconf/2011-11/msg00005.html>
165 ## and the report of the original failure can be found at automake
166 ## bug#10026 <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10026#23>
168 if test -d "$$d2"; then \
169 echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
170 $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
171 echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \
172 $(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
174 list2="$$list2 $$d2"; \
177 test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
178 while read files; do \
179 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
180 $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
183 install-info-am: $(INFO_DEPS)
185 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
186 list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
187 if test -n "$$list"; then \
188 echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \
189 $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \
191 for file in $$list; do \
192 ## Strip possible $(srcdir) prefix.
194 $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
196 if test -f $$file; then d=.; else d=$(srcdir); fi; \
197 ## 8+3 filesystems cannot deal with foo.info-N filenames: they all
198 ## conflict. DJGPP comes with a tool, DJTAR, that will rename these
199 ## files to foo.iNN while extracting the archive. DJGPP's makeinfo
200 ## is patched to grok these filenames. However we have to account
201 ## for the renaming when installing the info files.
203 ## If $file == foo.info, then $file_i == foo.i. The reason we use two
204 ## shell commands instead of one ('s|\.info$$|.i|') is so that a suffix-less
205 ## 'foo' becomes 'foo.i' too.
206 file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
207 for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
208 $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
209 if test -f $$ifile; then \
213 done | $(am__base_list) | \
214 while read files; do \
215 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
216 $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
218 @if $(am__can_run_installinfo); then \
219 list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
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 @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
238 if test -n "$$list"; then \
239 echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \
240 $(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \
242 for p in $$list; do \
243 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
245 done | $(am__base_list) | \
246 while read files; do \
247 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \
248 $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done
250 install-ps-am: $(PSS)
252 @list='$(PSS)'; test -n "$(psdir)" || list=; \
253 if test -n "$$list"; then \
254 echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \
255 $(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \
257 for p in $$list; do \
258 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
260 done | $(am__base_list) | \
261 while read files; do \
262 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \
263 $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done
265 else ! %?LOCAL-TEXIS%
271 endif ! %?LOCAL-TEXIS%
279 .PHONY uninstall-am: \
288 @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
289 for p in $$list; do \
291 echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
292 rm -f "$(DESTDIR)$(dvidir)/$$f"; \
297 @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \
298 for p in $$list; do \
300 ## $f can be a directory, hence the -r.
301 echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
302 rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
307 ## Run two loops here so that we can handle PRE_UNINSTALL and
308 ## NORMAL_UNINSTALL correctly.
309 @if test -d '$(DESTDIR)$(infodir)' && $(am__can_run_installinfo); then \
310 list='$(INFO_DEPS)'; \
311 for file in $$list; do \
312 relfile=`echo "$$file" | sed 's|^.*/||'`; \
313 ## install-info needs the actual info file. We use the installed one,
314 ## rather than relying on one still being in srcdir or builddir.
315 ## However, "make uninstall && make uninstall" should not fail,
316 ## so we ignore failure if the file did not exist.
317 echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
318 if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
319 then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \
323 @list='$(INFO_DEPS)'; \
324 for file in $$list; do \
325 relfile=`echo "$$file" | sed 's|^.*/||'`; \
326 ## DJGPP-style info files. See comment in install-info-am.
327 relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
328 (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \
329 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]"; \
330 rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
336 @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
337 for p in $$list; do \
339 echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
340 rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
345 @list='$(PSS)'; test -n "$(psdir)" || list=; \
346 for p in $$list; do \
348 echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
349 rm -f "$(DESTDIR)$(psdir)/$$f"; \
355 dist-info: $(INFO_DEPS)
356 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
357 list='$(INFO_DEPS)'; \
358 for base in $$list; do \
359 ## Strip possible $(srcdir) prefix.
361 $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
363 if test -f $$base; then d=.; else d=$(srcdir); fi; \
364 base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
365 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 \
366 if test -f $$file; then \
367 ## Strip leading '$$d/'.
368 relfile=`expr "$$file" : "$$d/\(.*\)"`; \
369 test -f "$(distdir)/$$relfile" || \
370 cp -p $$file "$(distdir)/$$relfile"; \
381 ## The funny name is due to --cygnus influence; in Cygnus mode,
382 ## 'clean-info' is a target that users can use.
385 .PHONY mostlyclean-am: mostlyclean-aminfo
386 .PHONY: mostlyclean-aminfo
388 ## Use '-rf', not just '-f', because the %*CLEAN% substitutions can also
389 ## contain any directory created by "makeinfo --html", as well as the
390 ## '*.t2d' and '*.t2p' directories used by texi2dvi and texi2pdf.
391 -rm -rf %MOSTLYCLEAN%
393 .PHONY clean-am: clean-aminfo
395 ## Use '-rf', not just '-f'; see comments in 'mostlyclean-aminfo'
396 ## above for details.
397 ?TEXICLEAN? -test -z "%TEXICLEAN%" \
398 ?TEXICLEAN? || rm -rf %TEXICLEAN%
400 .PHONY maintainer-clean-am: maintainer-clean-aminfo
401 maintainer-clean-aminfo:
402 @list='$(INFO_DEPS)'; for i in $$list; do \
403 ## .iNN files are DJGPP-style info files.
404 i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
405 echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
406 rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
408 ## Use '-rf', not just '-f'; see comments in 'mostlyclean-aminfo'
409 ## above for details.
410 ?MAINTCLEAN? -test -z "%MAINTCLEAN%" \
411 ?MAINTCLEAN? || rm -rf %MAINTCLEAN%