summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/eptexdir/am/eptex.am
blob: 0c69b9555180aa9a0e70da99dff77839c23e0777 (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
## texk/web2c/eptexdir/am/eptex.am: Makefile fragment for e-pTeX.
##
## Copyright (C) 2011 Peter Breitenlohner <tex-live@tug.org>
## You may freely use, modify and/or distribute this file.

## e-pTeX
##
if EPTEX
bin_PROGRAMS += eptex
endif EPTEX
EXTRA_PROGRAMS += eptex

# e-pTeX Tests
#
eptex_tests = eptexdir/eptrip.test

EXTRA_DIST += $(eptex_tests)

eptex_CPPFLAGS = $(PTEXENC_INCLUDES) $(AM_CPPFLAGS)
eptex_CFLAGS = $(WARNING_CFLAGS)

# With --enable-ipc, e-pTeX may need to link with -lsocket.
eptex_LDADD = libkanji.a $(pproglib) $(PTEXENC_LIBS) $(LDADD) $(ipc_socketlibs)

# e-pTeX C sources
eptex_c_h = eptexini.c eptex0.c eptexcoerce.h eptexd.h
nodist_eptex_SOURCES = $(eptex_c_h) eptex-pool.c eptexdir/etex_version.h eptexdir/ptex_version.h
dist_eptex_SOURCES = eptexdir/eptexextra.c eptexdir/eptexextra.h

# We must create eptexd.h and eptexdir/[ep]tex_version.h before building the eptex_OBJECTS.
eptex_prereq = eptexd.h eptexdir/etex_version.h eptexdir/ptex_version.h
$(eptex_OBJECTS): $(eptex_prereq)

$(eptex_c_h): eptex-web2c
	@$(web2c) eptex
eptex-web2c: eptex.p $(web2c_texmf) eptexdir/eptex.defines
	@$(web2c) eptex

eptex-pool.c: eptex.pool eptexd.h $(makecpool_stamp)
	$(makecpool) eptex >$@ || rm -f $@

# Tangling e-pTeX
eptex.p eptex.pool: eptex-tangle
	@$(texmf_tangle) eptex eptex
eptex-tangle: tangle$(EXEEXT) eptex.web eptex.ch tangle-sh
	@$(texmf_tangle) eptex eptex

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

# Extract ptex version
eptexdir/ptex_version.h: eptexdir/eptex.ech
	$(MKDIR_P) eptexdir
	grep '^@d  pTeX_version_string==' $(srcdir)/eptexdir/eptex.ech \
	  | sed "s/^.*'-/#define PTEX_VERSION \"/;s/'.*$$/\"/" >$@

# Generate eptex.web
eptex.web: tie$(EXEEXT) $(eptex_web_srcs)
	$(tie) -m eptex.web $(eptex_web_srcs)
eptex_web_srcs = \
	tex.web \
	etexdir/etex.ch \
	etexdir/tex.ch0 \
	tex.ch \
	etexdir/tex.ech

# Generate eptex.ch
eptex.ch: tie$(EXEEXT) eptex.web $(eptex_ch_srcs)
	$(tie) -c eptex.ch eptex.web $(eptex_ch_srcs)
eptex_ch_srcs = \
	eptexdir/eptex-base.ch \
	eptexdir/etex.ch0 \
	ptexdir/ptex-base.ch \
	eptexdir/eptex.ech \
	eptexdir/etex.ch1 \
	eptexdir/fam256.ch \
	eptexdir/pdfstrcmp.ch \
	tex-binpool.ch

EXTRA_DIST += $(eptex_web_srcs) $(eptex_ch_srcs) eptexdir/eptex.defines

DISTCLEANFILES += $(nodist_eptex_SOURCES) eptex.web eptex.ch eptex-web2c \
	eptex.p eptex.pool eptex-tangle

## 
EXTRA_DIST += \
	eptexdir/ChangeLog \
	eptexdir/ChangeLog.TL \
	eptexdir/README.txt

if EPTEX
TESTS += $(eptex_tests)
check_PROGRAMS += dvitype pltotf tftopl
TRIPTRAP += eptrip.diffs
TRIPTRAP_CLEAN += eptrip-clean
endif EPTEX

## Test data and results
##
## eptexdir/eptrip.test
EXTRA_DIST += eptexdir/eptrip.diffs
.PHONY: eptrip-clean
eptrip-clean:
	rm -f trip.tfm trip.pl trip.tex trip.fmt trip.log trip.dvi
	rm -f cptripin.fot cptripin.log cptrip.fot cptrip.log cptrip.typ
	rm -f xptripin.fot xptripin.log xptrip.fot xptrip.log xptrip.typ
	rm -f eptripin.fot eptripin.log eptrip.fot eptrip.log eptrip.typ
	rm -f etrip.tfm etrip.pl etrip.tex etrip.log etrip.fmt etrip.dvi etrip.out
	rm -f tripos.tex 8terminal.tex
	rm -rf tfm
DISTCLEANFILES += eptrip.diffs