summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/Makefile.am')
-rw-r--r--Build/source/texk/web2c/Makefile.am31
1 files changed, 22 insertions, 9 deletions
diff --git a/Build/source/texk/web2c/Makefile.am b/Build/source/texk/web2c/Makefile.am
index a95cb43876d..3e84dbd0bc6 100644
--- a/Build/source/texk/web2c/Makefile.am
+++ b/Build/source/texk/web2c/Makefile.am
@@ -1,3 +1,7 @@
+## Makefile.am for the TeX Live subdirectory texk/web2c/
+##
+## Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
+## You may freely use, modify and/or distribute this file.
##
ACLOCAL_AMFLAGS = -I ../../m4
@@ -34,15 +38,18 @@ dist-hook:
## The sh script that does the conversion.
web2c = srcdir=$(srcdir) $(SHELL) $(srcdir)/web2c/convert
-## We put this in the web2c directory for lack of a better place, but it
+## We put this in the web2c directory because it runs on the build system, it
## is separate from (and simpler than) the actual web-to-C conversion programs.
-makecpool = ./web2c/makecpool
+makecpool = web2c/makecpool
-## Additional dependencies:
+# Additional dependencies:
web2c_common = web2c/convert web2c/common.defines
-web2c_programs = web2c/fixwrites web2c/splitup web2c/web2c $(makecpool)
-web2c_texmf = $(web2c_common) $(web2c_programs) \
- web2c/texmf.defines web2c/coerce.h
+# When cross-compiling, EXEEXT for the build and hosts system may differ.
+# Thus we depend on the auxiliary files web2c/stamp-*.
+web2c_stamps = web2c/stamp-fixwrites web2c/stamp-splitup web2c/stamp-web2c
+makecpool_stamp = web2c/stamp-makecpool
+web2c_depend = $(web2c_common) $(web2c_stamps)
+web2c_texmf = $(web2c_depend) web2c/texmf.defines web2c/coerce.h
## This is right for most Web2C programs
LDADD = $(proglib) $(KPATHSEA_LIBS)
@@ -55,9 +62,15 @@ LDADD = $(proglib) $(KPATHSEA_LIBS)
$(proglib): $(KPATHSEA_DEPEND) ${srcdir}/lib/*.c
cd lib && $(MAKE) $(AM_MAKEFLAGS)
-## Rebuild $(web2c_programs)
-$(web2c_programs): $(web2c_common) ${srcdir}/web2c/*.[chly]
- cd web2c && $(MAKE) $(AM_MAKEFLAGS)
+## Rebuild Web2C programs
+web2c/stamp-fixwrites: $(web2c_common) ${srcdir}/web2c/*.[chly]
+ cd web2c && $(MAKE) $(AM_MAKEFLAGS) stamp-fixwrites
+web2c/stamp-splitup: $(web2c_common) ${srcdir}/web2c/*.[chly]
+ cd web2c && $(MAKE) $(AM_MAKEFLAGS) stamp-splitup
+web2c/stamp-web2c: $(web2c_common) ${srcdir}/web2c/*.[chly]
+ cd web2c && $(MAKE) $(AM_MAKEFLAGS) stamp-web2c
+web2c/stamp-makecpool: $(web2c_common) ${srcdir}/web2c/makecpool.c
+ cd web2c && $(MAKE) $(AM_MAKEFLAGS) stamp-makecpool
## Rebuild libkpathsea
@KPATHSEA_RULE@