summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/am/libluatex.am
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/am/libluatex.am')
-rw-r--r--Build/source/texk/web2c/luatexdir/am/libluatex.am47
1 files changed, 31 insertions, 16 deletions
diff --git a/Build/source/texk/web2c/luatexdir/am/libluatex.am b/Build/source/texk/web2c/luatexdir/am/libluatex.am
index 05247a2ab55..8bf1148d334 100644
--- a/Build/source/texk/web2c/luatexdir/am/libluatex.am
+++ b/Build/source/texk/web2c/luatexdir/am/libluatex.am
@@ -206,22 +206,6 @@ libluatex_a_SOURCES += \
luatexdir/lua/luagen.h \
luatexdir/lua/luatex-api.h
-##**********************************************************************
-
-luatex_luascripts_txt2zlib = $(TXTTOZLIB)
-
-pdflua.c: txt2zlib$(EXEEXT) luatexdir/luascripts/pdflua.lua
- $(luatex_luascripts_txt2zlib) $(srcdir)/luatexdir/luascripts/pdflua.lua pdflua.c
-
-nodist_libluatex_a_SOURCES += pdflua.c
-
-libluatex_a_SOURCES += \
- luatexdir/luascripts/pdflua.h
-
-EXTRA_DIST += luatexdir/luascripts/pdflua.lua
-
-##**********************************************************************
-
## from luatexdir/pdf
##
luatex_pdf_ctangle = CWEBINPUTS=$(srcdir)/luatexdir/pdf $(ctangle)
@@ -314,6 +298,37 @@ libluatex_a_SOURCES += \
luatexdir/pdf/pdftypes.h \
luatexdir/pdf/pdfxform.h
+## from luatexdir/scripts
+##
+luatex_luascripts_ctangle = CWEBINPUTS=$(srcdir)/luatexdir/luascripts $(ctangle)
+
+txt2zlib.c: ctangle$(EXEEXT) luatexdir/luascripts/txt2zlib.w
+ $(luatex_luascripts_ctangle) txt2zlib.w
+
+libluatex_web += \
+ luatexdir/luascripts/pdflua.c \
+ luatexdir/luascripts/pdflua.lua \
+ luatexdir/luascripts/txt2zlib.w
+
+## We normaly use the auxiliary program txt2zlib to create pdflua.c
+## from luatexdir/luascripts/pdflua.lua. When cross compiling we
+## use instead the distributed luatexdir/luascripts/pdflua.c.
+if cross
+pdflua.c: luatexdir/luascripts/pdflua.c
+ rm -f pdflua.c
+ $(LN_S) $(srcdir)/luatexdir/luascripts/pdflua.c pdflua.c
+else !cross
+pdflua.c: txt2zlib$(EXEEXT) luatexdir/luascripts/pdflua.lua
+ ./txt2zlib $(srcdir)/luatexdir/luascripts/pdflua.lua pdflua.c
+ cmp -s pdflua.c $(srcdir)/luatexdir/luascripts/pdflua.c || \
+ cp -f pdflua.c $(srcdir)/luatexdir/luascripts/pdflua.c
+endif !cross
+
+nodist_libluatex_a_SOURCES += pdflua.c
+
+libluatex_a_SOURCES += \
+ luatexdir/luascripts/pdflua.h
+
## from luatexdir/tex
##
luatex_tex_ctangle = CWEBINPUTS=$(srcdir)/luatexdir/tex $(ctangle)