summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/eptexdir/am
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2011-01-11 09:59:29 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2011-01-11 09:59:29 +0000
commit6a5931718d979097496483a8b84e30efa2898209 (patch)
tree8e4e0802b3dd57124dda7d67030127eca9094f2d /Build/source/texk/web2c/eptexdir/am
parent96c90b42cd3981758216b4b09e03beb56a409516 (diff)
add e-pTeX to build system
towards e-pTeX git-svn-id: svn://tug.org/texlive/trunk@21027 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk/web2c/eptexdir/am')
-rw-r--r--Build/source/texk/web2c/eptexdir/am/eptex.am77
1 files changed, 77 insertions, 0 deletions
diff --git a/Build/source/texk/web2c/eptexdir/am/eptex.am b/Build/source/texk/web2c/eptexdir/am/eptex.am
new file mode 100644
index 00000000000..efcd7eac075
--- /dev/null
+++ b/Build/source/texk/web2c/eptexdir/am/eptex.am
@@ -0,0 +1,77 @@
+## 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
+
+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: ptexdir/ptex-base.ch
+ $(MKDIR_P) eptexdir
+ grep "^@d TeX_banner=='This is pTeX" $(srcdir)/ptexdir/ptex-base.ch \
+ | 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 \
+ tex.ch
+
+# Generate eptex.ch
+eptex.ch: tie$(EXEEXT) eptex.web $(eptex_ch_srcs)
+ $(tie) -c eptex.ch eptex.web $(eptex_ch_srcs)
+eptex_ch_srcs = \
+ ptexdir/ptex-base.ch \
+ eptexdir/etex.ch1 \
+ 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
+