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, C++, and ObjC++ (too many warnings or not yet implemented)
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
30 EXTRA_DIST = PROJECTS cftests cpascal.h help.h w2c/config.h
31 DISTCLEANFILES = CXXLD.sh
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 $@ #
142 # Calling tangle & Co. via tangle-sh (several output files)
143 texmf_tangle = WEBINPUTS=.:$(srcdir) AM_V_P=$(AM_V_P) $(SHELL) ./tangle-sh $@ $(TANGLE)
145 # For trip, trap, and other tests
148 TESTS_ENVIRONMENT = abs_srcdir=$(abs_srcdir) DIFF='$(DIFF)' DIFFFLAGS='$(DIFFFLAGS)' LN_S='$(LN_S)' KPSEWHICH='$(KPSEWHICH)'
149 triptrap_diffs = $(AM_V_GEN)srcdir=$(srcdir) abs_srcdir=$(abs_srcdir) MAKE=$(MAKE) $(SHELL) $(srcdir)/triptrap-sh
153 $(triptrap_diffs) $(TRIPTRAP)
154 EXTRA_DIST += triptrap-sh
156 clean-local: triptrap-clean
157 .PHONY: triptrap-clean
158 triptrap-clean: $(TRIPTRAP_CLEAN)
160 # The environment for making dumps.
161 # No need to specify TEXMF, as ../kpathsea/texmf.cnf should contain
162 # suitable absolute paths at this point. Those are converted to
163 # SELFAUTO* paths on installation.
164 dumpenv = TEXMFCNF=../kpathsea
166 ## ################################
168 ## Prevent Make from deleting the intermediate forms.
169 .PRECIOUS: %.ch %.p %.c
171 ## ################################
173 ## tangle and ctangle
174 include $(srcdir)/am/bootstrap.am
176 ## normal web programs (except tangle)
177 include $(srcdir)/am/web.am
179 ## normal cweb programs (except ctangle)
180 include $(srcdir)/am/cweb.am
183 include $(srcdir)/am/texmf.am
186 include $(srcdir)/mplibdir/am/mplib.am
188 ## pMetaPost and upMetaPost
189 include $(srcdir)/pmpostdir/am/pmpost.am
191 ## libmputil, libmplib, used by MetaPost and luaTeX
192 include $(srcdir)/mplibdir/am/libmputil.am
193 include $(srcdir)/mplibdir/am/libmplib.am
196 include $(srcdir)/etexdir/am/etex.am
199 include $(srcdir)/ptexdir/am/ptex.am
202 include $(srcdir)/eptexdir/am/eptex.am
205 include $(srcdir)/uptexdir/am/uptex.am
208 include $(srcdir)/euptexdir/am/euptex.am
211 include $(srcdir)/pdftexdir/am/libpdftex.am
212 include $(srcdir)/pdftexdir/am/pdftex.am
213 include $(srcdir)/pdftexdir/am/ttf2afm.am
214 include $(srcdir)/pdftexdir/am/pdftosrc.am
217 include $(srcdir)/luatexdir/am/luasocket.am
218 include $(srcdir)/luatexdir/am/luamisc.am
219 include $(srcdir)/luatexdir/am/libunilib.am
220 include $(srcdir)/luatexdir/am/luafontforge.am
221 include $(srcdir)/luatexdir/am/libluatex.am
222 include $(srcdir)/luatexdir/am/luatex.am
223 include $(srcdir)/luatexdir/am/txt2zlib.am
226 include $(srcdir)/xetexdir/am/xetex.am
228 ## omegaware web programs
229 include $(srcdir)/omegaware/am/omegaware.am
231 ## programs required for 'make check' in omegafonts/ and omegaware/
233 check_PROGRAMS += pltotf tftopl
237 include $(srcdir)/alephdir/am/aleph.am
239 ## SyncTeX, must come after all TeX-like engines
240 include $(srcdir)/synctexdir/am/synctex.am
243 include $(srcdir)/libmd5/am/md5.am
245 ## Symlinks within $(bindir)
246 include $(srcdir)/../../am/bin_links.am
247 install-exec-hook: install-bin-links $(install_exe_links)
248 uninstall-hook: uninstall-bin-links $(uninstall_exe_links)