sync with TL 36474
[luatex.git] / source / texk / web2c / Makefile.am
blob54515ae21d5cc0954cf7ce9bf86b405ca192f713
1 ## Makefile.am for the TeX Live subdirectory texk/web2c/.
2 ##
3 ## Copyright (C) 2009-2015 Peter Breitenlohner <tex-live@tug.org>
4 ## You may freely use, modify and/or distribute this file.
5 ##
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
16 proglib = lib/lib.a
18 ## Below we will add to these
19 EXTRA_PROGRAMS =
20 EXTRA_LIBRARIES =
21 EXTRA_LTLIBRARIES =
22 bin_PROGRAMS =
23 lib_LIBRARIES =
24 lib_LTLIBRARIES =
25 noinst_PROGRAMS =
26 dist_man_MANS =
27 nodist_man_MANS =
28 check_PROGRAMS =
29 TESTS =
30 EXTRA_DIST = PROJECTS cftests cpascal.h help.h w2c/config.h
31 DISTCLEANFILES = CXXLD.sh
32 CLEANFILES =
33 TRIPTRAP_CLEAN =
34 TRIPTRAP =
35 bin_links =
36 install_exe_links =
37 uninstall_exe_links =
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
69         touch $@
70 web2c/stamp-splitup: $(web2c_common) ${srcdir}/web2c/*.[chly]
71         cd web2c && $(MAKE) $(AM_MAKEFLAGS) stamp-splitup
72         touch $@
73 web2c/stamp-web2c: $(web2c_common) ${srcdir}/web2c/*.[chly]
74         cd web2c && $(MAKE) $(AM_MAKEFLAGS) stamp-web2c
75         touch $@
76 web2c/stamp-makecpool: $(web2c_common) ${srcdir}/web2c/makecpool.c
77         cd web2c && $(MAKE) $(AM_MAKEFLAGS) stamp-makecpool
79 # Rebuild $(proglib)
80 $(proglib): ${srcdir}/lib/*.c
81         cd lib && $(MAKE) $(AM_MAKEFLAGS) lib.a
82 ## Rebuild libkpathsea
83 @KPATHSEA_RULE@
84 ## Rebuild libptexenc
85 @PTEXENC_RULE@
86 ## Rebuild libz
87 @ZLIB_RULE@
88 ## Rebuild liblua52
89 @LUA52_RULE@
90 ## Rebuild libluajit
91 @LUAJIT_RULE@
92 ## Rebuild libpng
93 @LIBPNG_RULE@
94 ## Rebuild libfreetype
95 @FREETYPE2_RULE@
96 ## Rebuild libpixman
97 @PIXMAN_RULE@
98 ## Rebuild libcairo
99 @CAIRO_RULE@
100 ## Rebuild libgmp
101 @GMP_RULE@
102 ## Rebuild libmpfr
103 @MPFR_RULE@
104 ## Rebuild libxpdf
105 @XPDF_RULE@
106 ## Rebuild poppler
107 @POPPLER_RULE@
108 ## Rebuild libzzip
109 @ZZIPLIB_RULE@
110 ## Rebuild libTEXkit
111 @TECKIT_RULE@
112 ## Rebuild libsicuxxx
113 @ICU_RULE@
114 ## Rebuild libharfbuzz
115 @HARFBUZZ_RULE@
116 ## Rebuild libgraphite2
117 @GRAPHITE2_RULE@
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 $@ #
128 tangle_silent_1 =
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 $@ #
134 ctangle_silent_1 =
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 $@ #
140 tie_silent_1 =
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
146 DIFF = diff
147 DIFFFLAGS =
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
151 .PHONY: triptrap
152 triptrap:
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
182 ## TeX and MF
183 include $(srcdir)/am/texmf.am
185 ## MetaPost
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
195 ## e-TeX
196 include $(srcdir)/etexdir/am/etex.am
198 ## pTeX
199 include $(srcdir)/ptexdir/am/ptex.am
201 ## e-pTeX
202 include $(srcdir)/eptexdir/am/eptex.am
204 ## upTeX
205 include $(srcdir)/uptexdir/am/uptex.am
207 ## e-upTeX
208 include $(srcdir)/euptexdir/am/euptex.am
210 ## pdfTeX
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
216 ## luaTeX
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
225 ## XeTeX
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/
232 if OTANGLE
233 check_PROGRAMS += pltotf tftopl
234 endif OTANGLE
236 ## Aleph
237 include $(srcdir)/alephdir/am/aleph.am
239 ## SyncTeX, must come after all TeX-like engines
240 include $(srcdir)/synctexdir/am/synctex.am
242 ## libmd5
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)