## texk/web2c/luatexdir/am/libluatex.am: Makefile fragment for libluatex.
##
## Copyright (C) 2009-2013 Peter Breitenlohner <tex-live@tug.org>
## You may freely use, modify and/or distribute this file.

## libluatex
##
EXTRA_LIBRARIES += libluatex.a

libluatex_a_DEPENDENCIES = libff.a

libluatex_a_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_INCLUDES) $(LIBPNG_INCLUDES)
libluatex_a_CPPFLAGS += $(POPPLER_INCLUDES) -I$(srcdir)/libmd5
libluatex_a_CPPFLAGS += -DpdfTeX -I$(srcdir)/luatexdir
libluatex_a_CPPFLAGS += $(LUA_INCLUDES)
libluatex_a_CPPFLAGS += -DSYNCTEX_ENGINE_H='<synctex-luatex.h>' -I$(srcdir)/synctexdir
libluatex_a_CXXFLAGS = # $(WARNING_CXXFLAGS)

## from luatexdir
##
libluatex_web =

nodist_libluatex_a_SOURCES =

libluatex_a_SOURCES = \
	luatexdir/luatexcallbackids.h \
	luatexdir/luatex.h \
	luatexdir/luatex-common.h \
	luatexdir/ptexlib.h

## from luatexdir/dvi
##
luatex_dvi_ctangle = $(ctangle_silent)CWEBINPUTS=$(srcdir)/luatexdir/dvi $(ctangle)

dvigen.c: ctangle$(EXEEXT) luatexdir/dvi/dvigen.w
	$(luatex_dvi_ctangle) dvigen.w

libluatex_web += luatexdir/dvi/dvigen.w

nodist_libluatex_a_SOURCES += dvigen.c

libluatex_a_SOURCES += \
	luatexdir/dvi/dvigen.h

## from luatexdir/font
##
luatex_font_ctangle = $(ctangle_silent)CWEBINPUTS=$(srcdir)/luatexdir/font $(ctangle)

dofont.c: ctangle$(EXEEXT) luatexdir/font/dofont.w
	$(luatex_font_ctangle) dofont.w
luafont.c: ctangle$(EXEEXT) luatexdir/font/luafont.w
	$(luatex_font_ctangle) luafont.w
mapfile.c: ctangle$(EXEEXT) luatexdir/font/mapfile.w
	$(luatex_font_ctangle) mapfile.w
pkin.c: ctangle$(EXEEXT) luatexdir/font/pkin.w
	$(luatex_font_ctangle) pkin.w
sfnt.c: ctangle$(EXEEXT) luatexdir/font/sfnt.w
	$(luatex_font_ctangle) sfnt.w
subfont.c: ctangle$(EXEEXT) luatexdir/font/subfont.w
	$(luatex_font_ctangle) subfont.w
texfont.c: ctangle$(EXEEXT) luatexdir/font/texfont.w
	$(luatex_font_ctangle) texfont.w
tfmofm.c: ctangle$(EXEEXT) luatexdir/font/tfmofm.w
	$(luatex_font_ctangle) tfmofm.w
tounicode.c: ctangle$(EXEEXT) luatexdir/font/tounicode.w
	$(luatex_font_ctangle) tounicode.w
tt_glyf.c: ctangle$(EXEEXT) luatexdir/font/tt_glyf.w
	$(luatex_font_ctangle) tt_glyf.w
tt_table.c: ctangle$(EXEEXT) luatexdir/font/tt_table.w
	$(luatex_font_ctangle) tt_table.w
vfovf.c: ctangle$(EXEEXT) luatexdir/font/vfovf.w
	$(luatex_font_ctangle) vfovf.w
vfpacket.c: ctangle$(EXEEXT) luatexdir/font/vfpacket.w
	$(luatex_font_ctangle) vfpacket.w
writecff.c: ctangle$(EXEEXT) luatexdir/font/writecff.w
	$(luatex_font_ctangle) writecff.w
writeenc.c: ctangle$(EXEEXT) luatexdir/font/writeenc.w
	$(luatex_font_ctangle) writeenc.w
writefont.c: ctangle$(EXEEXT) luatexdir/font/writefont.w
	$(luatex_font_ctangle) writefont.w
