| 1 |
## $Id: Makefile.am 77088 2025-12-13 09:43:39Z kakuto $ |
| 2 |
## Makefile.am for the TeX Live subdirectory texk/web2c/. |
| 3 |
## |
| 4 |
## Copyright 2017-2024 Karl Berry <[email protected]> |
| 5 |
## Copyright 2009-2015 Peter Breitenlohner <[email protected]> |
| 6 |
## You may freely use, modify and/or distribute this file. |
| 7 |
## |
| 8 |
AM_CPPFLAGS = $(KPATHSEA_INCLUDES) |
| 9 |
## Not yet for C++ and ObjC++ (too many warnings) |
| 10 |
AM_CFLAGS = $(WARNING_CFLAGS) |
| 11 |
AM_CXXFLAGS = ## $(WARNING_CXXFLAGS) |
| 12 |
AM_OBJCXXFLAGS = ## $(WARNING_OBJCXXFLAGS) |
| 13 |
|
| 14 |
version = $(WEB2CVERSION) |
| 15 |
|
| 16 |
SUBDIRS = doc lib man web2c . window omegafonts otps |
| 17 |
|
| 18 |
proglib = lib/lib.a |
| 19 |
|
| 20 |
## Below we will add to these |
| 21 |
EXTRA_PROGRAMS = |
| 22 |
EXTRA_LIBRARIES = |
| 23 |
EXTRA_LTLIBRARIES = |
| 24 |
bin_PROGRAMS = |
| 25 |
lib_LIBRARIES = |
| 26 |
lib_LTLIBRARIES = |
| 27 |
noinst_PROGRAMS = |
| 28 |
dist_man_MANS = |
| 29 |
nodist_man_MANS = |
| 30 |
TEST_EXTENSIONS = .pl .test |
| 31 |
TESTS = |
| 32 |
EXTRA_DIST = PROJECTS cftests cpascal.h help.h w2c/config.h |
| 33 |
DISTCLEANFILES = CXXLD.sh |
| 34 |
CLEANFILES = $(EXTRA_PROGRAMS) $(EXTRA_LIBRARIES) $(EXTRA_LTLIBRARIES) |
| 35 |
TRIPTRAP_CLEAN = |
| 36 |
TRIPTRAP = |
| 37 |
bin_links = |
| 38 |
install_exe_links = |
| 39 |
uninstall_exe_links = |
| 40 |
|
| 41 |
# Files not to be distributed |
| 42 |
include $(srcdir)/../../am/dist_hook.am |
| 43 |
|
| 44 |
## The sh script that does the conversion. |
| 45 |
web2c = AM_V_P=$(AM_V_P) $(SHELL) ./web2c-sh $@ |
| 46 |
|
| 47 |
## We put this in the web2c directory because it runs on the build system, it |
| 48 |
## is separate from (and simpler than) the actual web-to-C conversion programs. |
| 49 |
makecpool = $(AM_V_GEN)web2c/makecpool |
| 50 |
|
| 51 |
# Additional dependencies: |
| 52 |
web2c_common = web2c/convert web2c/common.defines |
| 53 |
# When cross-compiling, EXEEXT for the build and hosts system may differ. |
| 54 |
# Thus we depend on the auxiliary files web2c/stamp-*. |
| 55 |
web2c_stamps = web2c/stamp-fixwrites web2c/stamp-splitup web2c/stamp-web2c |
| 56 |
makecpool_stamp = web2c/stamp-makecpool |
| 57 |
web2c_depend = $(web2c_common) $(web2c_stamps) web2c-sh |
| 58 |
web2c_texmf = $(web2c_depend) web2c/texmf.defines web2c/coerce.h |
| 59 |
|
| 60 |
# This is right for most Web2C programs |
| 61 |
LDADD = $(proglib) $(KPATHSEA_LIBS) |
| 62 |
# Automake automatically uses $(proglib)=lib/lib.a as dependency. |
| 63 |
# This does not work for the configure substitution $(KPATHSEA_LIBS), |
| 64 |
# thus we must explicitly use these $(default_dependencies) for |
| 65 |
# programs that do not depend on tangle or ctangle. |
| 66 |
default_dependencies = $(proglib) $(KPATHSEA_DEPEND) |
| 67 |
|
| 68 |
# Rebuild Web2C programs |
| 69 |
web2c/stamp-fixwrites: $(web2c_common) ${srcdir}/web2c/*.[chly] |
| 70 |
cd web2c && $(MAKE) $(AM_MAKEFLAGS) stamp-fixwrites |
| 71 |
touch $@ |
| 72 |
web2c/stamp-splitup: $(web2c_common) ${srcdir}/web2c/*.[chly] |
| 73 |
cd web2c && $(MAKE) $(AM_MAKEFLAGS) stamp-splitup |
| 74 |
touch $@ |
| 75 |
web2c/stamp-web2c: $(web2c_common) ${srcdir}/web2c/*.[chly] |
| 76 |
cd web2c && $(MAKE) $(AM_MAKEFLAGS) stamp-web2c |
| 77 |
touch $@ |
| 78 |
web2c/stamp-makecpool: $(web2c_common) ${srcdir}/web2c/makecpool.c |
| 79 |
cd web2c && $(MAKE) $(AM_MAKEFLAGS) stamp-makecpool |
| 80 |
|
| 81 |
# Rebuild $(proglib). We have to list all the sources, |
| 82 |
# not use *.c, because texmfmp.c is not part of lib.a. |
| 83 |
# Otherwise make will think that lib.a will need to be remade when |
| 84 |
# texmfmp.c is changed, even though it doesn't. The result is that we |
| 85 |
# will see the ctangle calls for every cweb program, since ctangleboot |
| 86 |
# depends on lib.a, but isn't getting remade. So this ad hoc variable is |
| 87 |
# a copy of lib_a_SOURCES in lib/Makefile.am, with "${srcdir}/lib/" prepended. |
| 88 |
proglib_sources = \ |
| 89 |
${srcdir}/lib/basechsuffix.c \ |
| 90 |
${srcdir}/lib/chartostring.c \ |
| 91 |
${srcdir}/lib/coredump.c \ |
| 92 |
${srcdir}/lib/eofeoln.c \ |
| 93 |
${srcdir}/lib/fprintreal.c \ |
| 94 |
${srcdir}/lib/inputint.c \ |
| 95 |
${srcdir}/lib/input2int.c \ |
| 96 |
${srcdir}/lib/lib.h \ |
| 97 |
${srcdir}/lib/main.c \ |
| 98 |
${srcdir}/lib/openclose.c \ |
| 99 |
${srcdir}/lib/printversion.c \ |
| 100 |
${srcdir}/lib/setupvar.c \ |
| 101 |
${srcdir}/lib/uexit.c \ |
| 102 |
${srcdir}/lib/usage.c \ |
| 103 |
${srcdir}/lib/version.c \ |
| 104 |
${srcdir}/lib/zround.c |
| 105 |
|
| 106 |
$(proglib): $(proglib_sources) |
| 107 |
cd lib && $(MAKE) $(AM_MAKEFLAGS) lib.a |
| 108 |
## Rebuild libkpathsea |
| 109 |
@KPATHSEA_RULE@ |
| 110 |
## Rebuild libptexenc |
| 111 |
@PTEXENC_RULE@ |
| 112 |
## Rebuild libz |
| 113 |
@ZLIB_RULE@ |
| 114 |
## Rebuild liblua52 |
| 115 |
@LUA52_RULE@ |
| 116 |
## Rebuild liblua53 |
| 117 |
@LUA53_RULE@ |
| 118 |
## Rebuild libluajit |
| 119 |
@LUAJIT_RULE@ |
| 120 |
## Rebuild libpng |
| 121 |
@LIBPNG_RULE@ |
| 122 |
## Rebuild libfreetype |
| 123 |
@FREETYPE2_RULE@ |
| 124 |
## Rebuild libpixman |
| 125 |
@PIXMAN_RULE@ |
| 126 |
## Rebuild libcairo |
| 127 |
@CAIRO_RULE@ |
| 128 |
## Rebuild libpotrace |
| 129 |
@POTRACE_RULE@ |
| 130 |
## Rebuild libgmp |
| 131 |
@GMP_RULE@ |
| 132 |
## Rebuild libmpfr |
| 133 |
@MPFR_RULE@ |
| 134 |
## Rebuild libmpfi |
| 135 |
@MPFI_RULE@ |
| 136 |
## Rebuild libxpdf |
| 137 |
@XPDF_RULE@ |
| 138 |
## Rebuild pplib |
| 139 |
@PPLIB_RULE@ |
| 140 |
## Rebuild libzzip |
| 141 |
@ZZIPLIB_RULE@ |
| 142 |
## Rebuild libTEXkit |
| 143 |
@TECKIT_RULE@ |
| 144 |
## Rebuild libsicuxxx |
| 145 |
@ICU_RULE@ |
| 146 |
## Rebuild libharfbuzz |
| 147 |
@HARFBUZZ_RULE@ |
| 148 |
## Rebuild libgraphite2 |
| 149 |
@GRAPHITE2_RULE@ |
| 150 |
|
| 151 |
# The environment for building. |
| 152 |
buildenv = TEXMFCNF=$(srcdir)/../kpathsea |
| 153 |
|
| 154 |
# Calling tangle & Co. |
| 155 |
tangle = $(tangle_silent)WEBINPUTS=.:$(srcdir) $(buildenv) $(TANGLE) |
| 156 |
tangleboot = $(tangle_silent)WEBINPUTS=.:$(srcdir) $(buildenv) $(TANGLEBOOT) |
| 157 |
tangle_silent = $(tangle_silent_@AM_V@) |
| 158 |
tangle_silent_ = $(tangle_silent_@AM_DEFAULT_V@) |
| 159 |
tangle_silent_0 = @echo " TANGLE " $@; $(SHELL) ./silent-sh $@ # |
| 160 |
tangle_silent_1 = |
| 161 |
# |
| 162 |
ctangle = $(buildenv) $(CTANGLE) |
| 163 |
ctangle_silent = $(ctangle_silent_@AM_V@) |
| 164 |
ctangle_silent_ = $(ctangle_silent_@AM_DEFAULT_V@) |
| 165 |
ctangle_silent_0 = @echo " CTANGLE " $@; $(SHELL) ./silent-sh $@ # |
| 166 |
ctangle_silent_1 = |
| 167 |
# |
| 168 |
tie = $(tie_silent)WEBINPUTS=.:$(srcdir) $(buildenv) $(TIE) |
| 169 |
tie_silent = $(tie_silent_@AM_V@) |
| 170 |
tie_silent_ = $(tie_silent_@AM_DEFAULT_V@) |
| 171 |
tie_silent_0 = @echo " TIE " $@; $(SHELL) ./silent-sh $@ # |
| 172 |
tie_silent_1 = |
| 173 |
tie_c = $(tie) -c $@ |
| 174 |
tie_m = $(tie) -m $@ |
| 175 |
|
| 176 |
# Calling tangle & Co. via tangle-sh (several output files) |
| 177 |
texmf_tangle = WEBINPUTS=.:$(srcdir) AM_V_P=$(AM_V_P) $(SHELL) ./tangle-sh $@ $(TANGLE) |
| 178 |
|
| 179 |
# For trip, trap, and other tests |
| 180 |
DIFF = diff |
| 181 |
DIFFFLAGS = |
| 182 |
AM_TESTS_ENVIRONMENT = abs_srcdir=$(abs_srcdir); export abs_srcdir; |
| 183 |
AM_TESTS_ENVIRONMENT += DIFF='$(DIFF)'; export DIFF; |
| 184 |
AM_TESTS_ENVIRONMENT += DIFFFLAGS='$(DIFFFLAGS)'; export DIFFFLAGS; |
| 185 |
AM_TESTS_ENVIRONMENT += LN_S='$(LN_S)'; export LN_S; |
| 186 |
AM_TESTS_ENVIRONMENT += KPSEWHICH='$(KPSEWHICH)'; export KPSEWHICH; |
| 187 |
|
| 188 |
# To run, e.g., just the original trip test, in the build directory: |
| 189 |
# make -C $ww TRIPTRAP=trip.diffs triptrap |
| 190 |
# where $ww is the web2c build directory. |
| 191 |
# |
| 192 |
# This will run the triptrap-sh script |
| 193 |
# which then runs make TEST=triptest.test check-am, |
| 194 |
# which then runs the (srcdir file) triptest.test script; |
| 195 |
# its output will be in (builddir file) trip.diffs, |
| 196 |
# and triptest.out if the test failed, |
| 197 |
# plus various created files in the tripdir/ subdirectory. |
| 198 |
# The triptest.diffs file will have the actual abs_srcdir value replaced |
| 199 |
# with the constant string "SRCDIR" to minimize differences, and "../" |
| 200 |
# replaced with "./" to match the canonical output. Confusing. For the |
| 201 |
# real output, see triptest.log. |
| 202 |
# |
| 203 |
# To build only tex, make -C $ww tex (i.e., in builddir) should do it. |
| 204 |
# Unfortunately the check-am target depends on all-am, so all engines |
| 205 |
# are built before any tests are run. If this is a problem, just have to |
| 206 |
# edit the generated Makefile in builddir to remove the dependency. |
| 207 |
# |
| 208 |
# Other per-engine invocations (see triptrap-sh for complete list): |
| 209 |
# make -C $ww mf && make -C $ww TRIPTRAP=mftrap.diffs triptrap |
| 210 |
# make -C $ww etex && make -C $ww TRIPTRAP=etrip.diffs triptrap |
| 211 |
# make -C $ww ptex && make -C $ww TRIPTRAP=ptrip.diffs triptrap |
| 212 |
# |
| 213 |
triptrap_diffs = $(AM_V_GEN)srcdir=$(srcdir) abs_srcdir=$(abs_srcdir) MAKE=$(MAKE) $(SHELL) $(srcdir)/triptrap-sh |
| 214 |
|
| 215 |
.PHONY: triptrap |
| 216 |
triptrap: |
| 217 |
$(triptrap_diffs) $(TRIPTRAP) |
| 218 |
EXTRA_DIST += triptrap-sh |
| 219 |
|
| 220 |
clean-local: triptrap-clean |
| 221 |
.PHONY: triptrap-clean |
| 222 |
triptrap-clean: $(TRIPTRAP_CLEAN) |
| 223 |
|
| 224 |
# The environment for making dumps. |
| 225 |
# No need to specify TEXMF, as ../kpathsea/texmf.cnf should contain |
| 226 |
# suitable absolute paths at this point. Those are converted to |
| 227 |
# SELFAUTO* paths on installation. |
| 228 |
dumpenv = TEXMFCNF=../kpathsea |
| 229 |
|
| 230 |
## ################################ |
| 231 |
|
| 232 |
## Prevent Make from deleting the intermediate forms. |
| 233 |
.PRECIOUS: %.ch %.p %.c |
| 234 |
|
| 235 |
## ################################ |
| 236 |
|
| 237 |
## tangle and ctangle |
| 238 |
include $(srcdir)/am/bootstrap.am |
| 239 |
|
| 240 |
## normal web programs (except tangle) |
| 241 |
include $(srcdir)/am/web.am |
| 242 |
|
| 243 |
## normal cweb programs (except ctangle) |
| 244 |
include $(srcdir)/am/cweb.am |
| 245 |
|
| 246 |
## TeX and MF |
| 247 |
include $(srcdir)/am/texmf.am |
| 248 |
|
| 249 |
## MFLua |
| 250 |
include $(srcdir)/mfluadir/am/mflua.am |
| 251 |
include $(srcdir)/mfluadir/am/mfluaotfcc.am |
| 252 |
include $(srcdir)/mfluadir/am/mfluapotrace.am |
| 253 |
include $(srcdir)/mfluadir/am/mflualpeg.am |
| 254 |
|
| 255 |
## MFLuaJIT |
| 256 |
include $(srcdir)/mfluajitdir/am/mfluajit.am |
| 257 |
include $(srcdir)/mfluajitdir/am/mfluajitlpeg.am |
| 258 |
|
| 259 |
## MetaPost |
| 260 |
include $(srcdir)/mplibdir/am/mplib.am |
| 261 |
|
| 262 |
## pMetaPost and upMetaPost |
| 263 |
include $(srcdir)/pmpostdir/am/pmpost.am |
| 264 |
|
| 265 |
## libmputil, libmplib, used by MetaPost and luaTeX |
| 266 |
include $(srcdir)/mplibdir/am/libmputil.am |
| 267 |
include $(srcdir)/mplibdir/am/libmplib.am |
| 268 |
|
| 269 |
## e-TeX |
| 270 |
include $(srcdir)/etexdir/am/etex.am |
| 271 |
|
| 272 |
## upTeX |
| 273 |
include $(srcdir)/uptexdir/am/uptex.am |
| 274 |
|
| 275 |
## e-upTeX |
| 276 |
include $(srcdir)/euptexdir/am/euptex.am |
| 277 |
|
| 278 |
## hiTeX |
| 279 |
include $(srcdir)/hitexdir/am/hitex.am |
| 280 |
|
| 281 |
## pdfTeX |
| 282 |
include $(srcdir)/pdftexdir/am/libpdftex.am |
| 283 |
include $(srcdir)/pdftexdir/am/pdftex.am |
| 284 |
include $(srcdir)/pdftexdir/am/ttf2afm.am |
| 285 |
include $(srcdir)/pdftexdir/am/pdftosrc.am |
| 286 |
|
| 287 |
## luaTeX |
| 288 |
include $(srcdir)/luatexdir/am/luasocket.am |
| 289 |
include $(srcdir)/luatexdir/am/luamisc.am |
| 290 |
include $(srcdir)/luatexdir/am/libunilib.am |
| 291 |
include $(srcdir)/luatexdir/am/luafontforge.am |
| 292 |
include $(srcdir)/luatexdir/am/libluatex.am |
| 293 |
include $(srcdir)/luatexdir/am/luaffi.am |
| 294 |
include $(srcdir)/luatexdir/am/luatex.am |
| 295 |
|
| 296 |
## luahbTeX |
| 297 |
include $(srcdir)/luatexdir/am/luaharfbuzz.am |
| 298 |
|
| 299 |
include $(srcdir)/luatexdir/am/luaharfbuzzsubset.am |
| 300 |
|
| 301 |
## texprof |
| 302 |
include $(srcdir)/texprofdir/am/texprof.am |
| 303 |
|
| 304 |
## XeTeX |
| 305 |
include $(srcdir)/xetexdir/am/xetex.am |
| 306 |
|
| 307 |
## omegaware web programs |
| 308 |
include $(srcdir)/omegaware/am/omegaware.am |
| 309 |
|
| 310 |
## Aleph |
| 311 |
include $(srcdir)/alephdir/am/aleph.am |
| 312 |
|
| 313 |
## SyncTeX, must come after all TeX-like engines |
| 314 |
include $(srcdir)/synctexdir/am/synctex.am |
| 315 |
|
| 316 |
## libmd5 |
| 317 |
include $(srcdir)/libmd5/am/md5.am |
| 318 |
|
| 319 |
## Symlinks within $(bindir) |
| 320 |
include $(srcdir)/../../am/bin_links.am |
| 321 |
install-exec-hook: install-bin-links $(install_exe_links) |
| 322 |
uninstall-hook: uninstall-bin-links $(uninstall_exe_links) |
| 323 |
|