1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 1994-2024 Free Software Foundation, Inc.
4 ## This program is free software; you can redistribute it and/or modify
5 ## it under the terms of the GNU General Public License as published by
6 ## the Free Software Foundation; either version 2, or (at your option)
9 ## This program is distributed in the hope that it will be useful,
10 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ## GNU General Public License for more details.
14 ## You should have received a copy of the GNU General Public License
15 ## along with this program. If not, see <https://www.gnu.org/licenses/>.
18 ?GENERIC_INFO?%SOURCE_SUFFIX%%DEST_SUFFIX%:
19 ?!GENERIC_INFO?%DEST_INFO_PREFIX%%DEST_SUFFIX%: %SOURCE_INFO% %DEPS%
20 ## It is wrong to have 'info' files dependent on %DIRSTAMP%, because
21 ## 'info' files are distributed and %DIRSTAMP% isn't: a distributed file
22 ## should never be dependent upon a non-distributed built file.
23 ## Therefore we ensure that %DIRSTAMP% exists in the rule.
24 ?!INSRC??DIRSTAMP? @test -f %DIRSTAMP% || $(MAKE) $(AM_MAKEFLAGS) %DIRSTAMP%
25 ## Back up the info files before running makeinfo. This is the cheapest
27 ## 1) If the texinfo file shrinks (or if you start using --no-split),
28 ## you'll not be left with some dead info files lying around -- dead
29 ## files which would end up in the distribution.
30 ## 2) If the texinfo file has some minor mistakes which cause makeinfo
31 ## to fail, the info files are not removed. (They are needed by the
32 ## developer while he writes documentation.)
33 ## *.iNN files are used on DJGPP. See the comments in install-info-am
34 %AM_V_MAKEINFO%restore=: && backupdir="$(am__leading_dot)am$$$$" && \
35 ?INSRC? am__cwd=`pwd` && $(am__cd) $(srcdir) && \
36 rm -rf $$backupdir && mkdir $$backupdir && \
37 ## If makeinfo is not installed we must not backup the files so
38 ## 'missing' can do its job and touch $@ if it exists.
39 if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
40 for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
41 if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
44 ?INSRC? cd "$$am__cwd"; \
45 if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS% \
46 ?!INSRC? -o $@ `test -f '%SOURCE_INFO%' || echo '$(srcdir)/'`%SOURCE_INFO%; \
47 ?INSRC??!GENERIC_INFO? -o $@ $(srcdir)/%SOURCE_INFO%; \
48 ?INSRC??GENERIC_INFO? -o $@ $<; \
51 ?INSRC? $(am__cd) $(srcdir); \
54 ## Beware that backup info files might come from a subdirectory.
55 ?INSRC? $(am__cd) $(srcdir) && \
56 $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
58 rm -rf $$backupdir; exit $$rc
60 INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
62 ?GENERIC?%SOURCE_SUFFIX%.dvi:
63 ?!GENERIC?%DEST_PREFIX%.dvi: %SOURCE% %DEPS% %DIRSTAMP%
64 %AM_V_TEXI2DVI%TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
65 ## Must set MAKEINFO like this so that version.texi will be found even
66 ## if it is in srcdir (-I $(srcdir) is set in %MAKEINFOFLAGS%), and in case
67 ## texi2dvi automatically falls back to using makeinfo for expanding (-E).
68 ## If texi2dvi doesn't fall back, we also pass %MAKEINFOFLAGS% directly below.
69 MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS%' \
70 ## texi2dvi doesn't silence everything with -q, redirect to /dev/null instead.
71 ## We still want -q (%TEXIQUIET%) because it turns on batch mode.
72 ## Use '--build-dir' so that TeX and Texinfo auxiliary files and build
73 ## by-products are left in there, instead of cluttering the current
74 ## directory (see automake bug#11146). Use a different build-dir for
75 ## each file (and distinct from that of the corresponding PDF file) to
76 ## avoid hitting a Texinfo bug that could cause low-probability racy
77 ## failure when doing parallel builds; see:
78 ## https://lists.gnu.org/archive/html/automake-patches/2012-06/msg00073.html
79 $(TEXI2DVI) $(AM_TEXI2FLAGS) %MAKEINFOFLAGS% %TEXIQUIET% --build-dir=$(@:.dvi=.t2d) -o $@ %TEXIDEVNULL% \
81 ?!GENERIC? `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
83 ?GENERIC?%SOURCE_SUFFIX%.pdf:
84 ?!GENERIC?%DEST_PREFIX%.pdf: %SOURCE% %DEPS% %DIRSTAMP%
85 %AM_V_TEXI2PDF%TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
86 ## Must set MAKEINFO like this so that version.texi will be found even
87 ## if it is in srcdir (-I $(srcdir) is set in %MAKEINFOFLAGS%), and in case
88 ## texi2dvi automatically falls back to using makeinfo for expanding (-E).
89 ## If texi2dvi doesn't fall back, we also pass %MAKEINFOFLAGS% directly below.
90 MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS%' \
91 ## texi2pdf doesn't silence everything with -q, redirect to /dev/null instead.
92 ## We still want -q (%TEXIQUIET%) because it turns on batch mode.
93 ## Use '--build-dir' so that TeX and Texinfo auxiliary files and build
94 ## by-products are left in there, instead of cluttering the current
95 ## directory (see automake bug#11146). Use a different build-dir for
96 ## each file (and distinct from that of the corresponding DVI file) to
97 ## avoid hitting a Texinfo bug that could cause low-probability racy
98 ## failure when doing parallel builds; see:
99 ## https://lists.gnu.org/archive/html/automake-patches/2012-06/msg00073.html
100 $(TEXI2PDF) $(AM_TEXI2FLAGS) %MAKEINFOFLAGS% %TEXIQUIET% --build-dir=$(@:.pdf=.t2p) -o $@ %TEXIDEVNULL% \
102 ?!GENERIC? `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
104 ?GENERIC?%SOURCE_SUFFIX%.html:
105 ?!GENERIC?%DEST_PREFIX%.html: %SOURCE% %DEPS% %DIRSTAMP%
106 ## When --split (the default) is used, makeinfo will output a
107 ## directory. However it will not update the time stamp of a
108 ## previously existing directory, and when the names of the nodes
109 ## in the manual change, it may leave unused pages. Our fix
110 ## is to build under a temporary name, and replace the target on
112 %AM_V_MAKEINFO%rm -rf $(@:.html=.htp)
113 %SILENT%if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS% \
114 ?GENERIC? -o $(@:.html=.htp) %SOURCE%; \
115 ?!GENERIC? -o $(@:.html=.htp) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%; \
117 rm -rf $@ && mv $(@:.html=.htp) $@; \
119 rm -rf $(@:.html=.htp); exit 1; \
122 ## If we are using the generic rules, we need separate dependencies.
123 ## (Don't wonder about %DIRSTAMP% here, this is used only by non-generic
126 %DEST_INFO_PREFIX%%DEST_SUFFIX%: %SOURCE_REAL% %DEPS%
127 endif %?GENERIC_INFO%
129 %DEST_PREFIX%.dvi: %SOURCE_REAL% %DEPS%
130 %DEST_PREFIX%.pdf: %SOURCE_REAL% %DEPS%
131 %DEST_PREFIX%.html: %SOURCE_REAL% %DEPS%