writet1.c: ctangle$(EXEEXT) luatexdir/font/writet1.w
	$(luatex_font_ctangle) writet1.w
writet3.c: ctangle$(EXEEXT) luatexdir/font/writet3.w
	$(luatex_font_ctangle) writet3.w
writettf.c: ctangle$(EXEEXT) luatexdir/font/writettf.w
	$(luatex_font_ctangle) writettf.w
writetype0.c: ctangle$(EXEEXT) luatexdir/font/writetype0.w
	$(luatex_font_ctangle) writetype0.w
writetype2.c: ctangle$(EXEEXT) luatexdir/font/writetype2.w
	$(luatex_font_ctangle) writetype2.w

libluatex_web += luatexdir/font/dofont.w luatexdir/font/luafont.w luatexdir/font/mapfile.w
libluatex_web += luatexdir/font/pkin.w luatexdir/font/sfnt.w luatexdir/font/subfont.w
libluatex_web += luatexdir/font/texfont.w luatexdir/font/tfmofm.w
libluatex_web += luatexdir/font/tounicode.w luatexdir/font/tt_glyf.w
libluatex_web += luatexdir/font/tt_table.w luatexdir/font/vfovf.w
libluatex_web += luatexdir/font/vfpacket.w luatexdir/font/writecff.w
libluatex_web += luatexdir/font/writeenc.w luatexdir/font/writefont.w
libluatex_web += luatexdir/font/writet1.w luatexdir/font/writet3.w
libluatex_web += luatexdir/font/writettf.w luatexdir/font/writetype0.w
libluatex_web += luatexdir/font/writetype2.w

nodist_libluatex_a_SOURCES += dofont.c luafont.c mapfile.c pkin.c sfnt.c subfont.c
nodist_libluatex_a_SOURCES += texfont.c tfmofm.c tounicode.c tt_glyf.c tt_table.c vfovf.c vfpacket.c
nodist_libluatex_a_SOURCES += writecff.c writeenc.c writefont.c writet1.c writet3.c writettf.c
nodist_libluatex_a_SOURCES += writetype0.c writetype2.c

libluatex_a_SOURCES += \
	luatexdir/font/luatexfont.h \
	luatexdir/font/mapfile.h \
	luatexdir/font/sfnt.h \
	luatexdir/font/texfont.h \
	luatexdir/font/tt_glyf.h \
	luatexdir/font/tt_table.h \
	luatexdir/font/writecff.h \
	luatexdir/font/writettf.h

## from luatexdir/image
##
luatex_image_ctangle = $(ctangle_silent)CWEBINPUTS=$(srcdir)/luatexdir/image $(ctangle)

writeimg.c: ctangle$(EXEEXT) luatexdir/image/writeimg.w
	$(luatex_image_ctangle) writeimg.w
writejbig2.c: ctangle$(EXEEXT) luatexdir/image/writejbig2.w
	$(luatex_image_ctangle) writejbig2.w
writejpg.c: ctangle$(EXEEXT) luatexdir/image/writejpg.w
	$(luatex_image_ctangle) writejpg.w
writejp2.c: ctangle$(EXEEXT) luatexdir/image/writejp2.w
	$(luatex_image_ctangle) writejp2.w
writepng.c: ctangle$(EXEEXT) luatexdir/image/writepng.w
	$(luatex_image_ctangle) writepng.w
pdftoepdf.cc: ctangle$(EXEEXT) luatexdir/image/pdftoepdf.w
	$(luatex_image_ctangle) pdftoepdf.w - $@

libluatex_web += luatexdir/image/writeimg.w
libluatex_web += luatexdir/image/writejbig2.w
libluatex_web += luatexdir/image/writejpg.w
libluatex_web += luatexdir/image/writejp2.w
libluatex_web += luatexdir/image/writepng.w
libluatex_web += luatexdir/image/pdftoepdf.w

nodist_libluatex_a_SOURCES += writeimg.c writejbig2.c writejpg.c writejp2.c writepng.c pdftoepdf.cc

libluatex_a_SOURCES += \
	luatexdir/image/epdf.h \
	luatexdir/image/image.h \
	luatexdir/image/pdftoepdf.h \
	luatexdir/image/writeimg.h \
	luatexdir/image/writejbig2.h \
	luatexdir/image/writejpg.h \
	luatexdir/image/writejp2.h \
	luatexdir/image/writepng.h

