Debian Codegraph @

texk/web2c/am/texmf.am

raw ◀ ▶
1 Debian patch touch this file
1 ## $Id: texmf.am 73613 2025-01-27 22:01:50Z karl $
2 ## texk/web2c/am/texmf.am: Makefile fragment for TeX and MF.
3 ##
4 ## Copyright 2015-2025 Karl Berry <[email protected]>
5 ## Copyright 2009-2015 Peter Breitenlohner <[email protected]>
6 ## You may freely use, modify and/or distribute this file.
7
8 ## Common for MF and TeX
9 EXTRA_DIST += \
10 lib/mfmpi386.asm \
11 lib/mfmpw32.c \
12 lib/texmfmp.c \
13 texmfmem.h \
14 texmfmp-help.h \
15 texmfmp.h
16
17 ## TeX
18 ##
19 if TEX
20 bin_PROGRAMS += tex
21 if WIN32
22 bin_PROGRAMS += initex
23 else !WIN32
24 bin_links += tex$(EXEEXT):initex
25 endif !WIN32
26 endif TEX
27 EXTRA_PROGRAMS += tex
28
29 initex_CPPFLAGS = -DEXEPROG=\"tex.exe\"
30 nodist_initex_SOURCES = callexe.c
31 initex_LDADD =
32
33 tex_CPPFLAGS = $(AM_CPPFLAGS)
34
35 # With --enable-ipc, TeX may need to link with -lsocket.
36 tex_LDADD = $(LDADD) $(ipc_socketlibs)
37
38 # TeX C sources
39 tex_c_h = texini.c tex0.c texcoerce.h texd.h
40 nodist_tex_SOURCES = $(tex_c_h) tex-pool.c
41 dist_tex_SOURCES = texextra.c
42
43 # We must create texd.h before building the tex_OBJECTS.
44 tex_prereq = texd.h
45 $(tex_OBJECTS): $(tex_prereq)
46
47 $(tex_c_h): tex-web2c
48 @$(web2c) tex
49 tex-web2c: tex.p $(web2c_texmf)
50 @$(web2c) tex
51
52 tex-pool.c: tex.pool texd.h $(makecpool_stamp)
53 $(makecpool) tex >$@ || { rm -f $@; exit 1; }
54
55 # Tangling TeX
56 tex.p tex.pool: tex-tangle
57 $(texmf_tangle) tex tex-final
58 tex-tangle: tangle$(EXEEXT) tex.web tex-final.ch tangle-sh
59 $(texmf_tangle) tex tex-final
60
61 # Generate tex-final.ch
62 tex-final.ch: tie$(EXEEXT) $(tex_ch_srcs)
63 $(tie_c) $(tex_ch_srcs) || { rm -f $@; exit 1; }
64 tex_ch_srcs = \
65 tex.web \
66 tex.ch \
67 enctexdir/enctex1.ch \
68 enctexdir/enctex-tex.ch \
69 enctexdir/enctex2.ch \
70 $(tex_ch_synctex) \
71 tex-binpool.ch
72 ##
73 EXTRA_DIST += $(tex_ch_srcs)
74
75 DISTCLEANFILES += $(nodist_tex_SOURCES) tex-final.ch tex-web2c \
76 tex.p tex.pool tex-tangle
77
78 # TeX tests
79 #
80 tex_tests = triptest.test tests/outputdir.test tests/tex-closeout.test \
81 tests/write18-quote-test.pl
82 triptest.log: tex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
83 tests/outputdir.log tests/tex-closeout.log \
84 tests/write18-quote-test.log: tex$(EXEEXT)
85 EXTRA_DIST += $(tex_tests)
86 EXTRA_DIST += tests/write18-quote.tex
87 if TEX
88 TESTS += $(tex_tests)
89 TRIPTRAP += trip.diffs
90 TRIPTRAP_CLEAN += trip-clean
91 endif TEX
92 DISTCLEANFILES += trip.diffs
93
94 ## tests/write18-quote-test.pl
95 DISTCLEANFILES += write18-quote.log
96
97 ## triptest
98 trip.diffs: tex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
99 $(triptrap_diffs) $@
100 .PHONY: trip-clean
101 trip-clean:
102 rm -rf tripdir
103
104 ## Metafont
105 ##
106 if MF
107 bin_PROGRAMS += mf
108 if MFN
109 bin_PROGRAMS += mf-nowin
110 endif MFN
111 if WIN32
112 noinst_PROGRAMS += call_mf
113 install_exe_links += install-mf-links
114 uninstall_exe_links += uninstall-mf-links
115 else !WIN32
116 if !MFN
117 bin_links += mf$(EXEEXT):mf-nowin
118 endif !MFN
119 bin_links += mf$(EXEEXT):inimf
120 endif !WIN32
121 endif MF
122 EXTRA_PROGRAMS += mf mf-nowin
123 DISTCLEANFILES += mftrap.diffs
124
125 call_mf_CPPFLAGS = -DEXEPROG=\"mf.exe\"
126 nodist_call_mf_SOURCES = callexe.c
127 call_mf_LDADD =
128
129 .PHONY: install-mf-links uninstall-mf-links
130 if WIN32
131 install-mf-links: call_mf$(EXEEXT)
132 if !MFN
133 $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) call_mf$(EXEEXT) "$(DESTDIR)$(bindir)/mf-nowin$(EXEEXT)"
134 endif !MFN
135 $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) call_mf$(EXEEXT) "$(DESTDIR)$(bindir)/inimf$(EXEEXT)"
136 uninstall-mf-links:
137 if !MFN
138 rm -f $(DESTDIR)$(bindir)/mf-nowin$(EXEEXT)
139 endif !MFN
140 rm -f $(DESTDIR)$(bindir)/inimf$(EXEEXT)
141 endif WIN32
142
143 dist_mf_SOURCES = mfextra.c
144 mf_CPPFLAGS = $(AM_CPPFLAGS) $(X_CFLAGS)
145 mf_LDADD = libmf.a $(LDADD) $(windowlib) $(mf_x_libs)
146 dist_mf_nowin_SOURCES = mfextra.c
147 mf_nowin_CPPFLAGS = $(mf_CPPFLAGS) -DMFNOWIN
148 mf_nowin_LDADD = libmf.a $(LDADD) $(windowlib)
149
150 # We must create mfd.h before compiling mfextra.c.
151 $(mf_OBJECTS) $(mf_nowin_OBJECTS): mfd.h
152
153 windowlib = window/libwindow.a
154 $(windowlib): mfd.h $(srcdir)/window/*.c
155 cd window && $(MAKE) $(AM_MAKEFLAGS) libwindow.a
156 if WIN32
157 mf_x_libs = -lgdi32
158 else !WIN32
159 # Make `#include <X11/...>' and `-lX...' work.
160 # This matches xdvik.
161 # wlibs is substituted by web2c's configure, LIBS by general configure
162 # routines, and the others by AC_PATH_XTRA.
163 # All the x_... and X_... variables will be empty if we aren't supporting X.
164 # Follow the library order used in X11R6 itself:
165 # -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11 (some may not be present).
•166 mf_x_libs = $(X_LIBS) $(x_tool_libs) $(wlibs) $(X_EXTRA_LIBS)
167 endif !WIN32
168
169 ## mf and mf-nowin compile mfextra.c with different CPPFLAGS.
170 ## Automake, however, does not support CPPFLAGS for individual source files.
171 ## To avoid compiling everything twice, the common objects are in a library.
172 EXTRA_LIBRARIES += libmf.a
173
174 # Metafont C sources
175 mf_c_h = mfini.c mf0.c mfcoerce.h mfd.h
176 nodist_libmf_a_SOURCES = $(mf_c_h) mf-pool.c
177
178 # We must create mfd.h before building the libmf_a_OBJECTS.
179 $(libmf_a_OBJECTS): mfd.h
180
181 $(mf_c_h): mf-web2c
182 @$(web2c) mf
183 mf-web2c: mf.p $(web2c_texmf) web2c/cvtmf1.sed web2c/cvtmf2.sed
184 @$(web2c) mf
185
186 mf-pool.c: mf.pool mfd.h $(makecpool_stamp)
187 $(makecpool) mf >$@ || { rm -f $@; exit 1; }
188
189 # Tangling Metafont
190 mf.p mf.pool: mf-tangle
191 $(texmf_tangle) mf mf-final
192 mf-tangle: tangle$(EXEEXT) mf.web mf-final.ch tangle-sh
193 $(texmf_tangle) mf mf-final
194
195 # Generate mf-final.ch
196 mf-final.ch: tie$(EXEEXT) $(mf_ch_src)
197 $(tie_c) $(mf_ch_src) || { rm -f $@; exit 1; }
198 mf_ch_src = \
199 mf.web \
200 mf.ch \
201 mf-binpool.ch
202 ##
203 EXTRA_DIST += $(mf_ch_src)
204
205 DISTCLEANFILES += $(nodist_libmf_a_SOURCES) mf-final.ch mf-web2c \
206 mf.p mf.pool mf-tangle
207
208 # Metafont tests
209 #
210 mf_tests = mftraptest.test
211 mftraptest.log: mf$(EXEEXT) gftype$(EXEEXT) tftopl$(EXEEXT)
212 EXTRA_DIST += $(mf_tests)
213 if MF
214 TESTS += $(mf_tests)
215 TRIPTRAP += mftrap.diffs
216 TRIPTRAP_CLEAN += trap-clean
217 endif MF
218
219 ## mftraptest
220 mftrap.diffs: mf$(EXEEXT) gftype$(EXEEXT) tftopl$(EXEEXT)
221 $(triptrap_diffs) $@
222 .PHONY: trap-clean
223 trap-clean:
224 rm -rf trapdir
225
226 ## Test data
227 ##
228 EXTRA_DIST += \
229 triptrap/README \
230 triptrap/mftrap.diffs \
231 triptrap/mftrap.fot \
232 triptrap/mftrap.log \
233 triptrap/mftrap.pl \
234 triptrap/mftrap1.in \
235 triptrap/mftrap2.in \
236 triptrap/mftrapin.log \
237 triptrap/mptrap.diffs \
238 triptrap/mptrap.fot \
239 triptrap/mptrap.log \
240 triptrap/mptrap.pl \
241 triptrap/mptrap.readme \
242 triptrap/mptrap1.in \
243 triptrap/mptrap2.in \
244 triptrap/mptrapin.log \
245 triptrap/mtrap.0 \
246 triptrap/mtrap.1 \
247 triptrap/mtrap.log \
248 triptrap/mtrap.mp \
249 triptrap/texmf.cnf \
250 triptrap/trap.148 \
251 triptrap/trap.149 \
252 triptrap/trap.150 \
253 triptrap/trap.151 \
254 triptrap/trap.197 \
255 triptrap/trap.200 \
256 triptrap/trap.5 \
257 triptrap/trap.6 \
258 triptrap/trap.mf \
259 triptrap/trap.mp \
260 triptrap/trap.mpx \
261 triptrap/trap.typ \
262 triptrap/trapf.pl \
263 triptrap/trapman.tex \
264 triptrap/trip.diffs \
265 triptrap/trip.fot \
266 triptrap/trip.log \
267 triptrap/trip.pl \
268 triptrap/trip.tex \
269 triptrap/trip.typ \
270 triptrap/trip1.in \
271 triptrap/trip2.in \
272 triptrap/tripin.log \
273 triptrap/tripman.tex \
274 triptrap/tripos.tex \
275 triptrap/writeo \
276 triptrap/writeo.2
277
278 # (end of texmf.am)