1 ## automake - create Makefile.in from Makefile.am
3 ## Copyright (C) 1994-2024 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 <https://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.
82 am__can_run_installinfo = \
83 case $$AM_UPDATE_INFO_DIR in \
85 *) (install-info --version) >/dev/null 2>&1;; \
88 ## Look in both . and srcdir because the info pages might have been
89 ## rebuilt in the build directory. Can't cd to srcdir; that might
90 ## break a possible install-sh reference.
92 ## Funny name due to --cygnus influence; we want to reserve
93 ## 'install-info' for the user.
95 ## TEXINFOS primary are always installed in infodir, hence install-data
99 am__installdirs += "$(DESTDIR)$(infodir)"
100 install-data-am: install-info-am
102 endif %?INSTALL-INFO%
104 install-dvi install-dvi-am \
105 install-html install-html-am \
106 install-info install-info-am \
107 install-pdf install-pdf-am \
108 install-ps install-ps-am
111 RECURSIVE_TARGETS += \
112 install-dvi-recursive \
113 install-html-recursive \
114 install-info-recursive \
115 install-pdf-recursive \
117 install-dvi: install-dvi-recursive
118 install-html: install-html-recursive
119 install-info: install-info-recursive
120 install-pdf: install-pdf-recursive
121 install-ps: install-ps-recursive
123 install-dvi: install-dvi-am
124 install-html: install-html-am
125 install-info: install-info-am
126 install-pdf: install-pdf-am
127 install-ps: install-ps-am
134 install-dvi-am: $(DVIS)
136 @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
137 if test -n "$$list"; then \
138 echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \
139 $(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \
141 for p in $$list; do \
142 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
144 done | $(am__base_list) | \
145 while read files; do \
146 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
147 $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \
150 install-html-am: $(HTMLS)
152 @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
153 if test -n "$$list"; then \
154 echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
155 $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
157 for p in $$list; do \
158 if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
160 ## This indirection is required to work around a bug of the Solaris 10
161 ## shell /usr/xpg4/bin/sh. The description of the bug can be found at
162 ## <https://lists.gnu.org/archive/html/bug-autoconf/2011-11/msg00005.html>
163 ## and the report of the original failure can be found at automake
164 ## bug#10026 <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=10026#23>
166 if test -d "$$d2"; then \
167 echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
168 $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
169 echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \
170 $(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
172 list2="$$list2 $$d2"; \
175 test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
176 while read files; do \
177 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
178 $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
181 install-info-am: $(INFO_DEPS)
183 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
184 list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
185 if test -n "$$list"; then \
186 echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \
187 $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \
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 @if $(am__can_run_installinfo); then \
217 list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
218 for file in $$list; do \
220 relfile=`echo "$$file" | sed 's|^.*/||'`; \
221 ## Run ":" after install-info in case install-info fails. We really
222 ## don't care about failures here, because they can be spurious. For
223 ## instance if you don't have a dir file, install-info will fail. I
224 ## think instead it should create a new dir file for you. This bug
225 ## causes the "make distcheck" target to fail reliably.
226 echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
227 ## Use "|| :" here because Sun make passes -e to sh; if install-info
228 ## fails then we'd fail if we used ";".
229 install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
233 install-pdf-am: $(PDFS)
235 @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
236 if test -n "$$list"; then \
237 echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \
238 $(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \
240 for p in $$list; do \
241 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
243 done | $(am__base_list) | \
244 while read files; do \
245 echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \
246 $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done
248 install-ps-am: $(PSS)
250 @list='$(PSS)'; test -n "$(psdir)" || list=; \
251 if test -n "$$list"; then \
252 echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \
253 $(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \
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)' && $(am__can_run_installinfo); then \
308 list='$(INFO_DEPS)'; \
309 for file in $$list; do \
310 relfile=`echo "$$file" | sed 's|^.*/||'`; \
311 ## install-info needs the actual info file. We use the installed one,
312 ## rather than relying on one still being in srcdir or builddir.
313 ## However, "make uninstall && make uninstall" should not fail,
314 ## so we ignore failure if the file did not exist.
315 echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
316 if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
317 then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \
321 @list='$(INFO_DEPS)'; \
322 for file in $$list; do \
323 relfile=`echo "$$file" | sed 's|^.*/||'`; \
324 ## DJGPP-style info files. See comment in install-info-am.
325 relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
326 (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \
327 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]"; \
328 rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
334 @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
335 for p in $$list; do \
337 echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
338 rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
343 @list='$(PSS)'; test -n "$(psdir)" || list=; \
344 for p in $$list; do \
346 echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
347 rm -f "$(DESTDIR)$(psdir)/$$f"; \
353 dist-info: $(INFO_DEPS)
354 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
355 list='$(INFO_DEPS)'; \
356 for base in $$list; do \
357 ## Strip possible $(srcdir) prefix.
359 $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
361 if test -f $$base; then d=.; else d=$(srcdir); fi; \
362 base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
363 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 \
364 if test -f $$file; then \
365 ## Strip leading '$$d/'.
366 relfile=`expr "$$file" : "$$d/\(.*\)"`; \
367 test -f "$(distdir)/$$relfile" || \
368 cp -p $$file "$(distdir)/$$relfile"; \
379 ## The funny name is due to --cygnus influence; in Cygnus mode,
380 ## 'clean-info' is a target that users can use.
383 .PHONY mostlyclean-am: mostlyclean-aminfo
384 .PHONY: mostlyclean-aminfo
386 ## Use '-rf', not just '-f', because the %*CLEAN% substitutions can also
387 ## contain any directory created by "makeinfo --html", as well as the
388 ## '*.t2d' and '*.t2p' directories used by texi2dvi and texi2pdf.
389 -$(am__rm_rf) %MOSTLYCLEAN%
391 .PHONY clean-am: clean-aminfo
393 ## Use '-rf', not just '-f'; see comments in 'mostlyclean-aminfo'
394 ## above for details.
395 ?TEXICLEAN? -$(am__rm_rf) %TEXICLEAN%
397 .PHONY maintainer-clean-am: maintainer-clean-aminfo
398 maintainer-clean-aminfo:
399 @list='$(INFO_DEPS)'; for i in $$list; do \
400 ## .iNN files are DJGPP-style info files.
401 i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
402 echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
403 rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
405 ## Use '-rf', not just '-f'; see comments in 'mostlyclean-aminfo'
406 ## above for details.
407 ?MAINTCLEAN? -$(am__rm_rf) %MAINTCLEAN%