## from luatexdir/lang
##
luatex_lang_ctangle = $(ctangle_silent)CWEBINPUTS=$(srcdir)/luatexdir/lang $(ctangle)

hnjalloc.c: ctangle$(EXEEXT) luatexdir/lang/hnjalloc.w
	$(luatex_lang_ctangle) hnjalloc.w
hyphen.c: ctangle$(EXEEXT) luatexdir/lang/hyphen.w
	$(luatex_lang_ctangle) hyphen.w
texlang.c: ctangle$(EXEEXT) luatexdir/lang/texlang.w
	$(luatex_lang_ctangle) texlang.w

libluatex_web += luatexdir/lang/texlang.w luatexdir/lang/hyphen.w luatexdir/lang/hnjalloc.w

nodist_libluatex_a_SOURCES += texlang.c hyphen.c hnjalloc.c

libluatex_a_SOURCES += \
	luatexdir/lang/hnjalloc.h \
	luatexdir/lang/hyphen.h \
	luatexdir/lang/texlang.h

## from luatexdir/lua
##
luatex_lua_ctangle = $(ctangle_silent)CWEBINPUTS=$(srcdir)/luatexdir/lua $(ctangle)

luagen.c: ctangle$(EXEEXT) luatexdir/lua/luagen.w
	$(luatex_lua_ctangle) luagen.w
luainit.c: ctangle$(EXEEXT) luatexdir/lua/luainit.w
	$(luatex_lua_ctangle) luainit.w
luanode.c: ctangle$(EXEEXT) luatexdir/lua/luanode.w
	$(luatex_lua_ctangle) luanode.w
luastuff.c: ctangle$(EXEEXT) luatexdir/lua/luastuff.w
	$(luatex_lua_ctangle) luastuff.w
luatoken.c: ctangle$(EXEEXT) luatexdir/lua/luatoken.w
	$(luatex_lua_ctangle) luatoken.w
texluac.c: ctangle$(EXEEXT) luatexdir/lua/texluac.w
	$(luatex_lua_ctangle) texluac.w

libluatex_web += luatexdir/lua/luagen.w luatexdir/lua/luainit.w luatexdir/lua/luanode.w 
libluatex_web += luatexdir/lua/luastuff.w luatexdir/lua/luatoken.w luatexdir/lua/texluac.w

nodist_libluatex_a_SOURCES += luagen.c luainit.c luanode.c luastuff.c luatoken.c texluac.c

libluatex_a_SOURCES += \
	luatexdir/lua/lcallbacklib.c \
	luatexdir/lua/lfontlib.c \
	luatexdir/lua/limglib.c \
	luatexdir/lua/lpdfscannerlib.cc \
	luatexdir/lua/lepdflib.cc \
	luatexdir/lua/lkpselib.c \
	luatexdir/lua/llanglib.c \
	luatexdir/lua/llualib.c \
	luatexdir/lua/llfslibext.c \
	luatexdir/lua/lnodelib.c \
	luatexdir/lua/liolibext.c \
	luatexdir/lua/loslibext.c \
	luatexdir/lua/lstrlibext.c \
	luatexdir/lua/lpdflib.c \
	luatexdir/lua/lstatslib.c \
	luatexdir/lua/ltexiolib.c \
	luatexdir/lua/ltexlib.c \
	luatexdir/lua/ltokenlib.c \
	luatexdir/lua/luagen.h \
	luatexdir/lua/luatex-api.h

## from luatexdir/pdf
##
luatex_pdf_ctangle = $(ctangle_silent)CWEBINPUTS=$(srcdir)/luatexdir/pdf $(ctangle)

pdfpagetree.c: ctangle$(EXEEXT) luatexdir/pdf/pdfpagetree.w
	$(luatex_pdf_ctangle) pdfpagetree.w
pdfaction.c: ctangle$(EXEEXT) luatexdir/pdf/pdfaction.w
	$(luatex_pdf_ctangle) pdfaction.w
pdfannot.c: ctangle$(EXEEXT) luatexdir/pdf/pdfannot.w
	$(luatex_pdf_ctangle) pdfannot.w
