summaryrefslogtreecommitdiff
path: root/Build/source/texk
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/texk
parent10d837d22d7d99b26f44847f92501f6037da4ec2 (diff)
new build system
git-svn-id: svn://tug.org/texlive/trunk@12451 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/texk')
-rw-r--r--Build/source/texk/Makefile.am57
-rw-r--r--Build/source/texk/configure.ac45
2 files changed, 102 insertions, 0 deletions
diff --git a/Build/source/texk/Makefile.am b/Build/source/texk/Makefile.am
new file mode 100644
index 00000000000..b0c1b0f3688
--- /dev/null
+++ b/Build/source/texk/Makefile.am
@@ -0,0 +1,57 @@
+##
+ACLOCAL_AMFLAGS = -I ../m4
+
+SUBDIRS = dummy . $(SUBTEXK)
+DIST_SUBDIRS = dummy $(DIST_SUBTEXK)
+
+EXTRA_DIST = README.orig
+
+SUBTEXK_AUX = subtexkdir-configure subtexkdir-conf.args
+noinst_DATA = $(SUBTEXK_AUX)
+
+DISTCLEANFILES = $(noinst_DATA)
+
+all-local: subtexk
+
+.PHONY: subtexk
+## We must configure all texk 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 texk subdirs;
+## code inspired by automake's way to handle recursive targets.
+subtexk: $(noinst_DATA)
+ @failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ list='$(DIST_SUBTEXK)'; for subtexk in $$list; do \
+ if test ! -f $$subtexk/Makefile; then \
+ test -d $$subtexk || $(MKDIR_P) $$subtexk; \
+ cmd=`cat $(SUBTEXK_AUX) | sed "s,SUBTEXKDIR,$$subtexk,g"`; \
+ case " $(SUBTEXK) " in \
+ *" $$subtexk "*) skip=;; \
+ *) skip=' --disable-build';; \
+ esac; \
+ (cd $$subtexk && echo "=== configuring in $$subtexk (`pwd`)" && \
+ echo "make: running $(SHELL) $$cmd$$skip" && \
+ eval $(SHELL) $$cmd$$skip) && \
+ if test "x$$skip" = x; then \
+ echo "Making all in $$subtexk" && \
+ (cd $$subtexk && $(MAKE) $(AM_MAKEFLAGS) all); \
+ fi || eval $$failcom; \
+ fi; \
+ done; test -z "$$fail"
+
+subtexkdir-configure:
+ @echo "make in ./dummy failed to create the file $@"
+ exit 1
+
+subtexkdir-conf.args:
+ @echo "configure in ./dummy failed to create the file $@"
+ exit 1
+
diff --git a/Build/source/texk/configure.ac b/Build/source/texk/configure.ac
new file mode 100644
index 00000000000..f1ca2e39143
--- /dev/null
+++ b/Build/source/texk/configure.ac
@@ -0,0 +1,45 @@
+dnl Process this file with autoconf to produce a configure script.
+dnl
+dnl Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org>
+dnl
+dnl This file is free software; the copyright holder
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+AC_INIT([TeX Live texk], [1.1], [peb@mppmu.mpg.de])
+AC_PREREQ([2.63])
+AC_CONFIG_SRCDIR([../build-aux/missing])
+AC_CONFIG_AUX_DIR([../build-aux])
+AC_CONFIG_MACRO_DIR([../m4])
+
+dnl See comment in ../configure.ac
+KPSE_SETUP([../])
+
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
+AM_MAINTAINER_MODE
+
+AC_PROG_MKDIR_P
+
+AC_CONFIG_SUBDIRS([dummy])
+
+AC_MSG_CHECKING([for TeXk programs to build])
+SUBTEXK=
+DIST_SUBTEXK=
+KPSE_FOR_PKGS([texk], [
+if test -x $srcdir/Kpse_Pkg/configure; then
+ test "x$enable_[]Kpse_pkg" = xno || SUBTEXK="$SUBTEXK Kpse_Pkg"
+dnl Cause 'make dist' to recurse into all subtexk dirs
+ DIST_SUBTEXK="$DIST_SUBTEXK Kpse_Pkg"
+dnl Cause 'configure -hr' and 'autoreconf' to recurse into all subtexk dirs
+ if false; then
+ AC_CONFIG_SUBDIRS(Kpse_Pkg)
+ fi
+fi
+])
+AC_SUBST([SUBTEXK])
+AC_SUBST([DIST_SUBTEXK])
+AC_MSG_RESULT([$SUBTEXK])
+
+AC_CONFIG_FILES([Makefile])
+
+AC_OUTPUT