blob: af5f328991f1690684f44a90f6696693bb127046 (
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
|
## texk/web2c/uptexdir/am/uptex.am: Makefile fragment for upTeX.
##
## Copyright (C) 2011 Peter Breitenlohner <tex-live@tug.org>
## You may freely use, modify and/or distribute this file.
uptex_cppflags = $(PTEXENC_INCLUDES) $(AM_CPPFLAGS)
uptex_ldadd = libukanji.a $(pproglib) $(PTEXENC_LIBS) $(LDADD)
uptex_dependencies = libukanji.a $(pproglib) $(PTEXENC_DEPEND) $(default_dependencies)
up_tangle = WEBINPUTS=.:$(srcdir)/uptexdir:$(srcdir) $(buildenv) $(TANGLE)
upweb_programs = upbibtex updvitype uppltotf uptftopl
# upTeX Tests
uptex_tests = uptexdir/uptrip.test
upweb_tests = \
uptexdir/upbibtex.test \
uptexdir/updvitype.test \
uptexdir/uppltotf.test \
uptexdir/uptftopl.test
EXTRA_DIST += $(uptex_tests) $(upweb_tests)
DISTCLEANFILES += $(upweb_programs:=.c) $(upweb_programs:=.h) \
$(upweb_programs:=.p) $(upweb_programs:=-web2c) $(upweb_programs:=.web)
## libukanji.a for upTeX and e-upTeX
##
EXTRA_LIBRARIES += libukanji.a
libukanji_a_SOURCES = uptexdir/kanji.c uptexdir/kanji.h uptexdir/kanji_dump.c
libukanji_a_CPPFLAGS = $(uptex_cppflags)
## upTeX
##
if UPTEX
bin_PROGRAMS += uptex
endif UPTEX
if UPWEB
bin_PROGRAMS += $(upweb_programs)
endif UPWEB
EXTRA_PROGRAMS += uptex $(upweb_programs)
uptex_CPPFLAGS = $(uptex_cppflags)
# With --enable-ipc, upTeX may need to link with -lsocket.
uptex_LDADD = $(uptex_ldadd) $(ipc_socketlibs)
uptex_DEPENDENCIES = $(uptex_dependencies)
# upTeX C sources
uptex_c_h = uptexini.c uptex0.c uptexcoerce.h uptexd.h
nodist_uptex_SOURCES = $(uptex_c_h) uptex-pool.c uptexdir/ptex_version.h uptexdir/uptex_version.h
dist_uptex_SOURCES = uptexdir/uptexextra.c uptexdir/uptexextra.h
# We must create uptexd.h and uptexdir/*ptex_version.h before building the uptex_OBJECTS.
uptex_prereq = uptexd.h uptexdir/ptex_version.h uptexdir/uptex_version.h
$(uptex_OBJECTS): $(uptex_prereq)
$(uptex_c_h): uptex-web2c
@$(web2c) uptex
uptex-web2c: uptex.p $(web2c_texmf) uptexdir/uptex.defines
@$(web2c) uptex
uptex-pool.c: uptex.pool uptexd.h $(makecpool_stamp)
$(makecpool) uptex >$@ || rm -f $@
# Tangling upTeX
uptex.p uptex.pool: uptex-tangle
@$(texmf_tangle) uptex uptex
uptex-tangle: tangle$(EXEEXT) uptex.web uptex.ch tangle-sh
@$(texmf_tangle) uptex uptex
# Extract ptex version
uptexdir/ptex_version.h: ptexdir/ptex-base.ch
$(MKDIR_P) uptexdir
grep '^@d pTeX_version_string==' $(srcdir)/ptexdir/ptex-base.ch \
| sed "s/^.*'-/#define PTEX_VERSION \"/;s/'.*$$/\"/" >$@
# Extract uptex version
uptexdir/uptex_version.h: uptexdir/uptex-m.ch
$(MKDIR_P) uptexdir
grep '^@d upTeX_version_string==' $(srcdir)/uptexdir/uptex-m.ch \
| sed "s/^.*'-/#define UPTEX_VERSION \"/;s/'.*$$/\"/" >$@
# Generate uptex.web
uptex.web: tie$(EXEEXT) $(uptex_web_srcs)
$(tie) -m uptex.web $(uptex_web_srcs)
uptex_web_srcs = \
tex.web \
tex.ch
# Generate uptex.ch
uptex.ch: tie$(EXEEXT) uptex.web $(uptex_ch_srcs)
$(tie) -c uptex.ch uptex.web $(uptex_ch_srcs)
uptex_ch_srcs = \
ptexdir/ptex-base.ch \
uptexdir/uptex-m.ch \
$(uptex_ch_synctex) \
tex-binpool.ch
EXTRA_DIST += $(uptex_web_srcs) $(uptex_ch_srcs) uptexdir/uptex.defines
DISTCLEANFILES += $(nodist_uptex_SOURCES) uptex.web uptex.ch uptex-web2c \
uptex.p uptex.pool uptex-tangle
## upBibTeX
##
nodist_upbibtex_SOURCES = upbibtex.c upbibtex.h
upbibtex_SOURCES = uptexdir/kanji.h
upbibtex_CPPFLAGS = $(uptex_cppflags)
upbibtex_LDADD = $(uptex_ldadd)
upbibtex_DEPENDENCIES = $(uptex_dependencies)
upbibtex.c upbibtex.h: upbibtex-web2c
$(web2c) upbibtex
upbibtex-web2c: upbibtex.p $(web2c_depend) uptexdir/uptex.defines
$(web2c) upbibtex
upbibtex.p: tangle$(EXEEXT) upbibtex.web uptexdir/upbibtex.ch
$(up_tangle) upbibtex upbibtex
upbibtex.web: tie$(EXEEXT) bibtex.web bibtex.ch ptexdir/pbibtex.ch
$(tie) -m upbibtex.web bibtex.web bibtex.ch ptexdir/pbibtex.ch
EXTRA_DIST += ptexdir/pbibtex.ch uptexdir/upbibtex.ch
## upDVItype
##
nodist_updvitype_SOURCES = updvitype.c updvitype.h
updvitype_SOURCES = uptexdir/kanji.h
updvitype_CPPFLAGS = $(uptex_cppflags) -DHEX_CHAR_CODE
updvitype_LDADD = $(uptex_ldadd)
updvitype_DEPENDENCIES = $(uptex_dependencies)
updvitype.c updvitype.h: updvitype-web2c
$(web2c) updvitype
updvitype-web2c: updvitype.p $(web2c_depend) uptexdir/uptex.defines
$(web2c) updvitype
updvitype.p: tangle$(EXEEXT) updvitype.web uptexdir/updvitype.ch
$(up_tangle) updvitype updvitype
updvitype.web: tie$(EXEEXT) dvitype.web dvitype.ch ptexdir/pdvitype.ch
$(tie) -m updvitype.web dvitype.web dvitype.ch ptexdir/pdvitype.ch
EXTRA_DIST += ptexdir/pdvitype.ch uptexdir/updvitype.ch
## upPLtoTF
##
nodist_uppltotf_SOURCES = uppltotf.c uppltotf.h
uppltotf_SOURCES = uptexdir/kanji.h
uppltotf_CPPFLAGS = $(uptex_cppflags) -DPRESERVE_PUTC
uppltotf_LDADD = $(uptex_ldadd)
uppltotf_DEPENDENCIES = $(uptex_dependencies)
uppltotf.c uppltotf.h: uppltotf-web2c
$(web2c) uppltotf
uppltotf-web2c: uppltotf.p $(web2c_depend) uptexdir/uptex.defines
$(web2c) uppltotf
uppltotf.p: tangle$(EXEEXT) uppltotf.web uptexdir/uppltotf.ch
$(up_tangle) uppltotf uppltotf
uppltotf.web: tie$(EXEEXT) pltotf.web pltotf.ch ptexdir/ppltotf.ch
$(tie) -m uppltotf.web pltotf.web pltotf.ch ptexdir/ppltotf.ch
EXTRA_DIST += ptexdir/ppltotf.ch uptexdir/uppltotf.ch
## upTFtoPL
##
nodist_uptftopl_SOURCES = uptftopl.c uptftopl.h
uptftopl_SOURCES = uptexdir/kanji.h
uptftopl_CPPFLAGS = $(uptex_cppflags)
uptftopl_LDADD = $(uptex_ldadd)
uptftopl_DEPENDENCIES = $(uptex_dependencies)
uptftopl.c uptftopl.h: uptftopl-web2c
$(web2c) uptftopl
uptftopl-web2c: uptftopl.p $(web2c_depend) uptexdir/uptex.defines
$(web2c) uptftopl
uptftopl.p: tangle$(EXEEXT) uptftopl.web uptexdir/uptftopl.ch
$(up_tangle) uptftopl uptftopl
uptftopl.web: tie$(EXEEXT) tftopl.web tftopl.ch ptexdir/ptftopl.ch
$(tie) -m uptftopl.web tftopl.web tftopl.ch ptexdir/ptftopl.ch
EXTRA_DIST += ptexdir/ptftopl.ch uptexdir/uptftopl.ch
##
EXTRA_DIST += \
uptexdir/COPYRIGHT \
uptexdir/COPYRIGHT.jis \
uptexdir/ChangeLog
if UPTEX
TESTS += $(uptex_tests)
check_PROGRAMS += dvitype pltotf tftopl
TRIPTRAP += uptrip.diffs
TRIPTRAP_CLEAN += uptrip-clean
endif UPTEX
if UPWEB
TESTS += $(upweb_tests)
endif UPWEB
## Test data and results
##
## uptexdir/upbibtex.test
DISTCLEANFILES += tests/xexampl.aux tests/xexampl.bbl tests/xexampl.blg
## uptexdir/updvitype.test
DISTCLEANFILES += tests/xstory.dvityp tests/xpagenum.typ
## uptexdir/uppltotf.test
DISTCLEANFILES += tests/xcmr10.tfm
## uptexdir/uptftopl.test
DISTCLEANFILES += tests/xcmr10.pl
## uptexdir/uptrip.test
EXTRA_DIST += uptexdir/uptrip/uptrip.diffs uptexdir/uptrip/texmf.cnf
uptrip.diffs: uptex$(EXEEXT)
$(triptrap_diffs) $@
.PHONY: uptrip-clean
uptrip-clean:
rm -f trip.tfm trip.pl trip.tex trip.fmt uptripin.fot uptripin.log
rm -f uptrip.fot uptrip.log trip.log trip.dvi trip.typ
rm -f uptrip.fot uptrip.log uptrip.dvi uptrip.typ
rm -f tripos.tex 8terminal.tex
rm -rf tfm
DISTCLEANFILES += uptrip.diffs
|