pdfcolorstack.c: ctangle$(EXEEXT) luatexdir/pdf/pdfcolorstack.w
	$(luatex_pdf_ctangle) pdfcolorstack.w
pdfdest.c: ctangle$(EXEEXT) luatexdir/pdf/pdfdest.w
	$(luatex_pdf_ctangle) pdfdest.w
pdffont.c: ctangle$(EXEEXT) luatexdir/pdf/pdffont.w
	$(luatex_pdf_ctangle) pdffont.w
pdfgen.c: ctangle$(EXEEXT) luatexdir/pdf/pdfgen.w
	$(luatex_pdf_ctangle) pdfgen.w
pdfglyph.c: ctangle$(EXEEXT) luatexdir/pdf/pdfglyph.w
	$(luatex_pdf_ctangle) pdfglyph.w
pdfimage.c: ctangle$(EXEEXT) luatexdir/pdf/pdfimage.w
	$(luatex_pdf_ctangle) pdfimage.w
pdflink.c: ctangle$(EXEEXT) luatexdir/pdf/pdflink.w
	$(luatex_pdf_ctangle) pdflink.w
pdflistout.c: ctangle$(EXEEXT) luatexdir/pdf/pdflistout.w
	$(luatex_pdf_ctangle) pdflistout.w
pdfliteral.c: ctangle$(EXEEXT) luatexdir/pdf/pdfliteral.w
	$(luatex_pdf_ctangle) pdfliteral.w
pdfluaapi.c: ctangle$(EXEEXT) luatexdir/pdf/pdfluaapi.w
	$(luatex_pdf_ctangle) pdfluaapi.w
pdfobj.c: ctangle$(EXEEXT) luatexdir/pdf/pdfobj.w
	$(luatex_pdf_ctangle) pdfobj.w
pdfoutline.c: ctangle$(EXEEXT) luatexdir/pdf/pdfoutline.w
	$(luatex_pdf_ctangle) pdfoutline.w
pdfpage.c: ctangle$(EXEEXT) luatexdir/pdf/pdfpage.w
	$(luatex_pdf_ctangle) pdfpage.w
pdfrule.c: ctangle$(EXEEXT) luatexdir/pdf/pdfrule.w
	$(luatex_pdf_ctangle) pdfrule.w
pdfsaverestore.c: ctangle$(EXEEXT) luatexdir/pdf/pdfsaverestore.w
	$(luatex_pdf_ctangle) pdfsaverestore.w
pdfsetmatrix.c: ctangle$(EXEEXT) luatexdir/pdf/pdfsetmatrix.w
	$(luatex_pdf_ctangle) pdfsetmatrix.w
pdfshipout.c: ctangle$(EXEEXT) luatexdir/pdf/pdfshipout.w
	$(luatex_pdf_ctangle) pdfshipout.w
pdftables.c: ctangle$(EXEEXT) luatexdir/pdf/pdftables.w
	$(luatex_pdf_ctangle) pdftables.w
pdfthread.c: ctangle$(EXEEXT) luatexdir/pdf/pdfthread.w
	$(luatex_pdf_ctangle) pdfthread.w
pdfxform.c: ctangle$(EXEEXT) luatexdir/pdf/pdfxform.w
	$(luatex_pdf_ctangle) pdfxform.w

libluatex_web += luatexdir/pdf/pdfpagetree.w luatexdir/pdf/pdfaction.w luatexdir/pdf/pdfannot.w
libluatex_web += luatexdir/pdf/pdfcolorstack.w luatexdir/pdf/pdfdest.w
libluatex_web += luatexdir/pdf/pdffont.w luatexdir/pdf/pdfgen.w luatexdir/pdf/pdfglyph.w
libluatex_web += luatexdir/pdf/pdfimage.w luatexdir/pdf/pdflink.w luatexdir/pdf/pdflistout.w
libluatex_web += luatexdir/pdf/pdfliteral.w luatexdir/pdf/pdfluaapi.w luatexdir/pdf/pdfobj.w
libluatex_web += luatexdir/pdf/pdfoutline.w luatexdir/pdf/pdfpage.w luatexdir/pdf/pdfrule.w
libluatex_web += luatexdir/pdf/pdfsaverestore.w luatexdir/pdf/pdfsetmatrix.w
libluatex_web += luatexdir/pdf/pdfshipout.w luatexdir/pdf/pdftables.w
libluatex_web += luatexdir/pdf/pdfthread.w luatexdir/pdf/pdfxform.w

