## texk/web2c/xetexdir/am/xetex.am: Makefile fragment for XeTeX. ## ## Copyright (C) 2009-2012 Peter Breitenlohner ## You may freely use, modify and/or distribute this file. ## XeTeX ## if XETEX bin_PROGRAMS += xetex endif XETEX EXTRA_PROGRAMS += xetex # Force Automake to use CXXLD for linking nodist_EXTRA_xetex_SOURCES = dummy.cxx xe_tangle = WEBINPUTS=.:$(srcdir)/xetexdir AM_V_P=$(AM_V_P) $(SHELL) ./tangle-sh $@ $(OTANGLE) libxetex = libxetex.a xetex_cppflags = $(AM_CPPFLAGS) -I$(srcdir)/xetexdir ## Must add icu first to avoid an installed version. xetex_cppflags += $(ICU_INCLUDES) ## Must add freetype2 includes early to avoid ## freetype1/freetype2 confusion -- what a mess. xetex_cppflags += $(FREETYPE2_INCLUDES) xetex_cppflags += $(TECKIT_INCLUDES) xetex_ldadd = $(libxetex) $(ICU_LIBS) $(TECKIT_LIBS) xetex_dependencies = $(proglib) $(KPATHSEA_DEPEND) xetex_dependencies += $(ICU_DEPEND) $(TECKIT_DEPEND) if XETEX_MACOSX xetex_cppflags += -DXETEX_MAC xetex_LDFLAGS = -framework Carbon -framework Cocoa -framework QuickTime else !XETEX_MACOSX xetex_cppflags += -DXETEX_OTHER xetex_cppflags += $(POPPLER_INCLUDES) $(LIBPNG_INCLUDES) $(FONTCONFIG_INCLUDES) xetex_ldadd += $(POPPLER_LIBS) $(LIBPNG_LIBS) $(FONTCONFIG_LIBS) xetex_dependencies += $(POPPLER_DEPEND) $(LIBPNG_DEPEND) endif !XETEX_MACOSX if XETEX_GRAPHITE xetex_cppflags += -DXETEX_GRAPHITE $(GRAPHITE_INCLUDES) xetex_ldadd += $(GRAPHITE_LIBS) xetex_dependencies += $(GRAPHITE_DEPEND) endif XETEX_GRAPHITE xetex_cppflags += $(ZLIB_INCLUDES) xetex_ldadd += $(FREETYPE2_LIBS) $(ZLIB_LIBS) xetex_dependencies += $(FREETYPE2_DEPEND) $(ZLIB_DEPEND) xetex_CPPFLAGS = $(xetex_cppflags) xetex_CFLAGS = # $(WARNING_CFLAGS) xetex_CXXFLAGS = # $(WARNING_CXXFLAGS) ## With --enable-ipc, XeTeX may need to link with -lsocket. xetex_LDADD = $(xetex_ldadd) $(LDADD) $(ipc_socketlibs) # We must create libxetex.a etc before building the xetex_OBJECTS xetex_prereq = $(libxetex) etexdir/etex_version.h xetexdir/xetex_version.h $(xetex_OBJECTS): $(xetex_prereq) ## XeTeX C sources xetex_c_h = xetexini.c xetex0.c xetexcoerce.h xetexd.h nodist_xetex_SOURCES = $(xetex_c_h) xetex-pool.c dist_xetex_SOURCES = xetexdir/xetexextra.c xetexdir/xetexextra.h xetexdir/xetex_version.h $(xetex_c_h): xetex-web2c @$(web2c) xetex xetex-web2c: xetex.p $(web2c_texmf) xetexdir/xetex.defines @$(web2c) xetex xetex-pool.c: xetex.pool xetexd.h $(makecpool_stamp) $(makecpool) xetex >$@ || rm -f $@ ## Tangling XeTeX xetex.p xetex.pool: xetex-tangle @$(xe_tangle) xetex xetex xetex-tangle: otangle$(EXEEXT) xetexdir/xetex.web xetex.ch tangle-sh @$(xe_tangle) xetex xetex ## Extract xetex version xetexdir/xetex_version.h: xetexdir/xetex.ch $(AM_V_at)$(MKDIR_P) xetexdir $(AM_V_GEN)grep '^@d XeTeX_version_string==' $(srcdir)/xetexdir/xetex.web \ | sed "s/^.*'-/#define XETEX_VERSION \"/;s/'.*$$/\"/" >$@ ## Generate xetex.ch xetex.ch: tie$(EXEEXT) $(xetex_ch_srcs) $(tie) -c xetex.ch $(xetex_ch_srcs) xetex_ch_srcs = \ xetexdir/xetex.web \ xetexdir/tex.ch0 \ tex.ch \ $(xetex_ch_synctex) \ xetexdir/xetex.ch \ $(xetex_post_ch_synctex) \ tex-binpool.ch ## Merging in XeTeX change files - begin if XETEX_SYNCTEX Xold_ch_synctex = \ synctexdir/synctex-mem.ch0 \ synctexdir/synctex-e-mem.ch0 \ synctexdir/synctex-e-mem.ch1 \ synctexdir/synctex-xe-mem.ch2 \ synctexdir/synctex-rec.ch0 \ synctexdir/synctex-e-rec.ch0 \ synctexdir/synctex-xe-rec.ch2 Xold_post_ch_synctex = \ synctexdir/synctex-xe-rec.ch3 endif XETEX_SYNCTEX Xold.p Xold.pool: Xold-tangle @$(xe_tangle) Xold Xold-tangle: otangle$(EXEEXT) Xold.web tangle-sh @$(xe_tangle) Xold Xold.web: tie$(EXEEXT) $(Xold_web_srcs) $(tie) -m Xold.web $(Xold_web_srcs) Xold_web_srcs = \ tex.web \ etexdir/etex.ch \ etexdir/tex.ch0 \ tex.ch \ xetexdir/tex.mod \ etexdir/tex.ch1 \ etexdir/tex.ech \ tex-binpool.ch \ $(Xold_ch_synctex) \ xetex-orig.ch \ xetex-latex3.ch \ xetex-hz.ch \ $(Xold_post_ch_synctex) # Xnew.web: tie$(EXEEXT) xetexdir/xetex.web xetex.ch $(tie) -m Xnew.web xetexdir/xetex.web xetex.ch # Xweb.diff: Xold.web Xnew.web diff -u Xold.web Xnew.web >Xweb.diff; : Xp.diff: Xold.p xetex.p diff -u Xold.p xetex.p >Xp.diff; : Xpool.diff: Xold.pool xetex.pool diff -u Xold.pool xetex.pool >Xpool.diff; : X.diff: Xweb.diff Xp.diff Xpool.diff cat Xweb.diff Xp.diff Xpool.diff >X.diff # EXTRA_DIST += $(Xold_web_srcs) DISTCLEANFILES += X* ## Merging in XeTeX change files - end ## EXTRA_DIST += $(xetex_web_srcs) $(xetex_ch_srcs) xetexdir/xetex.defines DISTCLEANFILES += $(nodist_xetex_SOURCES) xetex.web xetex.ch xetex-web2c \ xetex.p xetex.pool xetex-tangle EXTRA_DIST += \ xetexdir/unicode-char-prep.pl ## libxetex ## EXTRA_LIBRARIES += libxetex.a libxetex_a_CPPFLAGS = $(xetex_cppflags) libxetex_a_CFLAGS = # $(WARNING_CFLAGS) libxetex_a_CXXFLAGS = # $(WARNING_CXXFLAGS) libxetex_a_OBJCXXFLAGS = # $(WARNING_OBJCXXFLAGS) libxetex_a_SOURCES = \ xetexdir/MathTable.h \ xetexdir/FontTableCache.cpp \ xetexdir/FontTableCache.h \ xetexdir/XeTeXFontInst.cpp \ xetexdir/XeTeXFontInst.h \ xetexdir/XeTeXFontInst_FT2.cpp \ xetexdir/XeTeXFontInst_FT2.h \ xetexdir/XeTeXFontMgr.cpp \ xetexdir/XeTeXFontMgr.h \ xetexdir/XeTeXLayoutInterface.cpp \ xetexdir/XeTeXLayoutInterface.h \ xetexdir/XeTeXOTLayoutEngine.cpp \ xetexdir/XeTeXOTLayoutEngine.h \ xetexdir/XeTeXOTMath.cpp \ xetexdir/XeTeXOTMath.h \ xetexdir/XeTeX_ext.c \ xetexdir/XeTeX_ext.h \ xetexdir/XeTeXswap.h \ xetexdir/cmaps.cpp \ xetexdir/cmaps.h \ xetexdir/sfnt.h \ xetexdir/trans.c \ xetexdir/trans.h \ xetexdir/hz.cpp \ xetexdir/xetex.h ## included by xetexdir/XeTeXLayoutInterface.cpp EXTRA_DIST += xetexdir/appleGlyphNames.c if XETEX_MACOSX libxetex_a_SOURCES += \ xetexdir/XeTeXFontInst_Mac.cpp \ xetexdir/XeTeXFontInst_Mac.h \ xetexdir/XeTeXFontMgr_Mac.mm \ xetexdir/XeTeXFontMgr_Mac.h \ xetexdir/XeTeX_mac.c else !XETEX_MACOSX libxetex_a_SOURCES += \ xetexdir/XeTeXFontMgr_FC.cpp \ xetexdir/XeTeXFontMgr_FC.h \ xetexdir/XeTeX_pic.c \ xetexdir/bmpimage.c \ xetexdir/bmpimage.h \ xetexdir/jpegimage.c \ xetexdir/jpegimage.h \ xetexdir/mfileio.c \ xetexdir/mfileio.h \ xetexdir/numbers.c \ xetexdir/numbers.h \ xetexdir/pdfimage.cpp \ xetexdir/pdfimage.h \ xetexdir/pngimage.c \ xetexdir/pngimage.h endif !XETEX_MACOSX if XETEX_GRAPHITE libxetex_a_SOURCES += \ xetexdir/XeTeXGrLayout.cpp \ xetexdir/XeTeXGrLayout.h endif XETEX_GRAPHITE # We must create xetexd.h etc. before building the libxetex_a_OBJECTS. libxetex_prereq = xetexd.h $(xetex_dependencies) $(libxetex_a_OBJECTS): $(libxetex_prereq) EXTRA_DIST += xetexdir/ChangeLog # XeTeX Tests # xetex_tests = xetexdir/xetex.test EXTRA_DIST += $(xetex_tests) if XETEX TESTS += $(xetex_tests) endif XETEX ## Not used ## EXTRA_DIST += xetexdir/LICENSE.txt