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 3, 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 if test -d "$$d$$p"; then \
165 echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
166 $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
167 echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
168 $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
170 list2="$$list2 $$d$$p"; \
173 test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
174 while read files; do \
175 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
176 $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
179 install-info-am: $(INFO_DEPS)
181 test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)"
182 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
183 list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
184 for file in $$list; do \
185 ## Strip possible $(srcdir) prefix.
187 $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
189 if test -f $$file; then d=.; else d=$(srcdir); fi; \
190 ## 8+3 filesystems cannot deal with foo.info-N filenames: they all
191 ## conflict. DJGPP comes with a tool, DJTAR, that will rename these
192 ## files to foo.iNN while extracting the archive. DJGPP's makeinfo
193 ## is patched to grok these filenames. However we have to account
194 ## for the renaming when installing the info files.
196 ## If $file == foo.info, then $file_i == foo.i. The reason we use two
197 ## shell commands instead of one ('s|\.info$$|.i|') is so that a suffix-less
198 ## `foo' becomes `foo.i' too.
199 file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
200 for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
201 $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
202 if test -f $$ifile; then \
206 done | $(am__base_list) | \
207 while read files; do \
208 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
209 $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
211 ## Only run this code if install-info actually exists, and it is not
212 ## the Debian install-info. FIXME: once Debian install-info goes
213 ## away, we can remove this hack. Some versions of Debian install-info
214 ## print their version on stderr (e.g. 1.8.3), other do it in
215 ## on stdout (e.g. 1.10.15).
218 ## install-info --version 2>&1 | sed 1q | grep -v -i debian
219 ## as if install-info does not exist, grep -v will be happy, and
220 ## therefore the code will be triggered although install-info is missing.
221 @if (install-info --version && \
222 install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
223 list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
224 for file in $$list; do \
226 relfile=`echo "$$file" | sed 's|^.*/||'`; \
227 ## Run `:' after install-info in case install-info fails. We really
228 ## don't care about failures here, because they can be spurious. For
229 ## instance if you don't have a dir file, install-info will fail. I
230 ## think instead it should create a new dir file for you. This bug
231 ## causes the `make distcheck' target to fail reliably.
232 echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
233 ## Use `|| :' here because Sun make passes -e to sh; if install-info
234 ## fails then we'd fail if we used `;'.
235 install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
239 install-pdf-am: $(PDFS)
241 test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
242 @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
243 for p in $$list; do \
244 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
246 done | $(am__base_list) | \
247 while read files; do \
248 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \
249 $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done
251 install-ps-am: $(PSS)
253 test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)"
254 @list='$(PSS)'; test -n "$(psdir)" || list=; \
255 for p in $$list; do \
256 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
258 done | $(am__base_list) | \
259 while read files; do \
260 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \
261 $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done
263 else ! %?LOCAL-TEXIS%
269 endif ! %?LOCAL-TEXIS%
277 .PHONY uninstall-am: \
286 @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
287 for p in $$list; do \
289 echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
290 rm -f "$(DESTDIR)$(dvidir)/$$f"; \
295 @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \
296 for p in $$list; do \
298 ## $f can be a directory, hence the -r.
299 echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
300 rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
305 ## Run two loops here so that we can handle PRE_UNINSTALL and
306 ## NORMAL_UNINSTALL correctly.
307 @if test -d '$(DESTDIR)$(infodir)' && \
308 (install-info --version && \
309 install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; 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'.
390 -rm -rf %MOSTLYCLEAN%
392 .PHONY clean-am: clean-aminfo
394 ## Use `-rf', not just `-f', because the %*CLEAN% substitutions can also
395 ## contain any directory created by `makeinfo --html'.
396 ?TEXICLEAN? -test -z "%TEXICLEAN%" \
397 ?TEXICLEAN? || rm -rf %TEXICLEAN%
399 .PHONY maintainer-clean-am: maintainer-clean-aminfo
400 maintainer-clean-aminfo:
401 @list='$(INFO_DEPS)'; for i in $$list; do \
402 ## .iNN files are DJGPP-style info files.
403 i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
404 echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
405 rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
407 ## Use `-rf', not just `-f', because the %*CLEAN% substitutions can also
408 ## contain any directory created by `makeinfo --html'.
409 ?MAINTCLEAN? -test -z "%MAINTCLEAN%" \
410 ?MAINTCLEAN? || rm -rf %MAINTCLEAN%
412 ?CYGNUS?.PHONY: clean-info
413 ?CYGNUS?clean-info: mostlyclean-aminfo clean-aminfo