nodist_libluatex_a_SOURCES += pdfpagetree.c pdfaction.c pdfannot.c pdfcolorstack.c pdfdest.c pdffont.c
nodist_libluatex_a_SOURCES += pdfgen.c pdfglyph.c pdfimage.c pdflink.c pdflistout.c pdfliteral.c
nodist_libluatex_a_SOURCES += pdfluaapi.c pdfobj.c pdfoutline.c pdfpage.c pdfrule.c pdfsaverestore.c
nodist_libluatex_a_SOURCES += pdfsetmatrix.c pdfshipout.c pdftables.c pdfthread.c pdfxform.c

libluatex_a_SOURCES += \
	luatexdir/pdf/pdfpagetree.h \
	luatexdir/pdf/pdfaction.h \
	luatexdir/pdf/pdfannot.h \
	luatexdir/pdf/pdfcolorstack.h \
	luatexdir/pdf/pdfdest.h \
	luatexdir/pdf/pdffont.h \
	luatexdir/pdf/pdfgen.h \
	luatexdir/pdf/pdfglyph.h \
	luatexdir/pdf/pdfimage.h \
	luatexdir/pdf/pdflink.h \
	luatexdir/pdf/pdflistout.h \
	luatexdir/pdf/pdfliteral.h \
	luatexdir/pdf/pdfluaapi.h \
	luatexdir/pdf/pdfobj.h \
	luatexdir/pdf/pdfoutline.h \
	luatexdir/pdf/pdfpage.h \
	luatexdir/pdf/pdfrule.h \
	luatexdir/pdf/pdfsaverestore.h \
	luatexdir/pdf/pdfsetmatrix.h \
	luatexdir/pdf/pdfshipout.h \
	luatexdir/pdf/pdftables.h \
	luatexdir/pdf/pdfthread.h \
	luatexdir/pdf/pdftypes.h \
	luatexdir/pdf/pdfxform.h

## from luatexdir/scripts
##
luatex_luascripts_ctangle = $(ctangle_silent)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
	$(AM_V_GEN)rm -f pdflua.c; \
	$(LN_S) $(srcdir)/luatexdir/luascripts/pdflua.c pdflua.c
else !cross
pdflua.c: txt2zlib$(EXEEXT) luatexdir/luascripts/pdflua.lua
	$(AM_V_GEN)./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 = $(ctangle_silent)CWEBINPUTS=$(srcdir)/luatexdir/tex $(ctangle)

align.c: ctangle$(EXEEXT) luatexdir/tex/align.w
	$(luatex_tex_ctangle) align.w
arithmetic.c: ctangle$(EXEEXT) luatexdir/tex/arithmetic.w
	$(luatex_tex_ctangle) arithmetic.w
buildpage.c: ctangle$(EXEEXT) luatexdir/tex/buildpage.w
	$(luatex_tex_ctangle) buildpage.w
commands.c: ctangle$(EXEEXT) luatexdir/tex/commands.w
	$(luatex_tex_ctangle) commands.w
conditional.c: ctangle$(EXEEXT) luatexdir/tex/conditional.w
	$(luatex_tex_ctangle) conditional.w
directions.c: ctangle$(EXEEXT) luatexdir/tex/directions.w
	$(luatex_tex_ctangle) directions.w
dumpdata.c: ctangle$(EXEEXT) luatexdir/tex/dumpdata.w
	$(luatex_tex_ctangle) dumpdata.w
equivalents.c: ctangle$(EXEEXT) luatexdir/tex/equivalents.w
	$(luatex_tex_ctangle) equivalents.w
errors.c: ctangle$(EXEEXT) luatexdir/tex/errors.w
	$(luatex_tex_ctangle) errors.w
expand.c: ctangle$(EXEEXT) luatexdir/tex/expand.w
	$(luatex_tex_ctangle) expand.w
extensions.c: ctangle$(EXEEXT) luatexdir/tex/extensions.w
	$(luatex_tex_ctangle) extensions.w
filename.c: ctangle$(EXEEXT) luatexdir/tex/filename.w
	$(luatex_tex_ctangle) filename.w
