summaryrefslogtreecommitdiff
path: root/Build/source/utils/Makefile.am
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2009-03-20 08:07:15 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2009-03-20 08:07:15 +0000
commitb89093a4be8467433b6dbabfa09b57e213a53fe0 (patch)
tree6f4fb6eecce8905febf68c34d5926699790466e1 /Build/source/utils/Makefile.am
parent10d837d22d7d99b26f44847f92501f6037da4ec2 (diff)
new build system
git-svn-id: svn://tug.org/texlive/trunk@12451 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/utils/Makefile.am')
-rw-r--r--Build/source/utils/Makefile.am57
1 files changed, 57 insertions, 0 deletions
diff --git a/Build/source/utils/Makefile.am b/Build/source/utils/Makefile.am
new file mode 100644
index 00000000000..a6966029299
--- /dev/null
+++ b/Build/source/utils/Makefile.am
@@ -0,0 +1,57 @@
+##
+ACLOCAL_AMFLAGS = -I ../m4
+
+SUBDIRS = dummy . $(SUBUTILS)
+DIST_SUBDIRS = dummy $(DIST_SUBUTILS)
+
+EXTRA_DIST = README.orig
+
+SUBUTILS_AUX = subutilsdir-configure subutilsdir-conf.args
+noinst_DATA = $(SUBUTILS_AUX)
+
+DISTCLEANFILES = $(noinst_DATA)
+
+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 libraries were not built.
+
+## Sequentially configure and optionally build all utils subdirs;
+## code inspired by automake's way to handle recursive targets.
+subutils: $(noinst_DATA)
+ @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 $(SUBUTILS_AUX) | sed "s,SUBUTILSDIR,$$subutils,g"`; \
+ case " $(SUBUTILS) " in \
+ *" $$subutils "*) skip=;; \
+ *) skip=' --disable-build';; \
+ esac; \
+ (cd $$subutils && echo "=== configuring in $$subutils (`pwd`)" && \
+ echo "make: running $(SHELL) $$cmd$$skip" && \
+ eval $(SHELL) $$cmd$$skip) && \
+ 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"
+
+subutilsdir-configure:
+ @echo "make in ./dummy failed to create the file $@"
+ exit 1
+
+subutilsdir-conf.args:
+ @echo "configure in ./dummy failed to create the file $@"
+ exit 1
+