1 ## texk/web2c/am/texmf.am: Makefile fragment for TeX and MF.
3 ## Copyright (C) 2009-2015 Peter Breitenlohner <tex-live@tug.org>
4 ## You may freely use, modify and/or distribute this file.
6 ## Common for MF and TeX
20 bin_PROGRAMS += initex
22 bin_links += tex$(EXEEXT):initex
27 initex_CPPFLAGS = -DEXEPROG=\"tex.exe\"
28 nodist_initex_SOURCES = callexe.c
31 tex_CPPFLAGS = $(AM_CPPFLAGS)
33 # With --enable-ipc, TeX may need to link with -lsocket.
34 tex_LDADD = $(LDADD) $(ipc_socketlibs)
37 tex_c_h = texini.c tex0.c texcoerce.h texd.h
38 nodist_tex_SOURCES = $(tex_c_h) tex-pool.c
39 dist_tex_SOURCES = texextra.c
41 # We must create texd.h before building the tex_OBJECTS.
43 $(tex_OBJECTS): $(tex_prereq)
47 tex-web2c: tex.p $(web2c_texmf)
50 tex-pool.c: tex.pool texd.h $(makecpool_stamp)
51 $(makecpool) tex >$@ || rm -f $@
54 tex.p tex.pool: tex-tangle
55 @$(texmf_tangle) tex tex-final
56 tex-tangle: tangle$(EXEEXT) tex.web tex-final.ch tangle-sh
57 @$(texmf_tangle) tex tex-final
59 # Generate tex-final.ch
60 tex-final.ch: tie$(EXEEXT) $(tex_ch_srcs)
61 $(tie_c) $(tex_ch_srcs)
69 EXTRA_DIST += $(tex_ch_srcs)
71 DISTCLEANFILES += $(nodist_tex_SOURCES) tex-final.ch tex-web2c \
72 tex.p tex.pool tex-tangle
76 tex_tests = triptest.test tests/write18-quote-test.pl
77 triptest.log: tex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
78 tests/write18-quote-test.log: tex$(EXEEXT)
79 EXTRA_DIST += $(tex_tests)
80 EXTRA_DIST += tests/write18-quote.tex
83 TRIPTRAP += trip.diffs
84 TRIPTRAP_CLEAN += trip-clean
86 DISTCLEANFILES += trip.diffs
88 ## tests/write18-quote-test.pl
89 DISTCLEANFILES += write18-quote.log
92 trip.diffs: tex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
103 bin_PROGRAMS += mf-nowin
106 noinst_PROGRAMS += call_mf
107 install_exe_links += install-mf-links
108 uninstall_exe_links += uninstall-mf-links
111 bin_links += mf$(EXEEXT):mf-nowin
113 bin_links += mf$(EXEEXT):inimf
116 EXTRA_PROGRAMS += mf mf-nowin
117 DISTCLEANFILES += mftrap.diffs
119 call_mf_CPPFLAGS = -DEXEPROG=\"mf.exe\"
120 nodist_call_mf_SOURCES = callexe.c
123 .PHONY: install-mf-links uninstall-mf-links
125 install-mf-links: call_mf$(EXEEXT)
127 $(INSTALL_PROGRAM) call_mf$(EXEEXT) $(DESTDIR)$(bindir)/mf-nowin$(EXEEXT)
129 $(INSTALL_PROGRAM) call_mf$(EXEEXT) $(DESTDIR)$(bindir)/inimf$(EXEEXT)
132 rm -f $(DESTDIR)$(bindir)/mf-nowin$(EXEEXT)
134 rm -f $(DESTDIR)$(bindir)/inimf$(EXEEXT)
137 dist_mf_SOURCES = mfextra.c
138 mf_CPPFLAGS = $(AM_CPPFLAGS) $(X_CFLAGS)
139 mf_LDADD = libmf.a $(LDADD) $(windowlib) $(mf_x_libs)
140 dist_mf_nowin_SOURCES = mfextra.c
141 mf_nowin_CPPFLAGS = $(mf_CPPFLAGS) -DMFNOWIN
142 mf_nowin_LDADD = libmf.a $(LDADD) $(windowlib)
144 # We must create mfd.h before compiling mfextra.c.
145 $(mf_OBJECTS) $(mf_nowin_OBJECTS): mfd.h
147 windowlib = window/libwindow.a
148 $(windowlib): mfd.h $(srcdir)/window/*.c
149 cd window && $(MAKE) $(AM_MAKEFLAGS) libwindow.a
153 # Make `#include <X11/...>' and `-lX...' work.
154 # This matches xdvik.
155 # wlibs is substituted by web2c's configure, LIBS by general configure
156 # routines, and the others by AC_PATH_XTRA.
157 # All the x_... and X_... variables will be empty if we aren't supporting X.
158 # Follow the library order used in X11R6 itself:
159 # -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11 (some may not be present).
160 mf_x_libs = $(X_LIBS) $(x_tool_libs) $(X_PRE_LIBS) $(x_ext_lib) $(wlibs) $(X_EXTRA_LIBS)
163 ## mf and mf-nowin compile mfextra.c with different CPPFLAGS.
164 ## Automake, however, does not support CPPFLAGS for individual source files.
165 ## To avoid compiling everything twice, the common objects are in a library.
166 EXTRA_LIBRARIES += libmf.a
169 mf_c_h = mfini.c mf0.c mfcoerce.h mfd.h
170 nodist_libmf_a_SOURCES = $(mf_c_h) mf-pool.c
172 # We must create mfd.h before building the libmf_a_OBJECTS.
173 $(libmf_a_OBJECTS): mfd.h
177 mf-web2c: mf.p $(web2c_texmf) web2c/cvtmf1.sed web2c/cvtmf2.sed
180 mf-pool.c: mf.pool mfd.h $(makecpool_stamp)
181 $(makecpool) mf >$@ || rm -f $@
184 mf.p mf.pool: mf-tangle
185 @$(texmf_tangle) mf mf-final
186 mf-tangle: tangle$(EXEEXT) mf.web mf-final.ch tangle-sh
187 @$(texmf_tangle) mf mf-final
189 # Generate mf-final.ch
190 mf-final.ch: tie$(EXEEXT) $(mf_ch_src)
191 $(tie_c) $(mf_ch_src)
197 EXTRA_DIST += $(mf_ch_src)
199 DISTCLEANFILES += $(nodist_libmf_a_SOURCES) mf-final.ch mf-web2c \
200 mf.p mf.pool mf-tangle
204 mf_tests = mftraptest.test
205 mftraptest.log: mf$(EXEEXT) gftype$(EXEEXT) tftopl$(EXEEXT)
206 EXTRA_DIST += $(mf_tests)
209 TRIPTRAP += mftrap.diffs
210 TRIPTRAP_CLEAN += trap-clean
214 mftrap.diffs: mf$(EXEEXT) gftype$(EXEEXT) tftopl$(EXEEXT)
224 triptrap/mftrap.diffs \
225 triptrap/mftrap.fot \
226 triptrap/mftrap.log \
228 triptrap/mftrap1.in \
229 triptrap/mftrap2.in \
230 triptrap/mftrapin.log \
231 triptrap/mptrap.diffs \
232 triptrap/mptrap.fot \
233 triptrap/mptrap.log \
235 triptrap/mptrap.readme \
236 triptrap/mptrap1.in \
237 triptrap/mptrap2.in \
238 triptrap/mptrapin.log \
257 triptrap/trapman.tex \
258 triptrap/trip.diffs \
266 triptrap/tripin.log \
267 triptrap/tripman.tex \
268 triptrap/tripos.tex \