inputstack.c: ctangle$(EXEEXT) luatexdir/tex/inputstack.w
	$(luatex_tex_ctangle) inputstack.w
linebreak.c: ctangle$(EXEEXT) luatexdir/tex/linebreak.w
	$(luatex_tex_ctangle) linebreak.w
mainbody.c: ctangle$(EXEEXT) luatexdir/tex/mainbody.w
	$(luatex_tex_ctangle) mainbody.w
maincontrol.c: ctangle$(EXEEXT) luatexdir/tex/maincontrol.w
	$(luatex_tex_ctangle) maincontrol.w
mathcodes.c: ctangle$(EXEEXT) luatexdir/tex/mathcodes.w
	$(luatex_tex_ctangle) mathcodes.w
memoryword.c: ctangle$(EXEEXT) luatexdir/tex/memoryword.w
	$(luatex_tex_ctangle) memoryword.w
mlist.c: ctangle$(EXEEXT) luatexdir/tex/mlist.w
	$(luatex_tex_ctangle) mlist.w
nesting.c: ctangle$(EXEEXT) luatexdir/tex/nesting.w
	$(luatex_tex_ctangle) nesting.w
packaging.c: ctangle$(EXEEXT) luatexdir/tex/packaging.w
	$(luatex_tex_ctangle) packaging.w
postlinebreak.c: ctangle$(EXEEXT) luatexdir/tex/postlinebreak.w
	$(luatex_tex_ctangle) postlinebreak.w
primitive.c: ctangle$(EXEEXT) luatexdir/tex/primitive.w
	$(luatex_tex_ctangle) primitive.w
printing.c: ctangle$(EXEEXT) luatexdir/tex/printing.w
	$(luatex_tex_ctangle) printing.w
scanning.c: ctangle$(EXEEXT) luatexdir/tex/scanning.w
	$(luatex_tex_ctangle) scanning.w
stringpool.c: ctangle$(EXEEXT) luatexdir/tex/stringpool.w
	$(luatex_tex_ctangle) stringpool.w
texdeffont.c: ctangle$(EXEEXT) luatexdir/tex/texdeffont.w
	$(luatex_tex_ctangle) texdeffont.w
texfileio.c: ctangle$(EXEEXT) luatexdir/tex/texfileio.w
	$(luatex_tex_ctangle) texfileio.w
texmath.c: ctangle$(EXEEXT) luatexdir/tex/texmath.w
	$(luatex_tex_ctangle) texmath.w
texnodes.c: ctangle$(EXEEXT) luatexdir/tex/texnodes.w
	$(luatex_tex_ctangle) texnodes.w
textcodes.c: ctangle$(EXEEXT) luatexdir/tex/textcodes.w
	$(luatex_tex_ctangle) textcodes.w
textoken.c: ctangle$(EXEEXT) luatexdir/tex/textoken.w
	$(luatex_tex_ctangle) textoken.w

libluatex_web += luatexdir/tex/align.w luatexdir/tex/arithmetic.w luatexdir/tex/buildpage.w
libluatex_web += luatexdir/tex/commands.w luatexdir/tex/conditional.w luatexdir/tex/directions.w
libluatex_web += luatexdir/tex/dumpdata.w luatexdir/tex/equivalents.w luatexdir/tex/errors.w
libluatex_web += luatexdir/tex/expand.w luatexdir/tex/extensions.w luatexdir/tex/filename.w
libluatex_web += luatexdir/tex/inputstack.w luatexdir/tex/linebreak.w luatexdir/tex/mainbody.w
libluatex_web += luatexdir/tex/maincontrol.w luatexdir/tex/mathcodes.w luatexdir/tex/memoryword.w
libluatex_web += luatexdir/tex/mlist.w luatexdir/tex/nesting.w luatexdir/tex/packaging.w
libluatex_web += luatexdir/tex/postlinebreak.w luatexdir/tex/primitive.w luatexdir/tex/printing.w
libluatex_web += luatexdir/tex/scanning.w luatexdir/tex/stringpool.w luatexdir/tex/texdeffont.w
libluatex_web += luatexdir/tex/texfileio.w luatexdir/tex/texmath.w luatexdir/tex/texnodes.w
libluatex_web += luatexdir/tex/textcodes.w luatexdir/tex/textoken.w

