1 ## Makefile.am for the TeX Live subdirectory texk/web2c/.
3 ## Copyright (C) 2009-2015 Peter Breitenlohner <tex-live@tug.org>
4 ## You may freely use, modify and/or distribute this file.
6 AM_CPPFLAGS = $(KPATHSEA_INCLUDES)
7 ## Not yet for C++ and ObjC++ (too many warnings)
8 AM_CFLAGS = $(WARNING_CFLAGS)
9 AM_CXXFLAGS = ## $(WARNING_CXXFLAGS)
10 AM_OBJCXXFLAGS = ## $(WARNING_OBJCXXFLAGS)
12 version = $(WEB2CVERSION)
14 SUBDIRS = doc lib man web2c . window omegafonts otps
18 ## Below we will add to these
28 TEST_EXTENSIONS = .pl .test
30 EXTRA_DIST = PROJECTS cftests cpascal.h help.h w2c/config.h
31 DISTCLEANFILES = CXXLD.sh
32 CLEANFILES = $(EXTRA_PROGRAMS) $(EXTRA_LIBRARIES) $(EXTRA_LTLIBRARIES)
39 # Files not to be distributed
40 include $(srcdir)/../../am/dist_hook.am
42 ## The sh script that does the conversion.
43 web2c = AM_V_P=$(AM_V_P) $(SHELL) ./web2c-sh $@
45 ## We put this in the web2c directory because it runs on the build system, it
46 ## is separate from (and simpler than) the actual web-to-C conversion programs.
47 makecpool = $(AM_V_GEN)web2c/makecpool
49 # Additional dependencies:
50 web2c_common = web2c/convert web2c/common.defines
51 # When cross-compiling, EXEEXT for the build and hosts system may differ.
52 # Thus we depend on the auxiliary files web2c/stamp-*.
53 web2c_stamps = web2c/stamp-fixwrites web2c/stamp-splitup web2c/stamp-web2c
54 makecpool_stamp = web2c/stamp-makecpool
55 web2c_depend = $(web2c_common) $(web2c_stamps) web2c-sh
56 web2c_texmf = $(web2c_depend) web2c/texmf.defines web2c/coerce.h
58 # This is right for most Web2C programs
59 LDADD = $(proglib) $(KPATHSEA_LIBS)
60 # Automake automatically uses $(proglib)=lib/lib.a as dependency.
61 # This does not work for the configure substitution $(KPATHSEA_LIBS),
62 # thus we must explicitly use these $(default_dependencies) for
63 # programs that do not depend on tangle or ctangle.
64 default_dependencies = $(proglib) $(KPATHSEA_DEPEND)
66 # Rebuild Web2C programs
67 web2c/stamp-fixwrites: $(web2c_common) ${srcdir}/web2c/*.[chly]
68 cd web2c && $(MAKE) $(AM_MAKEFLAGS) stamp-fixwrites
70 web2c/stamp-splitup: $(web2c_common) ${srcdir}/web2c/*.[chly]
71 cd web2c && $(MAKE) $(AM_MAKEFLAGS) stamp-splitup
73 web2c/stamp-web2c: $(web2c_common) ${srcdir}/web2c/*.[chly]
74 cd web2c && $(MAKE) $(AM_MAKEFLAGS) stamp-web2c
76 web2c/stamp-makecpool: $(web2c_common) ${srcdir}/web2c/makecpool.c
77 cd web2c && $(MAKE) $(AM_MAKEFLAGS) stamp-makecpool
80 $(proglib): ${srcdir}/lib/*.c
81 cd lib && $(MAKE) $(AM_MAKEFLAGS) lib.a
82 ## Rebuild libkpathsea
94 ## Rebuild libfreetype
112 ## Rebuild libsicuxxx
114 ## Rebuild libharfbuzz
116 ## Rebuild libgraphite2
119 # The environment for building.
120 buildenv = TEXMFCNF=$(srcdir)/../kpathsea
122 # Calling tangle & Co.
123 tangle = $(tangle_silent)WEBINPUTS=.:$(srcdir) $(buildenv) $(TANGLE)
124 tangleboot = $(tangle_silent)WEBINPUTS=.:$(srcdir) $(buildenv) $(TANGLEBOOT)
125 tangle_silent = $(tangle_silent_@AM_V@)
126 tangle_silent_ = $(tangle_silent_@AM_DEFAULT_V@)
127 tangle_silent_0 = @echo " TANGLE " $@; $(SHELL) ./silent-sh $@ #
130 ctangle = $(buildenv) $(CTANGLE)
131 ctangle_silent = $(ctangle_silent_@AM_V@)
132 ctangle_silent_ = $(ctangle_silent_@AM_DEFAULT_V@)
133 ctangle_silent_0 = @echo " CTANGLE " $@; $(SHELL) ./silent-sh $@ #
136 tie = $(tie_silent)WEBINPUTS=.:$(srcdir) $(buildenv) $(TIE)
137 tie_silent = $(tie_silent_@AM_V@)
138 tie_silent_ = $(tie_silent_@AM_DEFAULT_V@)
139 tie_silent_0 = @echo " TIE " $@; $(SHELL) ./silent-sh $@ #
144 # Calling tangle & Co. via tangle-sh (several output files)
145 texmf_tangle = WEBINPUTS=.:$(srcdir) AM_V_P=$(AM_V_P) $(SHELL) ./tangle-sh $@ $(TANGLE)
147 # For trip, trap, and other tests
150 TESTS_ENVIRONMENT = abs_srcdir=$(abs_srcdir) DIFF='$(DIFF)' DIFFFLAGS='$(DIFFFLAGS)' LN_S='$(LN_S)' KPSEWHICH='$(KPSEWHICH)'
151 triptrap_diffs = $(AM_V_GEN)srcdir=$(srcdir) abs_srcdir=$(abs_srcdir) MAKE=$(MAKE) $(SHELL) $(srcdir)/triptrap-sh
155 $(triptrap_diffs) $(TRIPTRAP)
156 EXTRA_DIST += triptrap-sh
158 clean-local: triptrap-clean
159 .PHONY: triptrap-clean
160 triptrap-clean: $(TRIPTRAP_CLEAN)
162 # The environment for making dumps.
163 # No need to specify TEXMF, as ../kpathsea/texmf.cnf should contain
164 # suitable absolute paths at this point. Those are converted to
165 # SELFAUTO* paths on installation.
166 dumpenv = TEXMFCNF=../kpathsea
168 ## ################################
170 ## Prevent Make from deleting the intermediate forms.
171 .PRECIOUS: %.ch %.p %.c
173 ## ################################
175 ## tangle and ctangle
176 include $(srcdir)/am/bootstrap.am
178 ## normal web programs (except tangle)
179 include $(srcdir)/am/web.am
181 ## normal cweb programs (except ctangle)
182 include $(srcdir)/am/cweb.am
185 include $(srcdir)/am/texmf.am
188 include $(srcdir)/mfluadir/am/mflua.am
191 include $(srcdir)/mfluajitdir/am/mfluajit.am
194 include $(srcdir)/mplibdir/am/mplib.am
196 ## pMetaPost and upMetaPost
197 include $(srcdir)/pmpostdir/am/pmpost.am
199 ## libmputil, libmplib, used by MetaPost and luaTeX
200 include $(srcdir)/mplibdir/am/libmputil.am
201 include $(srcdir)/mplibdir/am/libmplib.am
204 include $(srcdir)/etexdir/am/etex.am
207 include $(srcdir)/ptexdir/am/ptex.am
210 include $(srcdir)/eptexdir/am/eptex.am
213 include $(srcdir)/uptexdir/am/uptex.am
216 include $(srcdir)/euptexdir/am/euptex.am
219 include $(srcdir)/pdftexdir/am/libpdftex.am
220 include $(srcdir)/pdftexdir/am/pdftex.am
221 include $(srcdir)/pdftexdir/am/ttf2afm.am
222 include $(srcdir)/pdftexdir/am/pdftosrc.am
225 include $(srcdir)/luatexdir/am/luasocket.am
226 include $(srcdir)/luatexdir/am/luamisc.am
227 include $(srcdir)/luatexdir/am/libunilib.am
228 include $(srcdir)/luatexdir/am/luafontforge.am
229 include $(srcdir)/luatexdir/am/libluatex.am
230 include $(srcdir)/luatexdir/am/luatex.am
231 include $(srcdir)/luatexdir/am/txt2zlib.am
234 include $(srcdir)/xetexdir/am/xetex.am
236 ## omegaware web programs
237 include $(srcdir)/omegaware/am/omegaware.am
240 include $(srcdir)/alephdir/am/aleph.am
242 ## SyncTeX, must come after all TeX-like engines
243 include $(srcdir)/synctexdir/am/synctex.am
246 include $(srcdir)/libmd5/am/md5.am
248 ## Symlinks within $(bindir)
249 include $(srcdir)/../../am/bin_links.am
250 install-exec-hook: install-bin-links $(install_exe_links)
251 uninstall-hook: uninstall-bin-links $(uninstall_exe_links)