1 ## texk/web2c/uptexdir/am/uptex.am: Makefile fragment for upTeX.
3 ## Copyright (C) 2011-2015 Peter Breitenlohner <tex-live@tug.org>
4 ## You may freely use, modify and/or distribute this file.
6 uptex_cppflags = $(PTEXENC_INCLUDES) $(AM_CPPFLAGS)
7 uptex_ldadd = libukanji.a $(pproglib) $(PTEXENC_LIBS) $(LDADD)
8 uptex_dependencies = libukanji.a $(pproglib) $(PTEXENC_DEPEND) $(default_dependencies)
9 up_tangle = $(tangle_silent)WEBINPUTS=.:$(srcdir)/uptexdir:$(srcdir) $(buildenv) $(TANGLE)
11 upweb_programs = upbibtex updvitype uppltotf uptftopl
13 ## libukanji.a for upTeX and e-upTeX
15 EXTRA_LIBRARIES += libukanji.a
16 libukanji_a_SOURCES = uptexdir/kanji.c uptexdir/kanji.h uptexdir/kanji_dump.c
17 libukanji_a_CPPFLAGS = $(uptex_cppflags)
25 bin_PROGRAMS += $(upweb_programs)
27 EXTRA_PROGRAMS += uptex $(upweb_programs)
29 uptex_CPPFLAGS = $(uptex_cppflags)
31 # With --enable-ipc, upTeX may need to link with -lsocket.
32 uptex_LDADD = $(uptex_ldadd) $(ipc_socketlibs)
33 uptex_DEPENDENCIES = $(uptex_dependencies)
36 uptex_c_h = uptexini.c uptex0.c uptexcoerce.h uptexd.h
37 nodist_uptex_SOURCES = $(uptex_c_h) uptex-pool.c
38 dist_uptex_SOURCES = uptexdir/uptexextra.c uptexdir/uptexextra.h uptexdir/uptex_version.h
40 # We must create uptexd.h and uptexdir/uptex_version.h before building the uptex_OBJECTS.
41 uptex_prereq = uptexd.h ptexdir/ptex_version.h uptexdir/uptex_version.h
42 $(uptex_OBJECTS): $(uptex_prereq)
44 $(uptex_c_h): uptex-web2c
46 uptex-web2c: uptex.p $(web2c_texmf) uptexdir/uptex.defines
49 uptex-pool.c: uptex.pool uptexd.h $(makecpool_stamp)
50 $(makecpool) uptex >$@ || rm -f $@
53 uptex.p uptex.pool: uptex-tangle
54 @$(texmf_tangle) uptex uptex
55 uptex-tangle: tangle$(EXEEXT) uptex.web uptex.ch tangle-sh
56 @$(texmf_tangle) uptex uptex
58 # Extract uptex version
59 $(srcdir)/uptexdir/uptex_version.h: @MAINTAINER_MODE_TRUE@ uptexdir/uptex-m.ch
60 $(AM_V_GEN)grep '^@d upTeX_version_string==' $(srcdir)/uptexdir/uptex-m.ch \
61 | sed "s/^.*'-/#define UPTEX_VERSION \"/;s/'.*$$/\"/" >$@
64 uptex.web: tie$(EXEEXT) $(uptex_web_srcs)
65 $(tie_m) $(uptex_web_srcs)
71 uptex.ch: tie$(EXEEXT) uptex.web $(uptex_ch_srcs)
72 $(tie_c) uptex.web $(uptex_ch_srcs)
74 ptexdir/ptex-base.ch \
79 EXTRA_DIST += $(uptex_web_srcs) $(uptex_ch_srcs) uptexdir/uptex.defines
81 DISTCLEANFILES += $(nodist_uptex_SOURCES) uptex.web uptex.ch uptex-web2c \
82 uptex.p uptex.pool uptex-tangle
86 nodist_upbibtex_SOURCES = upbibtex.c upbibtex.h
87 upbibtex_SOURCES = uptexdir/kanji.h
88 upbibtex_CPPFLAGS = $(uptex_cppflags)
89 upbibtex_LDADD = $(uptex_ldadd)
90 upbibtex_DEPENDENCIES = $(uptex_dependencies)
91 upbibtex.c upbibtex.h: upbibtex-web2c
93 upbibtex-web2c: upbibtex.p $(web2c_depend) uptexdir/uptex.defines web2c/cvtbib.sed
95 upbibtex.p: tangle$(EXEEXT) upbibtex.web uptexdir/upbibtex.ch
96 $(up_tangle) upbibtex upbibtex
97 upbibtex.web: tie$(EXEEXT) bibtex.web bibtex.ch ptexdir/pbibtex.ch
98 $(tie_m) bibtex.web bibtex.ch ptexdir/pbibtex.ch
99 EXTRA_DIST += ptexdir/pbibtex.ch uptexdir/upbibtex.ch
103 nodist_updvitype_SOURCES = updvitype.c updvitype.h
104 updvitype_SOURCES = uptexdir/kanji.h
105 updvitype_CPPFLAGS = $(uptex_cppflags) -DHEX_CHAR_CODE
106 updvitype_LDADD = $(uptex_ldadd)
107 updvitype_DEPENDENCIES = $(uptex_dependencies)
108 updvitype.c updvitype.h: updvitype-web2c
110 updvitype-web2c: updvitype.p $(web2c_depend) uptexdir/uptex.defines
112 updvitype.p: tangle$(EXEEXT) updvitype.web uptexdir/updvitype.ch
113 $(up_tangle) updvitype updvitype
114 updvitype.web: tie$(EXEEXT) dvitype.web dvitype.ch ptexdir/pdvitype.ch
115 $(tie_m) dvitype.web dvitype.ch ptexdir/pdvitype.ch
116 EXTRA_DIST += ptexdir/pdvitype.ch uptexdir/updvitype.ch
120 nodist_uppltotf_SOURCES = uppltotf.c uppltotf.h
121 uppltotf_SOURCES = uptexdir/kanji.h
122 uppltotf_CPPFLAGS = $(uptex_cppflags) -DPRESERVE_PUTC
123 uppltotf_LDADD = $(uptex_ldadd)
124 uppltotf_DEPENDENCIES = $(uptex_dependencies)
125 uppltotf.c uppltotf.h: uppltotf-web2c
127 uppltotf-web2c: uppltotf.p $(web2c_depend) uptexdir/uptex.defines
129 uppltotf.p: tangle$(EXEEXT) uppltotf.web uptexdir/uppltotf.ch
130 $(up_tangle) uppltotf uppltotf
131 uppltotf.web: tie$(EXEEXT) pltotf.web pltotf.ch ptexdir/ppltotf.ch
132 $(tie_m) pltotf.web pltotf.ch ptexdir/ppltotf.ch
133 EXTRA_DIST += ptexdir/ppltotf.ch uptexdir/uppltotf.ch
137 nodist_uptftopl_SOURCES = uptftopl.c uptftopl.h
138 uptftopl_SOURCES = uptexdir/kanji.h
139 uptftopl_CPPFLAGS = $(uptex_cppflags)
140 uptftopl_LDADD = $(uptex_ldadd)
141 uptftopl_DEPENDENCIES = $(uptex_dependencies)
142 uptftopl.c uptftopl.h: uptftopl-web2c
144 uptftopl-web2c: uptftopl.p $(web2c_depend) uptexdir/uptex.defines
146 uptftopl.p: tangle$(EXEEXT) uptftopl.web uptexdir/uptftopl.ch
147 $(up_tangle) uptftopl uptftopl
148 uptftopl.web: tie$(EXEEXT) tftopl.web tftopl.ch ptexdir/ptftopl.ch
149 $(tie_m) tftopl.web tftopl.ch ptexdir/ptftopl.ch
150 EXTRA_DIST += ptexdir/ptftopl.ch uptexdir/uptftopl.ch
155 uptexdir/COPYRIGHT.jis \
159 uptex_tests = uptexdir/uptriptest.test
160 uptexdir/uptriptest.log: uptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
162 uptexdir/upbibtex.test \
163 uptexdir/updvitype.test \
164 uptexdir/uppltotf.test \
165 uptexdir/uptftopl.test \
166 uptexdir/yokotate.test
167 uptexdir/upbibtex.log: upbibtex$(EXEEXT)
168 uptexdir/updvitype.log: updvitype$(EXEEXT)
169 uptexdir/uppltotf.log: uppltotf$(EXEEXT)
170 uptexdir/uptftopl.log: uptftopl$(EXEEXT)
171 uptexdir/yokotate.log: uppltotf$(EXEEXT) uptftopl$(EXEEXT)
173 EXTRA_DIST += $(uptex_tests) $(upweb_tests)
174 DISTCLEANFILES += $(upweb_programs:=.c) $(upweb_programs:=.h) \
175 $(upweb_programs:=.p) $(upweb_programs:=-web2c) $(upweb_programs:=.web)
178 TESTS += $(uptex_tests)
179 TRIPTRAP += uptrip.diffs
180 TRIPTRAP_CLEAN += uptrip-clean
183 TESTS += $(upweb_tests)
186 ## Test data and results
188 ## uptexdir/upbibtex.test
189 DISTCLEANFILES += uptests/xexampl.aux uptests/xexampl.bbl uptests/xexampl.blg
190 ## uptexdir/updvitype.test
191 DISTCLEANFILES += uptests/xstory.dvityp uptests/xpagenum.typ
192 ## uptexdir/uppltotf.test
193 DISTCLEANFILES += uptests/xcmr10.tfm
194 ## uptexdir/uptftopl.test
195 DISTCLEANFILES += uptests/xcmr10.pl
196 ## uptexdir/yokotate.test
197 EXTRA_DIST += uptexdir/tests/min10.pl uptexdir/tests/min10.tfm
198 EXTRA_DIST += uptexdir/tests/tmin10.pl uptexdir/tests/tmin10.tfm
199 DISTCLEANFILES += uptests/x*min10.*
200 ## uptexdir/uptriptest
201 EXTRA_DIST += uptexdir/uptrip/uptrip.diffs uptexdir/uptrip/texmf.cnf
202 uptrip.diffs: uptex$(EXEEXT) dvitype$(EXEEXT) pltotf$(EXEEXT) tftopl$(EXEEXT)
208 DISTCLEANFILES += uptrip.diffs