From 2637b1cad34ea6c102f43a466c3124443a6f20d1 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Fri, 7 Aug 2009 09:41:57 +0000 Subject: build system: minor update git-svn-id: svn://tug.org/texlive/trunk@14571 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/Makefile.am | 1 + Build/source/Makefile.in | 1 + Build/source/README.hacking | 149 ++++++++++++++++++++++++++++++++++++++++++++ Build/source/README.layout | 65 ------------------- Build/source/configure | 20 +++--- Build/source/configure.ac | 2 +- 6 files changed, 162 insertions(+), 76 deletions(-) create mode 100644 Build/source/README.hacking (limited to 'Build/source') diff --git a/Build/source/Makefile.am b/Build/source/Makefile.am index 83d0ace9cad..ef6b765309c 100644 --- a/Build/source/Makefile.am +++ b/Build/source/Makefile.am @@ -14,6 +14,7 @@ EXTRA_DIST = \ Build \ README.config \ README.cross \ + README.hacking \ README.layout \ build-aux/README.TL \ build-aux/mkinstalldirs \ diff --git a/Build/source/Makefile.in b/Build/source/Makefile.in index 2a8901b859f..ccf647ad3e0 100644 --- a/Build/source/Makefile.in +++ b/Build/source/Makefile.in @@ -317,6 +317,7 @@ EXTRA_DIST = \ Build \ README.config \ README.cross \ + README.hacking \ README.layout \ build-aux/README.TL \ build-aux/mkinstalldirs \ diff --git a/Build/source/README.hacking b/Build/source/README.hacking new file mode 100644 index 00000000000..ea7be2aaf6f --- /dev/null +++ b/Build/source/README.hacking @@ -0,0 +1,149 @@ +Copyright (C) 2009 Peter Breitenlohner +You may freely use, modify and/or distribute this file. + + Modifying the TeX Live (TL) build system + ======================================== + +1. Versions of Tools +==================== + +autoconf (GNU Autoconf) 2.63 + +automake (GNU automake) 1.11 + +ltmain.sh (GNU libtool) 2.2.6 + +bison (GNU Bison) 2.4.1 + +flex 2.5.35 + +2. Updating the TL build system +=============================== + +When anything in the TL build system (configure.ac and Makefile.am files +with their fragments or M4 macros in m4/) has been modified you have to +rebuild the coresponding configure, Makefile.in, and config.h or c-auto,h +files. + +This is most easily done automatically using maintainer-mode. The files in +the SVN repository are all up to date, but some of them may be rebuilt in +maintainer-mode due to their relative timestamps. This will eventually be +fixed, once everything has stabilized. + +Alternatively, you can run the 'reautoconf' script from the top-level. + +The 'config.guess', 'config.sub', etc. files for most packages are kept +centrally in build-aux/. There are, however, independent copies in, e.g., +libs/freetype/freetype-1.5/, libs/freetype2/freetype-2.3.8/builds/unix/, and +similar places that might need updating (not done automatically by the +'reautoconf' script). + +3. Extending the TL build system +================================ + +3.1 Adding a new program directory +---------------------------------- + +To add a new program directory utils/Util/ (not using Kpathsea) or +texk/Prog/ (possibly using Kpathsea) you must add the directory Util to the +M4 list kpse_utils_pkgs or Prog to the M4 list kpse_texk_pkgs defined in +m4/kpse-pkgs.m4. In addition you must create a configure.ac fragment +utils/Util/ac/witheanble.ac or texk/Prog/ac/witheanble.ac defining any +required libraries from the TL tree and whether this new program is to be +built by default (in the absence of the corresponding '--enable-Util/Prog' +or '--disable-Util/Prog' configure options). If a program in texk/Prog/ or +utils/Util/ requires specific configure options to be seen at the top-level, +they should be defined in an additional configure.ac fragment +texk/Prog/ac/Prog.ac or utils/Util/ac/Util.ac (included from +texk/Prog/ac/withenable.ac and texk/Prog/configure.ac or +utils/Util/ac/withenable.ac and utils/Util/configure.ac) as, e.g., for +texk/web2c/, texk/xdvik/, and utils/xindy/. + +As example, the file texk/dvipdfmx/ac/withenable.ac contains + KPSE_ENABLE_PROG([dvipdfmx], [kpathsea libpng]) +where KPSE_ENABLE_PROG, defined in m4/kpse-setup.m4, has one required +argument -- the name of the subdirectory -- and three optional arguments: a +list of required TL libraries (zlib is implied by libpng and need not be +mentioned), a list of options ('disable' if this program is not built by +default), and a comment added to the help text for the disable or enable +configure option for this program. + +3.2 Adding a new library directory +---------------------------------- + +To add a new library directory libs/Lib/ you must add the directory Lib to +the M4 list kpse_libs_pkgs defined in m4/kpse-pkgs.m4. In addition you must +create a configure.ac fragment libs/Lib/ac/witheanble.ac defining any +required libraries from the TL tree and whether an installed (system) +version of this library can be used. If that is the case, another +configure.ac fragment libs/Lib/ac/Lib.ac must define (AC_CHECK_FUNCS and +AC_CHECK_HEADERS) tests for a system version to be acceptable. Finally you +must create a file m4/kpse-Lib-flags.m4 defining the M4 macro KPSE_LIB_FLAGS +(where 'LIB' is a sanitized uppercase version of 'Lib') setting up the Make +variables LIB_INCLUDES, LIB_LIBS, and LIB_DEPEND with the required values +for CPPFLAGS, LDADD, and dependencies, as well as LIB_RULE with a +(multiline) Make rule to rebuild that library when necessary. + +If a system version of the library can be used, another M4 macro +KPSE_LIB_SYSTEM_FLAGS in m4/kpse-Lib-flags.m4 must define values for +LIB_INCLUDES and LIB_LIBS, usually depending on values for the configure +options '--with-Lib-includes' and/or '--with-Lib-libdir', and you must add +the line 'AC_REQUIRE([KPSE_LIB_SYSTEM_FLAGS])' to the definition of the M4 +macro KPSE_ALL_SYSTEM_FLAGS in m4/kpse-pkgs.m4. + +As example, the file libs/libpng/kpse/withenable.ac contains + KPSE_WITH_LIB([libpng], [zlib]) +where KPSE_WITH_LIB, defined in m4/kpse-setup.m4, has one required argument +-- the name of the subdirectory -- and two optional arguments: a list of +required TL libraries, and a list of options ('tree' if only the library +from the TL can be used). The file libs/libpng/ac/libpng.ac contains + KPSE_CHECK_LIB([libpng], [png_set_read_fn], [png.h]) +indicating that the Autoconf macro calls + AC_CHECK_FUNCS([png_set_read_fn]) + AC_CHECK_HEADERS([png.h]) +shall be used as sanity check for using an installed PNG library. + +4. Using libraries from the TL tree +=================================== + +The TL build system provides Autoconf macros for all libraries in the TL +tree. A program requiring additional libraries must use standard Autoconf +and Automake features (such as AC_ARG_WITH to specify their installation +directories, AC_CHECK_LIB and AC_CHECK_FUNCS for library functions, +AC_CHECK_HEADERS for header files). + +4.1 configure.ac +---------------- + +In order to use, e.g., libpng (either an installed version or from the TL +tree) configure.ac must use KPSE_ZLIB_FLAGS and KPSE_LIBPNG_FLAGS. As a +consequence the Make variables LIBPNG_DEPEND, LIBPNG_INCLUDES, LIBPNG_LIBS, +and LIBPNG_RULE will be defined. + +A program may wish to examine features of the PNG library. To do so +configure.ac must use + KPSE_ADD_FLAGS([zlib]) +followed by test for zlib features (if any) and + KPSE_ADD_FLAGS([libpng]) +followed by tests for libpng features. These macros temporarily add +appropriate values to CPPFLAGS and LIBS. The tests must be terminated by + KPSE_RESTORE_FLAGS +in order to restore CPPFLAGS and LIBS to their former values. + +4.2 Makefile.am +--------------- + +In order to use, e.g., libpng (and zlib) the Make variables mentioned above +must be used in Makefile.am as follows + +$(LIBPNG_INCLUDES) $(ZLIB_INCLUDES) must be added to either INCLUDES or +AM_CPPFLAGS (or target specific target_CPPFLAGS). + +$(LIBPNG_LIBS) $(ZLIB_LIBS) must be added to LDADD or target_LDADD. + +$(LIBPNG_DEPEND) $(ZLIB_DEPEND) should be added to target_DEPENDENCIES such +that rebuilding zlib and/or libpng causes the target to be rebuilt. + +Two lines containing @ZLIB_RULE@ and @LIBPNG_RULE@ create rules to +(re-)build zlib and libpng when necessary. + diff --git a/Build/source/README.layout b/Build/source/README.layout index 590911f48dc..586c46e9eb8 100644 --- a/Build/source/README.layout +++ b/Build/source/README.layout @@ -174,68 +174,3 @@ Similarly, when, e.g., building e-TeX has been disabled (as by default), you can run 'make etex' (or 'make etex.exe') in the subdirectory texk/web2c/ to build e-TeX (although there is no simple way to have e-TeX installed). -4. Extending the TL build system -================================ - -4.1 Adding a new program directory ----------------------------------- - -To add a new program directory utils/Util/ (not using Kpathsea) or -texk/Prog/ (possibly using Kpathsea) you must add the directory Util to the -M4 list kpse_utils_pkgs or Prog to the M4 list kpse_texk_pkgs defined in -m4/kpse-pkgs.m4. In addition you must create a configure.ac fragment -utils/Util/ac/witheanble.ac or texk/Prog/ac/witheanble.ac defining any -required libraries from the TL tree and whether this new program is to be -built by default (in the absence of the corresponding '--enable-Util/Prog' -or '--disable-Util/Prog' configure options). If a program in texk/Prog/ or -utils/Util/ requires specific configure options to be seen at the top-level, -they should be defined in an additional configure.ac fragment -texk/Prog/ac/Prog.ac or utils/Util/ac/Util.ac (included from -texk/Prog/ac/withenable.ac or utils/Util/ac/withenable.ac and -texk/Prog/configure.ac (as, e.g., for texk/web2c/, texk/xdvik/, and -utils/xindy/). - -4.2 Adding a new library directory ----------------------------------- - -To add a new library directory libs/Lib/ you must add the directory Lib to -the M4 list kpse_libs_pkgs defined in m4/kpse-pkgs.m4. In addition you must -create a configure.ac fragment libs/Lib/ac/witheanble.ac defining any -required libraries from the TL tree and whether an installed (system) -version of this library can be used. If that is the case, another -configure.ac fragment libs/Lib/ac/Lib.ac must define (AC_CHECK_FUNCS and -AC_CHECK_HEADERS) tests for a system version to be acceptable. Finally you -must create a file m4/kpse-Lib-flags.m4 defining the M4 macro KPSE_LIB_FLAGS -(where 'LIB' is a sanitized uppercase version of 'Lib') setting up the Make -variables LIB_INCLUDES, LIB_LIBS, and LIB_DEPEND with the required values -for CPPFLAGS, LDADD, and dependencies, as well as LIB_RULE with a -(multiline) Make rule to rebuild that library when necessary. - -If a system version of the library can be used, another M4 macro -KPSE_LIB_SYSTEM_FLAGS in m4/kpse-Lib-flags.m4 must define values for -LIB_INCLUDES and LIB_LIBS, usually depending on values for the configure -options '--with-Lib-includes' and/or '--with-Lib-libdir', and you must add -the line 'AC_REQUIRE([KPSE_LIB_SYSTEM_FLAGS])' to the definition of the M4 -macro KPSE_ALL_SYSTEM_FLAGS in m4/kpse-pkgs.m4. - -5. Updating the TL build system -=============================== - -When anything in the TL build system (configure.ac and Makefile.am files -with their fragments or M4 macros in m4/) has been modified you have to -rebuild the coresponding configure, Makefile.in, and config.h or c-auto,h -files. - -This is most easily done automatically using maintainer-mode. The files in -the SVN repository are all up to date, but some of them may be rebuilt in -maintainer-mode due to their relative timestamps. This will eventually be -fixed, once everything has stabilized. - -Alternatively, you can run the 'reautoconf' script from the top-level. - -The 'config.guess', 'config.sub', etc. files for most packages are kept -centrally in build-aux/. There are, however, independent copies in, e.g., -libs/freetype/freetype-1.5/, libs/freetype2/freetype-2.3.8/builds/unix/, and -similar places that might need updating (not done automatically by the -'reautoconf' script). - diff --git a/Build/source/configure b/Build/source/configure index ac69e789ba2..13ff58c687c 100755 --- a/Build/source/configure +++ b/Build/source/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.63 for TeX Live 2009-07-13. +# Generated by GNU Autoconf 2.63 for TeX Live 2009-08-07. # # Report bugs to . # @@ -745,8 +745,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='TeX Live' PACKAGE_TARNAME='tex-live' -PACKAGE_VERSION='2009-07-13' -PACKAGE_STRING='TeX Live 2009-07-13' +PACKAGE_VERSION='2009-08-07' +PACKAGE_STRING='TeX Live 2009-08-07' PACKAGE_BUGREPORT='tex-k@tug.org' ac_unique_file="m4/kpse-pkgs.m4" @@ -1619,7 +1619,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures TeX Live 2009-07-13 to adapt to many kinds of systems. +\`configure' configures TeX Live 2009-08-07 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1693,7 +1693,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of TeX Live 2009-07-13:";; + short | recursive ) echo "Configuration of TeX Live 2009-08-07:";; esac cat <<\_ACEOF @@ -1953,7 +1953,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -TeX Live configure 2009-07-13 +TeX Live configure 2009-08-07 generated by GNU Autoconf 2.63 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -1967,7 +1967,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by TeX Live $as_me 2009-07-13, which was +It was created by TeX Live $as_me 2009-08-07, which was generated by GNU Autoconf 2.63. Invocation command line was $ $0 $@ @@ -8810,7 +8810,7 @@ fi # Define the identity of the package. PACKAGE='tex-live' - VERSION='2009-07-13' + VERSION='2009-08-07' cat >>confdefs.h <<_ACEOF @@ -23943,7 +23943,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by TeX Live $as_me 2009-07-13, which was +This file was extended by TeX Live $as_me 2009-08-07, which was generated by GNU Autoconf 2.63. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -23997,7 +23997,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -TeX Live config.status 2009-07-13 +TeX Live config.status 2009-08-07 configured by $0, generated by GNU Autoconf 2.63, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" diff --git a/Build/source/configure.ac b/Build/source/configure.ac index 89ba8421650..f5c92da7dbc 100644 --- a/Build/source/configure.ac +++ b/Build/source/configure.ac @@ -6,7 +6,7 @@ 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], [2009-07-13], [tex-k@tug.org]) +AC_INIT([TeX Live], [2009-08-07], [tex-k@tug.org]) AC_PREREQ([2.63]) AC_CONFIG_SRCDIR([m4/kpse-pkgs.m4]) AC_CONFIG_AUX_DIR([build-aux]) -- cgit v1.2.3