nodist_libluatex_a_SOURCES += align.c arithmetic.c buildpage.c commands.c conditional.c directions.c
nodist_libluatex_a_SOURCES += dumpdata.c equivalents.c errors.c expand.c extensions.c filename.c
nodist_libluatex_a_SOURCES += inputstack.c linebreak.c mainbody.c maincontrol.c mathcodes.c
nodist_libluatex_a_SOURCES += memoryword.c mlist.c nesting.c packaging.c postlinebreak.c
nodist_libluatex_a_SOURCES += primitive.c printing.c scanning.c stringpool.c texdeffont.c
nodist_libluatex_a_SOURCES += texfileio.c texmath.c texnodes.c textcodes.c textoken.c

libluatex_a_SOURCES += \
	luatexdir/tex/align.h \
	luatexdir/tex/arithmetic.h \
	luatexdir/tex/buildpage.h \
	luatexdir/tex/commands.h \
	luatexdir/tex/conditional.h \
	luatexdir/tex/directions.h \
	luatexdir/tex/dumpdata.h \
	luatexdir/tex/equivalents.h \
	luatexdir/tex/errors.h \
	luatexdir/tex/expand.h \
	luatexdir/tex/extensions.h \
	luatexdir/tex/filename.h \
	luatexdir/tex/inputstack.h \
	luatexdir/tex/linebreak.h \
	luatexdir/tex/mainbody.h \
	luatexdir/tex/maincontrol.h \
	luatexdir/tex/mathcodes.h \
	luatexdir/tex/memoryword.h \
	luatexdir/tex/mlist.h \
	luatexdir/tex/nesting.h \
	luatexdir/tex/packaging.h \
	luatexdir/tex/postlinebreak.h \
	luatexdir/tex/primitive.h \
	luatexdir/tex/printing.h \
	luatexdir/tex/scanning.h \
	luatexdir/tex/stringpool.h \
	luatexdir/tex/texdeffont.h \
	luatexdir/tex/texfileio.h \
	luatexdir/tex/texmath.h \
	luatexdir/tex/texnodes.h \
	luatexdir/tex/textoken.h \
	luatexdir/tex/textcodes.h 

## from luatexdir/utils
##
luatex_utils_ctangle = $(ctangle_silent)CWEBINPUTS=$(srcdir)/luatexdir/utils $(ctangle)

avlstuff.c: ctangle$(EXEEXT) luatexdir/utils/avlstuff.w
	$(luatex_utils_ctangle) avlstuff.w
managed-sa.c: ctangle$(EXEEXT) luatexdir/utils/managed-sa.w
	$(luatex_utils_ctangle) managed-sa.w
utils.c: ctangle$(EXEEXT) luatexdir/utils/utils.w
	$(luatex_utils_ctangle) utils.w
unistring.c: ctangle$(EXEEXT) luatexdir/utils/unistring.w
	$(luatex_utils_ctangle) unistring.w

libluatex_web += luatexdir/utils/avlstuff.w luatexdir/utils/managed-sa.w luatexdir/utils/utils.w luatexdir/utils/unistring.w

nodist_libluatex_a_SOURCES += avlstuff.c managed-sa.c utils.c unistring.c

libluatex_a_SOURCES += \
	luatexdir/utils/avl.c \
	luatexdir/utils/avl.h \
	luatexdir/utils/avlstuff.h \
	luatexdir/utils/managed-sa.h \
	luatexdir/utils/utils.h \
	luatexdir/utils/unistring.h

## from ../synctexdir
##
libluatex_a_SOURCES += \
	synctexdir/synctex-common.h \
	synctexdir/synctex-luatex.h \
	synctexdir/synctex.c \
	synctexdir/synctex.h

## from ../mplibdir
##
libluatex_a_SOURCES += \
	mplibdir/lmplib.c

$(libluatex_a_OBJECTS): libff.a libmplib.a

EXTRA_DIST += $(libluatex_web) 

DISTCLEANFILES += $(nodist_libluatex_a_SOURCES)

EXTRA_DIST += \
	luatexdir/ChangeLog \
	luatexdir/NEWS \
	luatexdir/font/subfont.txt

