diff options
Diffstat (limited to 'Build/source/texk/web2c/am/texmf.am')
-rw-r--r-- | Build/source/texk/web2c/am/texmf.am | 275 |
1 files changed, 275 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/am/texmf.am b/Build/source/texk/web2c/am/texmf.am new file mode 100644 index 00000000000..d4fe9c515fa --- /dev/null +++ b/Build/source/texk/web2c/am/texmf.am @@ -0,0 +1,275 @@ +## $Id$ +## texk/web2c/am/texmf.am: Makefile fragment for TeX and MF. +## +## Copyright 2015-2019 Karl Berry <tex-live@tug.org> +## Copyright 2009-2015 Peter Breitenlohner <tex-live@tug.org> +## You may freely use, modify and/or distribute this file. + +## Common for MF and TeX +EXTRA_DIST += \ + lib/mfmpi386.asm \ + lib/mfmpw32.c \ + lib/texmfmp.c \ + texmfmem.h \ + texmfmp-help.h \ + texmfmp.h + +## TeX +## +if TEX +bin_PROGRAMS += tex +if WIN32 +bin_PROGRAMS += initex +else !WIN32 +bin_links += tex$(EXEEXT):initex +endif !WIN32 +endif TEX +EXTRA_PROGRAMS += tex + +initex_CPPFLAGS = -DEXEPROG=\"tex.exe\" +nodist_initex_SOURCES = callexe.c +initex_LDADD = + +tex_CPPFLAGS = $(AM_CPPFLAGS) + +# With --enable-ipc, TeX may need to link with -lsocket. +tex_LDADD = $(LDADD) $(ipc_socketlibs) + +# TeX C sources +tex_c_h = texini.c tex0.c texcoerce.h texd.h +nodist_tex_SOURCES = $(tex_c_h) tex-pool.c +dist_tex_SOURCES = texextra.c + +# We must create texd.h before building the tex_OBJECTS. +tex_prereq = texd.h +$(tex_OBJECTS): $(tex_prereq) + +$(tex_c_h): tex-web2c + @$(web2c) tex +tex-web2c: tex.p $(web2c_texmf) + @$(web2c) tex + +tex-pool.c: tex.pool texd.h $(makecpool_stamp) + $(makecpool) tex >$@ || rm -f $@ + +# Tangling TeX +tex.p tex.pool: tex-tangle + @$(texmf_tangle) tex tex-final +tex-tangle: tangle$(EXEEXT) tex.web tex-final.ch tangle-sh + @$(texmf_tangle) tex tex-final + +# Generate tex-final.ch +tex-final.ch: tie$(EXEEXT) $(tex_ch_srcs) + $(tie_c) $(tex_ch_srcs) +tex_ch_srcs = \ + tex.web \ + tex.ch \ + enctexdir/enctex1.ch \ + enctexdir/enctex-tex.ch \ + enctexdir/enctex2.ch \ + $(tex_ch_synctex) \ + tex-binpool.ch +## +EXTRA_DIST += $(tex_ch_srcs) + +DISTCLEANFILES += $(nodist_tex_SOURCES) tex-final.ch tex-web2c \ + tex.p tex.pool tex-tangle + +# TeX tests +# +tex_tests = triptest.test tests/write18-quote-test.pl tests/tex-closeout.test +triptest.log: tex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT) +tests/write18-quote-test.log tests/tex-closeout.test: tex$(EXEEXT) +EXTRA_DIST += $(tex_tests) +EXTRA_DIST += tests/write18-quote.tex +if TEX +TESTS += $(tex_tests) +TRIPTRAP += trip.diffs +TRIPTRAP_CLEAN += trip-clean +endif TEX +DISTCLEANFILES += trip.diffs + +## tests/write18-quote-test.pl +DISTCLEANFILES += write18-quote.log + +## triptest +trip.diffs: tex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT) + $(triptrap_diffs) $@ +.PHONY: trip-clean +trip-clean: + rm -rf tripdir + +## Metafont +## +if MF +bin_PROGRAMS += mf +if MFN +bin_PROGRAMS += mf-nowin +endif MFN +if WIN32 +noinst_PROGRAMS += call_mf +install_exe_links += install-mf-links +uninstall_exe_links += uninstall-mf-links +else !WIN32 +if !MFN +bin_links += mf$(EXEEXT):mf-nowin +endif !MFN +bin_links += mf$(EXEEXT):inimf +endif !WIN32 +endif MF +EXTRA_PROGRAMS += mf mf-nowin +DISTCLEANFILES += mftrap.diffs + +call_mf_CPPFLAGS = -DEXEPROG=\"mf.exe\" +nodist_call_mf_SOURCES = callexe.c +call_mf_LDADD = + +.PHONY: install-mf-links uninstall-mf-links +if WIN32 +install-mf-links: call_mf$(EXEEXT) +if !MFN + $(INSTALL_PROGRAM) call_mf$(EXEEXT) $(DESTDIR)$(bindir)/mf-nowin$(EXEEXT) +endif !MFN + $(INSTALL_PROGRAM) call_mf$(EXEEXT) $(DESTDIR)$(bindir)/inimf$(EXEEXT) +uninstall-mf-links: +if !MFN + rm -f $(DESTDIR)$(bindir)/mf-nowin$(EXEEXT) +endif !MFN + rm -f $(DESTDIR)$(bindir)/inimf$(EXEEXT) +endif WIN32 + +dist_mf_SOURCES = mfextra.c +mf_CPPFLAGS = $(AM_CPPFLAGS) $(X_CFLAGS) +mf_LDADD = libmf.a $(LDADD) $(windowlib) $(mf_x_libs) +dist_mf_nowin_SOURCES = mfextra.c +mf_nowin_CPPFLAGS = $(mf_CPPFLAGS) -DMFNOWIN +mf_nowin_LDADD = libmf.a $(LDADD) $(windowlib) + +# We must create mfd.h before compiling mfextra.c. +$(mf_OBJECTS) $(mf_nowin_OBJECTS): mfd.h + +windowlib = window/libwindow.a +$(windowlib): mfd.h $(srcdir)/window/*.c + cd window && $(MAKE) $(AM_MAKEFLAGS) libwindow.a +if WIN32 +mf_x_libs = -lgdi32 +else !WIN32 +# Make `#include <X11/...>' and `-lX...' work. +# This matches xdvik. +# wlibs is substituted by web2c's configure, LIBS by general configure +# routines, and the others by AC_PATH_XTRA. +# All the x_... and X_... variables will be empty if we aren't supporting X. +# Follow the library order used in X11R6 itself: +# -lXaw -lXmu -lXt -lSM -lICE -lXext -lX11 (some may not be present). +mf_x_libs = $(X_LIBS) $(x_tool_libs) $(X_PRE_LIBS) $(x_ext_lib) $(wlibs) $(X_EXTRA_LIBS) +endif !WIN32 + +## mf and mf-nowin compile mfextra.c with different CPPFLAGS. +## Automake, however, does not support CPPFLAGS for individual source files. +## To avoid compiling everything twice, the common objects are in a library. +EXTRA_LIBRARIES += libmf.a + +# Metafont C sources +mf_c_h = mfini.c mf0.c mfcoerce.h mfd.h +nodist_libmf_a_SOURCES = $(mf_c_h) mf-pool.c + +# We must create mfd.h before building the libmf_a_OBJECTS. +$(libmf_a_OBJECTS): mfd.h + +$(mf_c_h): mf-web2c + @$(web2c) mf +mf-web2c: mf.p $(web2c_texmf) web2c/cvtmf1.sed web2c/cvtmf2.sed + @$(web2c) mf + +mf-pool.c: mf.pool mfd.h $(makecpool_stamp) + $(makecpool) mf >$@ || rm -f $@ + +# Tangling Metafont +mf.p mf.pool: mf-tangle + @$(texmf_tangle) mf mf-final +mf-tangle: tangle$(EXEEXT) mf.web mf-final.ch tangle-sh + @$(texmf_tangle) mf mf-final + +# Generate mf-final.ch +mf-final.ch: tie$(EXEEXT) $(mf_ch_src) + $(tie_c) $(mf_ch_src) +mf_ch_src = \ + mf.web \ + mf.ch \ + mf-binpool.ch +## +EXTRA_DIST += $(mf_ch_src) + +DISTCLEANFILES += $(nodist_libmf_a_SOURCES) mf-final.ch mf-web2c \ + mf.p mf.pool mf-tangle + +# Metafont tests +# +mf_tests = mftraptest.test +mftraptest.log: mf$(EXEEXT) gftype$(EXEEXT) tftopl$(EXEEXT) +EXTRA_DIST += $(mf_tests) +if MF +TESTS += $(mf_tests) +TRIPTRAP += mftrap.diffs +TRIPTRAP_CLEAN += trap-clean +endif MF + +## mftraptest +mftrap.diffs: mf$(EXEEXT) gftype$(EXEEXT) tftopl$(EXEEXT) + $(triptrap_diffs) $@ +.PHONY: trap-clean +trap-clean: + rm -rf trapdir + +## Test data +## +EXTRA_DIST += \ + triptrap/README \ + triptrap/mftrap.diffs \ + triptrap/mftrap.fot \ + triptrap/mftrap.log \ + triptrap/mftrap.pl \ + triptrap/mftrap1.in \ + triptrap/mftrap2.in \ + triptrap/mftrapin.log \ + triptrap/mptrap.diffs \ + triptrap/mptrap.fot \ + triptrap/mptrap.log \ + triptrap/mptrap.pl \ + triptrap/mptrap.readme \ + triptrap/mptrap1.in \ + triptrap/mptrap2.in \ + triptrap/mptrapin.log \ + triptrap/mtrap.0 \ + triptrap/mtrap.1 \ + triptrap/mtrap.log \ + triptrap/mtrap.mp \ + triptrap/texmf.cnf \ + triptrap/trap.148 \ + triptrap/trap.149 \ + triptrap/trap.150 \ + triptrap/trap.151 \ + triptrap/trap.197 \ + triptrap/trap.200 \ + triptrap/trap.5 \ + triptrap/trap.6 \ + triptrap/trap.mf \ + triptrap/trap.mp \ + triptrap/trap.mpx \ + triptrap/trap.typ \ + triptrap/trapf.pl \ + triptrap/trapman.tex \ + triptrap/trip.diffs \ + triptrap/trip.fot \ + triptrap/trip.log \ + triptrap/trip.pl \ + triptrap/trip.tex \ + triptrap/trip.typ \ + triptrap/trip1.in \ + triptrap/trip2.in \ + triptrap/tripin.log \ + triptrap/tripman.tex \ + triptrap/tripos.tex \ + triptrap/writeo \ + triptrap/writeo.2 + |