From 030ac93ac520631dcf2cbe20591fe6031c42b24a Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Fri, 27 Mar 2009 09:51:14 +0000 Subject: new build system: minor cleanup git-svn-id: svn://tug.org/texlive/trunk@12527 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/Makefile.am | 1 + Build/source/Makefile.in | 1 + Build/source/README.cross | 22 +++++++++ Build/source/README.layout | 77 +++++++++++++++++++++++++++++++ Build/source/configure | 19 ++++++-- Build/source/libs/graphite/ac/graphite.ac | 2 +- Build/source/m4/kpse-setup.m4 | 10 ++++ Build/source/texk/kpathsea/Makefile.am | 27 +++++++---- Build/source/texk/kpathsea/Makefile.in | 33 ++++++++----- 9 files changed, 166 insertions(+), 26 deletions(-) create mode 100644 Build/source/README.layout diff --git a/Build/source/Makefile.am b/Build/source/Makefile.am index dd94e9b7677..5f8e2966eb8 100644 --- a/Build/source/Makefile.am +++ b/Build/source/Makefile.am @@ -7,6 +7,7 @@ DISTCHECK_CONFIGURE_FLAGS = -C EXTRA_DIST = \ Build \ README.cross \ + README.layout \ README.orig \ build-aux/README.TL \ m4/README diff --git a/Build/source/Makefile.in b/Build/source/Makefile.in index ce213c83390..1cbcaafb1c9 100644 --- a/Build/source/Makefile.in +++ b/Build/source/Makefile.in @@ -275,6 +275,7 @@ DISTCHECK_CONFIGURE_FLAGS = -C EXTRA_DIST = \ Build \ README.cross \ + README.layout \ README.orig \ build-aux/README.TL \ m4/README diff --git a/Build/source/README.cross b/Build/source/README.cross index a30f666dd44..4bdd18e4bde 100644 --- a/Build/source/README.cross +++ b/Build/source/README.cross @@ -1,3 +1,25 @@ Cross compiling =============== +In order to build the TL libraries and programs for a HOST system, e.g., +i386-pc-mingw32 on a (different) BUILD system, e.g, x86_64-linux-gnu specify +the configure options + --host=i386-pc-mingw32 --build=x86_64-linux-gnu + +You may need `cross' tools properly installed as, e.g., i386-pc-mingw32-cc +in your PATH. Configure arguments such as CFLAGS=... refer to this cross +compiler. + +If necessary, you can specify a compiler and flags for the few auxiliary C +programs required for the build process as configure arguments + BUILDCC=... + BUILDCPPFLAGS=... + BUILDCFLAGS=... + BUILDLDFLAGS=... + +Build the Web2C programs requires installed versions of tangle, ctangle, and +tie (and possibly otangle and/or luatangle). + +At the moment a cross compilation of xetex is not possible, because the +icu-xetex library does not support cross compilation. + diff --git a/Build/source/README.layout b/Build/source/README.layout new file mode 100644 index 00000000000..406154adf44 --- /dev/null +++ b/Build/source/README.layout @@ -0,0 +1,77 @@ + Layout of the teTeX / TeX Live (TL) build system + ================================================ + +The TL 2009 build system has been completely restructured, using Autoconf, +Automake, and Libtool. The main purpose was to configure and build each +library before configuring any module (program or other library) depending +on that library. This allows to check for properties and features of a +library built as part of the TL tree in much the same as for an installed +(system) version of that library. + +This should simplify upgrading of modules maintained independently and/or +integrating new modules into the TL build system. + +1. Layout of directories +======================== + +1.1. Overall layout +------------------- + +libs/*/* various libraries +texk/kpathsea/* the Kpathsea library + +texk/*/* programs (mostly using Kpathsea) +utils/*/* utility programs (not using Kpathsea) + +texk/am/* Makefile.am fragments +texk/web2c/am/* for the Kpathsea library +texk/web2c/*/am/* and the Web2C programs + +libs/Lib/* library Lib (zlib, libpng, t1lib, etc.) +texk/Prog/* program package Prog (web2c, afm2pl, bibtex8, etc.) +utils/Util/* utility program package Util (dialog, pdfopen, ps2eps, etc.) + +libs/dummy/* dummy modules +texk/dummy/* used to configure +utils/dummy/* the real modules + +ac/* various configure.ac fragments (configure options) +*/ac/* for the whole TL tree +*/*/ac/* or for a particular component + +build-aux/* auxiliary build scripts (config.guess etc.) + +m4/kpse-pkgs.m4 Autoconf macros defining the lists of Lib, Prog, and Util + modules and handling loops over these lists +m4/* other Autoconf macros + +1.2. A library `Lib' +-------------------- + +libs/Lib/ac/withenable.ac defines libraries required by Lib +libs/Lib/ac/Lib.ac defines basic tests for a system version of Lib +m4/kpse-Lib-flags.m4 defines Autoconf macros for configure options + as well as KPSE_LIB_FLAGS, to be used in configure.ac + files and defining Make variables + +Several libraries use an unmodified source tree supplemented by a proxy +build system (bypassing that of the source tree, e.g., + +libs/zlib/zlib-1.2.3/* (almost) unmodified source tree +libs/zlib/Makefile.am proxy Makefile.am +libs/zlib/configure.ac and configure.ac + +1.3. A program `Prog' +--------------------- + +texk/Prog/ac/withenable.ac defines libraries required by Prog, provides the + configure option --disable-Prog +texk/Prog/ac/Prog.ac defines Prog specific configure option that should + be seen at the top-level + +1.4. A utility program `Util' +----------------------------- + +utils/Util/ac/withenable.ac defines libraries required by Util, provides the + configure option --disable-Util + diff --git a/Build/source/configure b/Build/source/configure index 63a2be6f719..3bbe8997a7e 100755 --- a/Build/source/configure +++ b/Build/source/configure @@ -20107,6 +20107,7 @@ if test "x$with_kpathsea_libdir" != x && test "x$with_kpathsea_libdir" != xyes; fi + ## libs/zlib/ac/zlib.ac ## define required functions and headers from system zlib if test "x$need_zlib:$with_system_zlib" = 'xyes:yes'; then @@ -21706,6 +21707,11 @@ fi ## libs/graphite/ac/graphite.ac ## define required functions and headers from system graphite +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test "x$need_graphite:$with_system_graphite" = 'xyes:yes'; then { $as_echo "$as_me:$LINENO: checking requested system \`graphite' library..." >&5 $as_echo "$as_me: checking requested system \`graphite' library..." >&6;} @@ -21780,7 +21786,7 @@ $as_echo "$ac_try_echo") >&5 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || + test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || @@ -21856,7 +21862,7 @@ $as_echo "$ac_try_echo") >&5 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || + test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes @@ -21896,7 +21902,7 @@ $as_echo "$ac_try_echo") >&5 cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes @@ -21912,7 +21918,7 @@ rm -f conftest.err conftest.$ac_ext $as_echo "$ac_header_preproc" >&6; } # So? What about this header? -case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in +case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in yes:no: ) { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} @@ -21968,6 +21974,11 @@ fi done fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu ## libs/teckit/ac/teckit.ac diff --git a/Build/source/libs/graphite/ac/graphite.ac b/Build/source/libs/graphite/ac/graphite.ac index 2fd071f2f0a..8f6a683247c 100644 --- a/Build/source/libs/graphite/ac/graphite.ac +++ b/Build/source/libs/graphite/ac/graphite.ac @@ -1,3 +1,3 @@ ## libs/graphite/ac/graphite.ac ## define required functions and headers from system graphite -KPSE_CHECK_LIB([graphite], [free], [graphite/GrClient.h]) +KPSE_CHECK_LIBXX([graphite], [free], [graphite/GrClient.h]) diff --git a/Build/source/m4/kpse-setup.m4 b/Build/source/m4/kpse-setup.m4 index a4bcc01e432..61996a77ac0 100644 --- a/Build/source/m4/kpse-setup.m4 +++ b/Build/source/m4/kpse-setup.m4 @@ -140,3 +140,13 @@ AC_DEFUN([KPSE_CHECK_LIB], fi ]) # KPSE_CHECK_LIB +# KPSE_CHECK_LIBXX(LIB, REQUIRED-FUNCTION..., REQUIRED-HEADER...) +# ------------------------------------------------------------- +# As above, but for C++. +AC_DEFUN([KPSE_CHECK_LIBXX], +[AC_REQUIRE([AC_PROG_CXX])[]dnl +AC_LANG_PUSH([C++])[]dnl +KPSE_CHECK_LIB($@)[]dnl +AC_LANG_POP([C++])[]dnl +]) # KPSE_CHECK_LIBXX + diff --git a/Build/source/texk/kpathsea/Makefile.am b/Build/source/texk/kpathsea/Makefile.am index 31a213b04fa..fafdfa5ab1e 100644 --- a/Build/source/texk/kpathsea/Makefile.am +++ b/Build/source/texk/kpathsea/Makefile.am @@ -224,22 +224,22 @@ web2cdir = ${prefix}/texmf/web2c dist_web2c_SCRIPTS = mktexdir mktexnam mktexupd -dist_noinst_SCRIPTS = mktexlsr mktexmf mktexpk mktextfm - dist_web2c_DATA = mktex.opt mktexdir.opt mktexnam.opt +dist_noinst_SCRIPTS = mktexlsr mktexmf mktexpk mktextfm + dist_noinst_DATA = texmf.cnf -## Must install the `dist_noinst_SCRIPTS' by `install-data-hook' because -## Automake installs the scripts (and thus creates `web2cdir') by `install-data'. -install-data-hook: +install-exec-hook: @for f in $(dist_noinst_SCRIPTS); do \ - if grep "original $$f --" "$(DESTDIR)$(web2cdir)/$$f" >/dev/null 2>&1 \ - || test ! -r "$(DESTDIR)$(web2cdir)/$$f"; then \ - echo " $(INSTALL_SCRIPT) '$(srcdir)/$$f' '$(DESTDIR)$(web2cdir)/$$f'"; \ - $(INSTALL_SCRIPT) "$(srcdir)/$$f" "$(DESTDIR)$(web2cdir)/$$f"; \ + if grep "original $$f --" "$(DESTDIR)$(bindir)/$$f" >/dev/null 2>&1 \ + || test ! -r "$(DESTDIR)$(bindir)/$$f"; then \ + echo " $(INSTALL_SCRIPT) '$(srcdir)/$$f' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_SCRIPT) "$(srcdir)/$$f" "$(DESTDIR)$(bindir)/$$f"; \ else :; fi; \ done + +install-data-hook: @for f in $(dist_noinst_DATA); do \ if grep "original $$f --" "$(DESTDIR)$(web2cdir)/$$f" >/dev/null 2>&1 \ || test ! -r "$(DESTDIR)$(web2cdir)/$$f"; then \ @@ -249,7 +249,14 @@ install-data-hook: done uninstall-hook: - @for f in $(dist_noinst_SCRIPTS) $(dist_noinst_DATA); do \ + @for f in $(dist_noinst_SCRIPTS); do \ + if grep "original $$f --" "$(DESTDIR)$(bindir)/$$f" >/dev/null 2>&1 \ + || test ! -r "$(DESTDIR)$(bindir)/$$f"; then \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + else :; fi; \ + done + @for f in $(dist_noinst_DATA); do \ if grep "original $$f --" "$(DESTDIR)$(web2cdir)/$$f" >/dev/null 2>&1 \ || test ! -r "$(DESTDIR)$(web2cdir)/$$f"; then \ echo " rm -f '$(DESTDIR)$(web2cdir)/$$f'"; \ diff --git a/Build/source/texk/kpathsea/Makefile.in b/Build/source/texk/kpathsea/Makefile.in index a01f773beb3..95b3b4ddbf7 100644 --- a/Build/source/texk/kpathsea/Makefile.in +++ b/Build/source/texk/kpathsea/Makefile.in @@ -421,8 +421,8 @@ kpsereadlink_SOURCES = readlink.c kpsewhich_LDADD = libkpathsea.la web2cdir = ${prefix}/texmf/web2c dist_web2c_SCRIPTS = mktexdir mktexnam mktexupd -dist_noinst_SCRIPTS = mktexlsr mktexmf mktexpk mktextfm dist_web2c_DATA = mktex.opt mktexdir.opt mktexnam.opt +dist_noinst_SCRIPTS = mktexlsr mktexmf mktexpk mktextfm dist_noinst_DATA = texmf.cnf all: $(BUILT_SOURCES) c-auto.h $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -1467,6 +1467,8 @@ install-data-am: install-dist_web2cDATA install-dist_web2cSCRIPTS \ install-dvi: install-dvi-recursive install-exec-am: install-binPROGRAMS install-libLTLIBRARIES + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-recursive @@ -1507,7 +1509,7 @@ uninstall-am: uninstall-binPROGRAMS uninstall-dist_web2cDATA \ $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \ - install-data-am install-strip uninstall-am + install-data-am install-exec-am install-strip uninstall-am .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-binPROGRAMS \ @@ -1520,9 +1522,9 @@ uninstall-am: uninstall-binPROGRAMS uninstall-dist_web2cDATA \ install install-am install-binPROGRAMS install-data \ install-data-am install-data-hook install-dist_web2cDATA \ install-dist_web2cSCRIPTS install-dvi install-dvi-am \ - install-exec install-exec-am install-html install-html-am \ - install-info install-info-am install-kpseincludeHEADERS \ - install-libLTLIBRARIES install-man \ + install-exec install-exec-am install-exec-hook install-html \ + install-html-am install-info install-info-am \ + install-kpseincludeHEADERS install-libLTLIBRARIES install-man \ install-nodist_kpseincludeHEADERS install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ @@ -1572,14 +1574,16 @@ stamp-paths: texmf.cnf rm -f paths.tmp date >stamp-paths -install-data-hook: +install-exec-hook: @for f in $(dist_noinst_SCRIPTS); do \ - if grep "original $$f --" "$(DESTDIR)$(web2cdir)/$$f" >/dev/null 2>&1 \ - || test ! -r "$(DESTDIR)$(web2cdir)/$$f"; then \ - echo " $(INSTALL_SCRIPT) '$(srcdir)/$$f' '$(DESTDIR)$(web2cdir)/$$f'"; \ - $(INSTALL_SCRIPT) "$(srcdir)/$$f" "$(DESTDIR)$(web2cdir)/$$f"; \ + if grep "original $$f --" "$(DESTDIR)$(bindir)/$$f" >/dev/null 2>&1 \ + || test ! -r "$(DESTDIR)$(bindir)/$$f"; then \ + echo " $(INSTALL_SCRIPT) '$(srcdir)/$$f' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_SCRIPT) "$(srcdir)/$$f" "$(DESTDIR)$(bindir)/$$f"; \ else :; fi; \ done + +install-data-hook: @for f in $(dist_noinst_DATA); do \ if grep "original $$f --" "$(DESTDIR)$(web2cdir)/$$f" >/dev/null 2>&1 \ || test ! -r "$(DESTDIR)$(web2cdir)/$$f"; then \ @@ -1589,7 +1593,14 @@ install-data-hook: done uninstall-hook: - @for f in $(dist_noinst_SCRIPTS) $(dist_noinst_DATA); do \ + @for f in $(dist_noinst_SCRIPTS); do \ + if grep "original $$f --" "$(DESTDIR)$(bindir)/$$f" >/dev/null 2>&1 \ + || test ! -r "$(DESTDIR)$(bindir)/$$f"; then \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + else :; fi; \ + done + @for f in $(dist_noinst_DATA); do \ if grep "original $$f --" "$(DESTDIR)$(web2cdir)/$$f" >/dev/null 2>&1 \ || test ! -r "$(DESTDIR)$(web2cdir)/$$f"; then \ echo " rm -f '$(DESTDIR)$(web2cdir)/$$f'"; \ -- cgit v1.2.3