summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/etexdir/am/etex.am
blob: e346298f0d0682e46dd187e2b37a8fc5f5a3cb94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
## texk/web2c/etexdir/am/etex.am: Makefile fragment for e-TeX.
##
## Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
## You may freely use, modify and/or distribute this file.

## e-TeX
##
if ETEX
bin_PROGRAMS += etex
endif ETEX
EXTRA_PROGRAMS += etex

etex_CPPFLAGS =

# With --enable-ipc, e-TeX may need to link with -lsocket.
etex_LDADD = $(LDADD) $(ipc_socketlibs)

# e-TeX C sources
etex_c_h = etexini.c etex0.c etex1.c etex2.c etexcoerce.h etexd.h
nodist_etex_SOURCES = $(etex_c_h) etex-pool.c etexextra.c etexdir/etexextra.h

$(etex_c_h): etex-web2c
etex-web2c: etex.p $(web2c_texmf)
	$(web2c) etex
	: $(synctex_convert_etex)
	echo timestamp >$@
	touch $(etex_c_h)

etex-pool.c: etex.pool $(makecpool_stamp) tmf-pool.h
	$(makecpool) etex.pool $(srcdir)/tmf-pool.h >$@ || rm -f $@

etexextra.c: etexdir/etexextra.h lib/texmfmp.c etexd.h
	sed s/TEX-OR-MF-OR-MP/etex/ $(srcdir)/lib/texmfmp.c >$@

etexdir/etexextra.h: etexdir/etexextra.in etexdir/etex.version
	sed s/ETEX-VERSION/`cat etexdir/etex.version`/ \
	  $(srcdir)/etexdir/etexextra.in >$@

# Tangling e-TeX
etex.p etex.pool: etex-tangle
etex-tangle: tangle$(EXEEXT) etex.web etex.ch
	$(tangle) etex etex
	echo timestamp >$@
	touch etex.p etex.pool

# Extract etex version
etexdir/etex.version: etexdir/etex.ch
	$(mkdir_p) etexdir
	grep '^@d eTeX_version_string==' $(srcdir)/etexdir/etex.ch \
	  | sed "s/^.*'-//;s/'.*$$//" >etexdir/etex.version

# Generate etex.web
etex.web: tie$(EXEEXT) $(etex_web_srcs)
	$(tie) -m etex.web $(etex_web_srcs)
etex_web_srcs = \
	tex.web \
	etexdir/etex.ch \
	etexdir/etex.fix

# Generate etex.ch
etex.ch: tie$(EXEEXT) etex.web $(etex_ch_srcs)
	$(tie) -c etex.ch etex.web $(etex_ch_srcs)
etex_ch_srcs = \
	etexdir/tex.ch0 \
	tex.ch \
	$(etex_ch_synctex) \
	etexdir/tex.ch1 \
	etexdir/tex.ech \
	etexdir/etex-binpool.ch
##
EXTRA_DIST += $(etex_web_srcs) $(etex_ch_srcs) etexdir/etexextra.in \
	lib/texmfmp.c tmf-pool.h

DISTCLEANFILES += $(nodist_etex_SOURCES) etex.web etex.ch etex-web2c \
	etex.p etex.pool etex-tangle etexdir/etex.version

EXTRA_DIST += \
	etexdir/ChangeLog \
	etexdir/INSTALL \
	etexdir/README \
	etexdir/etex_gen.tex

## e-TeX Tests
##
etex_tests = etexdir/etrip.test

EXTRA_DIST += $(etex_tests)

if ETEX
TESTS += $(etex_tests)
check_PROGRAMS += dvitype pltotf tftopl
endif ETEX

.PHONY: etrip-clean
clean-local:: etrip-clean
## trip.test
etrip-clean:
	rm -f trip.tfm trip.pl trip.tex trip.fmt ctripin.fot ctripin.log
	rm -f ctrip.fot ctrip.log trip.dvi ctrip.typ
	rm -f xtripin.fot xtripin.log
	rm -f xtrip.fot xtrip.log xtrip.typ
	rm -f etrip.tfm etrip.pl etrip.tex etrip.fmt etripin.fot etripin.log
	rm -f etrip.fot etrip.log etrip.dvi etrip.out etrip.typ
	rm -f tripos.tex 8terminal.tex
	rm -rf tfm

## Test data
##
EXTRA_DIST += \
	etexdir/etrip/etrip.diffs \
	etexdir/etrip/etrip.fot \
	etexdir/etrip/etrip.log \
	etexdir/etrip/etrip.out \
	etexdir/etrip/etrip.pl \
	etexdir/etrip/etrip.tex \
	etexdir/etrip/etrip.typ \
	etexdir/etrip/etrip1.in \
	etexdir/etrip/etrip2.in \
	etexdir/etrip/etrip3.in \
	etexdir/etrip/etripin.log \
	etexdir/etrip/etripman.tex \
	etexdir/etrip/texmf.cnf \
	etexdir/etrip/trip2.in

## Not used
##
EXTRA_DIST += etexdir/etex.mak

## Eventually delete these files
##
EXTRA_DIST += etexdir/etex.mk