summaryrefslogtreecommitdiff
path: root/Build/source/utils
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2013-07-07 14:29:53 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2013-07-07 14:29:53 +0000
commit0df6dd4d8aea6edc733de81fb7eec115ea59a36e (patch)
treee2f7056cb53c58c8ef5779450ac468091b2bd86d /Build/source/utils
parent3675a91dd83af3eaa1c1a12e91af1e6c86f710f8 (diff)
build system: additional Makefile fragments
better handling of dependencies for highly parallel make git-svn-id: svn://tug.org/texlive/trunk@31127 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils')
-rw-r--r--Build/source/utils/ChangeLog4
-rw-r--r--Build/source/utils/Makefile.am53
-rw-r--r--Build/source/utils/Makefile.in75
-rwxr-xr-xBuild/source/utils/configure56
-rw-r--r--Build/source/utils/configure.ac14
5 files changed, 86 insertions, 116 deletions
diff --git a/Build/source/utils/ChangeLog b/Build/source/utils/ChangeLog
index 137b263ebfd..b148d250a12 100644
--- a/Build/source/utils/ChangeLog
+++ b/Build/source/utils/ChangeLog
@@ -1,3 +1,7 @@
+2013-07-06 Peter Breitenlohner <peb@mppmu.mpg.de>
+
+ * Makefile.am, configure.ac: Use am/recurse.am.
+
2012-12-17 Peter Breitenlohner <peb@mppmu.mpg.de>
* configure.ac: Use KPSE_BASIC to enable silent rules.
diff --git a/Build/source/utils/Makefile.am b/Build/source/utils/Makefile.am
index 6722cf7cd91..dd59231fc64 100644
--- a/Build/source/utils/Makefile.am
+++ b/Build/source/utils/Makefile.am
@@ -1,14 +1,14 @@
## Makefile.am for the TeX Live subdirectory utils/
##
-## Copyright (C) 2009, 2012 Peter Breitenlohner <tex-live@tug.org>
+## Copyright (C) 2009-2013 Peter Breitenlohner <tex-live@tug.org>
## You may freely use, modify and/or distribute this file.
##
## Use 'aclocal --force' (for "computed m4_sinclude")
##
ACLOCAL_AMFLAGS = -I ../m4 --force
-SUBDIRS = . $(SUBUTILS)
-DIST_SUBDIRS = $(DIST_SUBUTILS)
+SUBDIRS = . $(MAKE_SUBDIRS)
+DIST_SUBDIRS = $(CONF_SUBDIRS)
cf_silent = $(cf_silent_@AM_V@)
cf_silent_ = $(cf_silent_@AM_DEFAULT_V@)
@@ -19,47 +19,10 @@ cf_silent_1 =
dist-hook:
rm -rf `find $(distdir) -name .svn`
-CONFIG_AUX = ../subsubdir-conf.cmd
-
-all-local: subutils
-
-.PHONY: subutils
-# We must configure all utils subdirs since 'make dist' needs the Makefile.
-# For those not required for the current set of configure options
-# we append '--disable-build' so they can skip tests that would
-# fail because, e.g., some required libraries were not built.
-#
-# Sequentially configure and optionally build all utils subdirs;
-# code inspired by automake's way to handle recursive targets.
-subutils: $(CONFIG_AUX)
- @fail= failcom='exit 1'; \
- for f in x $$MAKEFLAGS; do \
- case $$f in \
- *=* | --[!k]*);; \
- *k*) failcom='fail=yes';; \
- esac; \
- done; \
- list='$(DIST_SUBUTILS)'; for subutils in $$list; do \
- if test ! -f $$subutils/Makefile; then \
- test -d $$subutils || $(MKDIR_P) $$subutils; \
- cmd=`cat $(CONFIG_AUX) | sed "s,auxdir/auxsub,utils/$$subutils,g"`; \
- case " $(SUBUTILS) " in \
- *" $$subutils "*) skip=;; \
- *) skip=' --disable-build';; \
- esac; \
- (cd $$subutils && echo "=== configuring in $$subutils (`pwd`)" && \
- if $(AM_V_P); then echo "make: running $(SHELL) $$cmd$$skip"; fi && \
- CONFIG_SHELL=$(SHELL) && export CONFIG_SHELL && \
- eval $(SHELL) $$cmd$$skip $(cf_silent) || \
- { echo "=== configuring in $$subutils failed"; exit 1; }) && \
- if test "x$$skip" = x; then \
- echo "Making all in $$subutils" && \
- (cd $$subutils && $(MAKE) $(AM_MAKEFLAGS) all); \
- fi || eval $$failcom; \
- fi; \
- done; test -z "$$fail"
+## Configure and build subdirs.
+##
+recurse_this = utils/
+recurse_top = ../
-../subsubdir-conf.cmd:
- @echo "configure in ../auxdir/auxsub failed to create the file $@"
- exit 1
+include $(srcdir)/../am/recurse.am
diff --git a/Build/source/utils/Makefile.in b/Build/source/utils/Makefile.in
index cd90c7152bd..a8d09c645b9 100644
--- a/Build/source/utils/Makefile.in
+++ b/Build/source/utils/Makefile.in
@@ -77,18 +77,19 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
-subdir = .
-DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
- $(top_srcdir)/configure $(am__configure_deps) ChangeLog README \
- ../build-aux/compile ../build-aux/config.guess \
- ../build-aux/config.sub ../build-aux/depcomp \
- ../build-aux/install-sh ../build-aux/missing \
- ../build-aux/texinfo.tex ../build-aux/ylwrap \
- ../build-aux/ltmain.sh $(top_srcdir)/../build-aux/compile \
+DIST_COMMON = $(srcdir)/../am/recurse.am $(srcdir)/Makefile.in \
+ $(srcdir)/Makefile.am $(top_srcdir)/configure \
+ $(am__configure_deps) ChangeLog README ../build-aux/compile \
+ ../build-aux/config.guess ../build-aux/config.sub \
+ ../build-aux/depcomp ../build-aux/install-sh \
+ ../build-aux/missing ../build-aux/texinfo.tex \
+ ../build-aux/ylwrap ../build-aux/ltmain.sh \
+ $(top_srcdir)/../build-aux/compile \
$(top_srcdir)/../build-aux/config.guess \
$(top_srcdir)/../build-aux/config.sub \
$(top_srcdir)/../build-aux/install-sh \
$(top_srcdir)/../build-aux/missing
+subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../m4/kpse-cairo-flags.m4 \
$(top_srcdir)/../m4/kpse-common.m4 \
@@ -303,11 +304,11 @@ AWK = @AWK@
CC = @CC@
CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@
+CONF_SUBDIRS = @CONF_SUBDIRS@
CPPFLAGS = @CPPFLAGS@
CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@
DEPDIR = @DEPDIR@
-DIST_SUBUTILS = @DIST_SUBUTILS@
ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@
@@ -323,6 +324,7 @@ LIBS = @LIBS@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@
+MAKE_SUBDIRS = @MAKE_SUBDIRS@
MKDIR_P = @MKDIR_P@
OBJEXT = @OBJEXT@
PACKAGE = @PACKAGE@
@@ -336,7 +338,6 @@ PATH_SEPARATOR = @PATH_SEPARATOR@
SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
-SUBUTILS = @SUBUTILS@
VERSION = @VERSION@
WARNING_CFLAGS = @WARNING_CFLAGS@
abs_builddir = @abs_builddir@
@@ -391,19 +392,27 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I ../m4 --force
-SUBDIRS = . $(SUBUTILS)
-DIST_SUBDIRS = $(DIST_SUBUTILS)
+SUBDIRS = . $(MAKE_SUBDIRS)
+DIST_SUBDIRS = $(CONF_SUBDIRS)
cf_silent = $(cf_silent_@AM_V@)
cf_silent_ = $(cf_silent_@AM_DEFAULT_V@)
cf_silent_0 = --silent
cf_silent_1 =
-CONFIG_AUX = ../subsubdir-conf.cmd
+recurse_this = utils/
+recurse_top = ../
+
+# We must configure all subdirs since 'make dist' needs the Makefile.
+# For those not required for the current set of configure options
+# we append '--disable-build' so they can skip tests that would
+# fail because, e.g., some required libraries were not built.
+# Code inspired by automake's way to handle recursive targets.
+CONFIG_AUX = $(recurse_top)subsubdir-conf.cmd
all: all-recursive
.SUFFIXES:
am--refresh: Makefile
@:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../am/recurse.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -426,6 +435,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
+$(srcdir)/../am/recurse.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
@@ -858,17 +868,10 @@ uninstall-am:
dist-hook:
rm -rf `find $(distdir) -name .svn`
-all-local: subutils
+all-local: recurse
-.PHONY: subutils
-# We must configure all utils subdirs since 'make dist' needs the Makefile.
-# For those not required for the current set of configure options
-# we append '--disable-build' so they can skip tests that would
-# fail because, e.g., some required libraries were not built.
-#
-# Sequentially configure and optionally build all utils subdirs;
-# code inspired by automake's way to handle recursive targets.
-subutils: $(CONFIG_AUX)
+.PHONY: recurse
+recurse: $(CONFIG_AUX)
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
@@ -876,28 +879,28 @@ subutils: $(CONFIG_AUX)
*k*) failcom='fail=yes';; \
esac; \
done; \
- list='$(DIST_SUBUTILS)'; for subutils in $$list; do \
- if test ! -f $$subutils/Makefile; then \
- test -d $$subutils || $(MKDIR_P) $$subutils; \
- cmd=`cat $(CONFIG_AUX) | sed "s,auxdir/auxsub,utils/$$subutils,g"`; \
- case " $(SUBUTILS) " in \
- *" $$subutils "*) skip=;; \
+ list='$(CONF_SUBDIRS)'; for one_dir in $$list; do \
+ if test ! -f $$one_dir/Makefile; then \
+ test -d $$one_dir || $(MKDIR_P) $$one_dir; \
+ cmd=`cat $(CONFIG_AUX) | sed "s,auxdir/auxsub,$(recurse_this)$$one_dir,g"`; \
+ case " $(MAKE_SUBDIRS) " in \
+ *" $$one_dir "*) skip=;; \
*) skip=' --disable-build';; \
esac; \
- (cd $$subutils && echo "=== configuring in $$subutils (`pwd`)" && \
+ (cd $$one_dir && echo "=== configuring in $$one_dir (`pwd`)" && \
if $(AM_V_P); then echo "make: running $(SHELL) $$cmd$$skip"; fi && \
CONFIG_SHELL=$(SHELL) && export CONFIG_SHELL && \
eval $(SHELL) $$cmd$$skip $(cf_silent) || \
- { echo "=== configuring in $$subutils failed"; exit 1; }) && \
+ { echo "=== configuring in $$one_dir failed"; exit 1; }) && \
if test "x$$skip" = x; then \
- echo "Making all in $$subutils" && \
- (cd $$subutils && $(MAKE) $(AM_MAKEFLAGS) all); \
+ echo "Making all in $$one_dir" && \
+ (cd $$one_dir && $(MAKE) $(AM_MAKEFLAGS) all); \
fi || eval $$failcom; \
fi; \
done; test -z "$$fail"
-../subsubdir-conf.cmd:
- @echo "configure in ../auxdir/auxsub failed to create the file $@"
+$(CONFIG_AUX):
+ @echo "configure in $(recurse_top)auxdir/auxsub failed to create the file $@"
exit 1
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/Build/source/utils/configure b/Build/source/utils/configure
index 827a8a32635..28bd2e567e3 100755
--- a/Build/source/utils/configure
+++ b/Build/source/utils/configure
@@ -590,8 +590,8 @@ ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
-DIST_SUBUTILS
-SUBUTILS
+CONF_SUBDIRS
+MAKE_SUBDIRS
subdirs
WARNING_CFLAGS
MAINT
@@ -6266,14 +6266,14 @@ WARNING_CFLAGS=$kpse_cv_warning_cflags
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for Utils programs to build" >&5
$as_echo_n "checking for Utils programs to build... " >&6; }
-SUBUTILS=
-DIST_SUBUTILS=
+MAKE_SUBDIRS=
+CONF_SUBDIRS=
if test -x $srcdir/biber/configure; then
- test "x$enable_biber" = xno || SUBUTILS="$SUBUTILS biber"
- DIST_SUBUTILS="$DIST_SUBUTILS biber"
+ test "x$enable_biber" = xno || MAKE_SUBDIRS="$MAKE_SUBDIRS biber"
+ CONF_SUBDIRS="$CONF_SUBDIRS biber"
if false; then
subdirs="$subdirs biber"
@@ -6282,8 +6282,8 @@ fi
if test -x $srcdir/m-tx/configure; then
- test "x$enable_m_tx" = xno || SUBUTILS="$SUBUTILS m-tx"
- DIST_SUBUTILS="$DIST_SUBUTILS m-tx"
+ test "x$enable_m_tx" = xno || MAKE_SUBDIRS="$MAKE_SUBDIRS m-tx"
+ CONF_SUBDIRS="$CONF_SUBDIRS m-tx"
if false; then
subdirs="$subdirs m-tx"
@@ -6292,8 +6292,8 @@ fi
if test -x $srcdir/pmx/configure; then
- test "x$enable_pmx" = xno || SUBUTILS="$SUBUTILS pmx"
- DIST_SUBUTILS="$DIST_SUBUTILS pmx"
+ test "x$enable_pmx" = xno || MAKE_SUBDIRS="$MAKE_SUBDIRS pmx"
+ CONF_SUBDIRS="$CONF_SUBDIRS pmx"
if false; then
subdirs="$subdirs pmx"
@@ -6302,8 +6302,8 @@ fi
if test -x $srcdir/ps2eps/configure; then
- test "x$enable_ps2eps" = xno || SUBUTILS="$SUBUTILS ps2eps"
- DIST_SUBUTILS="$DIST_SUBUTILS ps2eps"
+ test "x$enable_ps2eps" = xno || MAKE_SUBDIRS="$MAKE_SUBDIRS ps2eps"
+ CONF_SUBDIRS="$CONF_SUBDIRS ps2eps"
if false; then
subdirs="$subdirs ps2eps"
@@ -6312,8 +6312,8 @@ fi
if test -x $srcdir/psutils/configure; then
- test "x$enable_psutils" = xno || SUBUTILS="$SUBUTILS psutils"
- DIST_SUBUTILS="$DIST_SUBUTILS psutils"
+ test "x$enable_psutils" = xno || MAKE_SUBDIRS="$MAKE_SUBDIRS psutils"
+ CONF_SUBDIRS="$CONF_SUBDIRS psutils"
if false; then
subdirs="$subdirs psutils"
@@ -6322,8 +6322,8 @@ fi
if test -x $srcdir/t1utils/configure; then
- test "x$enable_t1utils" = xno || SUBUTILS="$SUBUTILS t1utils"
- DIST_SUBUTILS="$DIST_SUBUTILS t1utils"
+ test "x$enable_t1utils" = xno || MAKE_SUBDIRS="$MAKE_SUBDIRS t1utils"
+ CONF_SUBDIRS="$CONF_SUBDIRS t1utils"
if false; then
subdirs="$subdirs t1utils"
@@ -6332,8 +6332,8 @@ fi
if test -x $srcdir/texdoctk/configure; then
- test "x$enable_texdoctk" = xno || SUBUTILS="$SUBUTILS texdoctk"
- DIST_SUBUTILS="$DIST_SUBUTILS texdoctk"
+ test "x$enable_texdoctk" = xno || MAKE_SUBDIRS="$MAKE_SUBDIRS texdoctk"
+ CONF_SUBDIRS="$CONF_SUBDIRS texdoctk"
if false; then
subdirs="$subdirs texdoctk"
@@ -6342,8 +6342,8 @@ fi
if test -x $srcdir/tpic2pdftex/configure; then
- test "x$enable_tpic2pdftex" = xno || SUBUTILS="$SUBUTILS tpic2pdftex"
- DIST_SUBUTILS="$DIST_SUBUTILS tpic2pdftex"
+ test "x$enable_tpic2pdftex" = xno || MAKE_SUBDIRS="$MAKE_SUBDIRS tpic2pdftex"
+ CONF_SUBDIRS="$CONF_SUBDIRS tpic2pdftex"
if false; then
subdirs="$subdirs tpic2pdftex"
@@ -6352,8 +6352,8 @@ fi
if test -x $srcdir/vlna/configure; then
- test "x$enable_vlna" = xno || SUBUTILS="$SUBUTILS vlna"
- DIST_SUBUTILS="$DIST_SUBUTILS vlna"
+ test "x$enable_vlna" = xno || MAKE_SUBDIRS="$MAKE_SUBDIRS vlna"
+ CONF_SUBDIRS="$CONF_SUBDIRS vlna"
if false; then
subdirs="$subdirs vlna"
@@ -6362,8 +6362,8 @@ fi
if test -x $srcdir/xindy/configure; then
- test "x$enable_xindy" = xno || SUBUTILS="$SUBUTILS xindy"
- DIST_SUBUTILS="$DIST_SUBUTILS xindy"
+ test "x$enable_xindy" = xno || MAKE_SUBDIRS="$MAKE_SUBDIRS xindy"
+ CONF_SUBDIRS="$CONF_SUBDIRS xindy"
if false; then
subdirs="$subdirs xindy"
@@ -6372,8 +6372,8 @@ fi
if test -x $srcdir/xpdfopen/configure; then
- test "x$enable_xpdfopen" = xno || SUBUTILS="$SUBUTILS xpdfopen"
- DIST_SUBUTILS="$DIST_SUBUTILS xpdfopen"
+ test "x$enable_xpdfopen" = xno || MAKE_SUBDIRS="$MAKE_SUBDIRS xpdfopen"
+ CONF_SUBDIRS="$CONF_SUBDIRS xpdfopen"
if false; then
subdirs="$subdirs xpdfopen"
@@ -6383,8 +6383,8 @@ fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUBUTILS" >&5
-$as_echo "$SUBUTILS" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE_SUBDIRS" >&5
+$as_echo "$MAKE_SUBDIRS" >&6; }
ac_config_files="$ac_config_files Makefile"
diff --git a/Build/source/utils/configure.ac b/Build/source/utils/configure.ac
index 0af9e03ca1c..712041c6480 100644
--- a/Build/source/utils/configure.ac
+++ b/Build/source/utils/configure.ac
@@ -21,22 +21,22 @@ KPSE_BASIC([utils])
AC_PROG_MKDIR_P
AC_MSG_CHECKING([for Utils programs to build])
-SUBUTILS=
-DIST_SUBUTILS=
+MAKE_SUBDIRS=
+CONF_SUBDIRS=
KPSE_FOR_PKGS([utils], [
if test -x $srcdir/Kpse_Pkg/configure; then
- test "x$enable_[]Kpse_pkg" = xno || SUBUTILS="$SUBUTILS Kpse_Pkg"
+ test "x$enable_[]Kpse_pkg" = xno || MAKE_SUBDIRS="$MAKE_SUBDIRS Kpse_Pkg"
dnl Cause 'make dist' to recurse into all subutils dirs
- DIST_SUBUTILS="$DIST_SUBUTILS Kpse_Pkg"
+ CONF_SUBDIRS="$CONF_SUBDIRS Kpse_Pkg"
dnl Cause 'configure -hr' and 'autoreconf' to recurse into all subutils dirs
if false; then
AC_CONFIG_SUBDIRS(Kpse_Pkg)
fi
fi
])
-AC_SUBST([SUBUTILS])
-AC_SUBST([DIST_SUBUTILS])
-AC_MSG_RESULT([$SUBUTILS])
+AC_SUBST([MAKE_SUBDIRS])
+AC_SUBST([CONF_SUBDIRS])
+AC_MSG_RESULT([$MAKE_SUBDIRS])
AC_CONFIG_FILES([Makefile])