diff options
author | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-04-24 08:56:10 +0000 |
---|---|---|
committer | Peter Breitenlohner <peb@mppmu.mpg.de> | 2012-04-24 08:56:10 +0000 |
commit | 8c9e19999acc6964e0ea1689190296b3b61cf7df (patch) | |
tree | f2b29c9296a71f2fd45183d8f263df0b336b54ea /Build/source/m4 | |
parent | ea36cf4d769e5c6188d49363c8db5a85a7aee35b (diff) |
build system: Replace sed substitutions in configure by m4_bpatsubst() at autoconf time
git-svn-id: svn://tug.org/texlive/trunk@26120 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/m4')
-rw-r--r-- | Build/source/m4/ChangeLog | 9 | ||||
-rw-r--r-- | Build/source/m4/kpse-common.m4 | 42 | ||||
-rw-r--r-- | Build/source/m4/kpse-obsdcompat-flags.m4 | 6 |
3 files changed, 29 insertions, 28 deletions
diff --git a/Build/source/m4/ChangeLog b/Build/source/m4/ChangeLog index 1d00a960459..61367849e6b 100644 --- a/Build/source/m4/ChangeLog +++ b/Build/source/m4/ChangeLog @@ -1,3 +1,12 @@ +2012-04-24 Peter Breitenlohner <peb@mppmu.mpg.de> + + * kpse-common.m4 (_KPSE_LIB_FLAGS_TL): Replace sed substitutions + in configure by m4_bpatsubst() at autoconf time. + +2012-04-23 Peter Breitenlohner <peb@mppmu.mpg.de> + + * kpse-obsdcompat-flags.m4: Correct SRC/BLD dependencies. + 2012-03-11 Karl Berry <karl@tug.org> * kpse-xpdf-flags.m4 (KPSE_XPDF_OPTIONS): tweak help text slightly. diff --git a/Build/source/m4/kpse-common.m4 b/Build/source/m4/kpse-common.m4 index c3819e31d18..4d472482950 100644 --- a/Build/source/m4/kpse-common.m4 +++ b/Build/source/m4/kpse-common.m4 @@ -1,13 +1,11 @@ # Public macros for the TeX Live (TL) tree. -# Copyright (C) 1995 - 2009 Karl Berry <tex-live@tug.org> -# Copyright (C) 2009, 2010 Peter Breitenlohner <tex-live@tug.org> +# Copyright (C) 1995-2009 Karl Berry <tex-live@tug.org> +# Copyright (C) 2009-2012 Peter Breitenlohner <tex-live@tug.org> # # This file is free software; the copyright holders # give unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 0 - # KPSE_LIBS_PREPARE # ----------------- # Enforce inclusion of this file. @@ -64,6 +62,8 @@ AC_LANG(_AC_LANG)[]dnl # # Set the make variables LIBDIR_INCLUDES and LIBDIR_LIBS to the CPPFLAGS and # LIBS required for the library in the directory libs/LIBDIR/ of the TL tree. +# The resulting values may be used by configure tests; thus they must not +# use, e.g., ${srcdir} or ${top_builddir}. # # If an installed (system) version of the library has been selected or is # implied, then execute KPSE_LIBDIR_SYSTEM_FLAGS to set the two variables. @@ -114,29 +114,23 @@ if test "x$with_system_[]AS_TR_SH($1)" = xyes; then ]AS_TR_CPP([kpse-$1-system-flags])[[]dnl else ])[]dnl m4_if - AS_TR_CPP($1)[_INCLUDES=`echo '$4' | sed \ - -e "s,SRC/,$kpse_SRC/,g" \ - -e "s,BLD/,$kpse_BLD/,g"`] - AS_TR_CPP($1)[_LIBS=`echo '$5' | sed \ - -e "s,BLD/,$kpse_BLD/,g"` - $6] - m4_ifdef([Kpse_TeX_Lib], - [AS_TR_CPP($1)[_DEPEND=`echo '$5' | sed \ - -e 's,BLD/texk/,${top_builddir}/../,g'`] - AS_TR_CPP($1)[_RULE='# Rebuild lib$2 -$(]AS_TR_CPP($1)[_DEPEND):]m4_ifval([$7], - [[ $7]])m4_ifval([$8], [[ $8 - cd ${top_builddir}/../$1 && $(MAKE) $(AM_MAKEFLAGS) rebuild -$8:]])[ - cd ${top_builddir}/../$1 && $(MAKE) $(AM_MAKEFLAGS) rebuild']], - [AS_TR_CPP($1)[_DEPEND=`echo '$5' | sed \ - -e 's,BLD/,${top_builddir}/../../,g'`] - AS_TR_CPP($1)[_RULE='# Rebuild lib$2 + AS_TR_CPP($1)[_INCLUDES=]m4_bpatsubst(m4_bpatsubst(["$4"], [SRC], [$kpse_SRC]), + [BLD], [$kpse_BLD]) + AS_TR_CPP($1)[_LIBS=]m4_bpatsubst(["$5"], [BLD], [$kpse_BLD])m4_ifval([$6], [[ + $6]]) + AS_TR_CPP($1)[_DEPEND=]m4_ifdef([Kpse_TeX_Lib], + [m4_bpatsubst(['$5'], [BLD/texk], + [${top_builddir}/..])m4_pushdef([Kpse_Lib_Bld], + [..])], + [m4_bpatsubst(['$5'], [BLD], + [${top_builddir}/../..])m4_pushdef([Kpse_Lib_Bld], + [../../libs])]) + AS_TR_CPP($1)[_RULE='# Rebuild lib$2 $(]AS_TR_CPP($1)[_DEPEND):]m4_ifval([$7], [[ $7]])m4_ifval([$8], [[ $8 - cd ${top_builddir}/../../libs/$1 && $(MAKE) $(AM_MAKEFLAGS) rebuild + cd ${top_builddir}/]Kpse_Lib_Bld[/$1 && $(MAKE) $(AM_MAKEFLAGS) rebuild $8:]])[ - cd ${top_builddir}/../../libs/$1 && $(MAKE) $(AM_MAKEFLAGS) rebuild']]) + cd ${top_builddir}/]Kpse_Lib_Bld[/$1 && $(MAKE) $(AM_MAKEFLAGS) rebuild']m4_popdef([Kpse_Lib_Bld]) m4_if(m4_index([ $3 ], [ tree ]), [-1], [fi ])[]dnl m4_if diff --git a/Build/source/m4/kpse-obsdcompat-flags.m4 b/Build/source/m4/kpse-obsdcompat-flags.m4 index 0a093b0be6b..16f6bc94bbd 100644 --- a/Build/source/m4/kpse-obsdcompat-flags.m4 +++ b/Build/source/m4/kpse-obsdcompat-flags.m4 @@ -1,12 +1,10 @@ # Public macros for the TeX Live (TL) tree. -# Copyright (C) 2009 Peter Breitenlohner <tex-live@tug.org> +# Copyright (C) 2009, 2012 Peter Breitenlohner <tex-live@tug.org> # # This file is free software; the copyright holder # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 0 - # KPSE_OBSDCOMPAT_FLAGS # --------------------- # Set the make variables OBSDCOMPAT_INCLUDES and OBSDCOMPAT_LIBS to @@ -16,5 +14,5 @@ AC_DEFUN([KPSE_OBSDCOMPAT_FLAGS], [_KPSE_LIB_FLAGS([obsdcompat], [openbsd-compat], [tree], [-IBLD/libs/obsdcompat -ISRC/libs/obsdcompat], [BLD/libs/obsdcompat/libopenbsd-compat.a], [], - [], [${top_srcdir}/../../libs/obsdcompat/*.[ch]])[]dnl + [${top_srcdir}/../../libs/obsdcompat/*.[ch]])[]dnl ]) # KPSE_OBSDCOMPAT_FLAGS |