]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
AM_GNU_GETTEXT: Use new build-to-host.m4 from gnulib.
authorBruno Haible <bruno@clisp.org>
Sun, 19 Feb 2023 05:37:24 +0000 (06:37 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 19 Feb 2023 05:40:19 +0000 (06:40 +0100)
* autogen.sh: Copy m4/build-to-host.m4 from gnulib.
* gettext-runtime/m4/Makefile.am (EXTRA_DIST): Add build-to-host.m4.
* gettext-runtime/m4/gettext.m4 (AM_GNU_GETTEXT): Simplify and fix bug on
Cygwin, by invoking gl_BUILD_TO_HOST.
* gettext-tools/m4/Makefile.am (aclocal_DATA): Add build-to-host.m4.
* gettext-tools/misc/gettextize.in (m4filelist): Add build-to-host.m4.
* Makefile.am (distcheck-hook): Check also build-to-host.m4.
* gettext-tools/doc/gettext.texi (aclocal): Mention also build-to-host.m4.
* PACKAGING: Mention build-to-host.m4.

.gitignore
Makefile.am
PACKAGING
autogen.sh
gettext-runtime/m4/Makefile.am
gettext-runtime/m4/gettext.m4
gettext-tools/doc/gettext.texi
gettext-tools/m4/Makefile.am
gettext-tools/misc/gettextize.in

index 3be8967a975e8638669d121d7b343c99605723d1..0cb76f739f8d4895d8b49d213c648872c018feb4 100644 (file)
@@ -44,6 +44,7 @@
 /gettext-runtime/intl/doc/relocatable.texi
 /gettext-runtime/libasprintf/gnulib-lib/
 /gettext-runtime/libasprintf/gnulib-m4/
+/gettext-runtime/m4/build-to-host.m4
 /gettext-runtime/man/x-to-1.in
 /gettext-tools/doc/relocatable.texi
 /gettext-tools/gnulib-m4/
index 2dcd97af73573d82d32c04c296a5d0a709adc496..d763bfddf78ca0a79598db830111c1396065c022 100644 (file)
@@ -1,5 +1,5 @@
 ## Makefile for the toplevel directory of GNU gettext
-## Copyright (C) 1995-2022 Free Software Foundation, Inc.
+## Copyright (C) 1995-2023 Free Software Foundation, Inc.
 ##
 ## This program is free software: you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -72,6 +72,7 @@ distcheck-hook:
        cmp -s $(srcdir)/gettext-runtime/po/insert-header.sin $(srcdir)/gettext-tools/po/insert-header.sin
        cmp -s $(srcdir)/gettext-runtime/po/remove-potcdate.sin $(srcdir)/gettext-tools/po/remove-potcdate.sin
        cmp -s $(srcdir)/gettext-runtime/po/remove-potcdate.sin $(srcdir)/gettext-tools/examples/po/remove-potcdate.sin
+       cmp -s $(srcdir)/gettext-runtime/m4/build-to-host.m4 $(srcdir)/gettext-tools/gnulib-m4/build-to-host.m4
        cmp -s $(srcdir)/gettext-runtime/m4/fcntl-o.m4 $(srcdir)/gettext-tools/gnulib-m4/fcntl-o.m4
        cmp -s $(srcdir)/gettext-runtime/m4/flexmember.m4 $(srcdir)/gettext-tools/gnulib-m4/flexmember.m4
        cmp -s $(srcdir)/gettext-runtime/m4/gettext.m4 $(srcdir)/gettext-tools/gnulib-m4/gettext.m4
index 46a161232e580524b0d94e8ca2799138f05a716d..079c76e0936d78c18e469a71f827371e40027d04 100644 (file)
--- a/PACKAGING
+++ b/PACKAGING
@@ -142,6 +142,7 @@ is according to the following file list.
       $prefix/share/gettext/archive.dir.tar.*   (only installed if --without-git specified)
       $prefix/share/gettext/archive.cvs.tar.*   (only installed if --with-cvs specified)
       $prefix/share/gettext-$VERSION/its/*
+      $prefix/share/aclocal/build-to-host.m4
       $prefix/share/aclocal/gettext.m4
       $prefix/share/aclocal/host-cpu-c-abi.m4
       $prefix/share/aclocal/iconv.m4
index 82fb8eb6fbf3a505f63bc438d73633f45ebac0f0..0dbdb587ba82701e83db4f0beefc337065ea9e26 100755 (executable)
@@ -6,7 +6,7 @@
 #
 # This script requires autoconf-2.64..2.71 and automake-1.13..1.16 in the PATH.
 
-# Copyright (C) 2003-2022 Free Software Foundation, Inc.
+# Copyright (C) 2003-2023 Free Software Foundation, Inc.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -105,6 +105,7 @@ if ! $skip_gnulib; then
   '
   $GNULIB_TOOL --dir=gettext-runtime --lib=libgrt --source-base=gnulib-lib --m4-base=gnulib-m4 --no-libtool --local-dir=gnulib-local --local-symlink \
     --import $GNULIB_MODULES_RUNTIME_FOR_SRC $GNULIB_MODULES_RUNTIME_OTHER || exit $?
+  $GNULIB_TOOL --copy-file m4/build-to-host.m4 gettext-runtime/m4/build-to-host.m4 || exit $?
   # In gettext-runtime/intl:
   GNULIB_MODULES_LIBINTL='
     gettext-runtime-intl-misc
index c184eb2a7a512896abce3929b30add2d6ee67456..ce778c271e9b1be0acbb895a7dd2d8e6359115f2 100644 (file)
@@ -1,5 +1,5 @@
 ## Makefile for the gettext-runtime/m4 directory of GNU gettext
-## Copyright (C) 2003, 2005-2013, 2017-2020 Free Software Foundation, Inc.
+## Copyright (C) 2003, 2005-2013, 2017-2023 Free Software Foundation, Inc.
 ##
 ## This program is free software: you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -19,6 +19,7 @@
 # Generate this list with
 # find . -type f -name '*.m4' -printf '%f\n' | sort | tr '\012' @ | sed 's/@$/%/;s/@/ \\@/g' | tr @% '\012\012'
 EXTRA_DIST = README \
+build-to-host.m4 \
 fcntl-o.m4 \
 flexmember.m4 \
 gettext.m4 \
index d9f4cfcb341d6f7107d41c14517f7e654c80b6b7..869c6b6a28380c4cc69a448317ba296c9ca10cb7 100644 (file)
@@ -1,4 +1,4 @@
-# gettext.m4 serial 76 (gettext-0.21.2)
+# gettext.m4 serial 77 (gettext-0.21.2)
 dnl Copyright (C) 1995-2014, 2016, 2018-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -356,8 +356,7 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
   AC_SUBST([LTLIBINTL])
   AC_SUBST([POSUB])
 
-  dnl Define localedir_c.
-  AC_REQUIRE([AC_CANONICAL_BUILD])
+  dnl Define localedir_c and localedir_c_make.
   dnl Find the final value of localedir.
   gt_save_prefix="${prefix}"
   gt_save_datarootdir="${datarootdir}"
@@ -369,33 +368,10 @@ return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION
   fi
   eval datarootdir="$datarootdir"
   eval localedir="$localedir"
-  gt_final_localedir="$localedir"
+  gl_BUILD_TO_HOST([localedir])
   localedir="${gt_save_localedir}"
   datarootdir="${gt_save_datarootdir}"
   prefix="${gt_save_prefix}"
-  dnl Translate it from build syntax to host syntax.
-  case "$build_os" in
-    cygwin*) gt_final_localedir=`cygpath -w "$gt_final_localedir"` ;;
-  esac
-  dnl Convert it to C string syntax.
-  gt_sed_double_backslashes='s/\\/\\\\/g'
-  gt_sed_escape_doublequotes='s/"/\\"/g'
-  localedir_c=`echo "$gt_final_localedir" | sed -e "$gt_sed_double_backslashes" -e "$gt_sed_escape_doublequotes"`
-  localedir_c='"'"$localedir_c"'"'
-  AC_SUBST([localedir_c])
-
-  dnl Define localedir_c_make.
-changequote(,)dnl
-  gt_sed_escape_for_make_1="s,\\([ \"&'();<>\\\\\`|]\\),\\\\\\1,g"
-changequote([,])dnl
-  gt_sed_escape_for_make_2='s,\$,\\$$,g'
-  localedir_c_make=`echo "$localedir_c" | sed -e "$gt_sed_escape_for_make_1" -e "$gt_sed_escape_for_make_2"`
-  dnl Use the substituted localedir variable, when possible, so that the user
-  dnl may adjust localedir a posteriori when there are no special characters.
-  if test "$localedir_c_make" = '\"'"${gt_final_localedir}"'\"'; then
-    localedir_c_make='\"$(localedir)\"'
-  fi
-  AC_SUBST([localedir_c_make])
 ])
 
 
index 3761bb2c8bfb47fda4626dc8d7d4d0f435e1b0a4..d50b9696951ad755ede94c51cb6adfc792f855d5 100644 (file)
@@ -79,7 +79,7 @@ This file provides documentation for GNU @code{gettext} utilities.
 It also serves as a reference for the free Translation Project.
 
 @copying
-Copyright (C) 1995-1998, 2001-2020 Free Software Foundation, Inc.
+Copyright (C) 1995-1998, 2001-2023 Free Software Foundation, Inc.
 
 This manual is free documentation.  It is dually licensed under the
 GNU FDL and the GNU GPL.  This means that you can redistribute this
@@ -114,7 +114,7 @@ A copy of the license is included in @ref{GNU GPL}.
 @page
 @vskip 0pt plus 1filll
 @c @insertcopying
-Copyright (C) 1995-1998, 2001-2020 Free Software Foundation, Inc.
+Copyright (C) 1995-1998, 2001-2023 Free Software Foundation, Inc.
 
 This manual is free documentation.  It is dually licensed under the
 GNU FDL and the GNU GPL.  This means that you can redistribute this
@@ -8508,11 +8508,11 @@ more.  You can remove it.
 @cindex @file{aclocal.m4} file
 
 If you do not have an @file{aclocal.m4} file in your distribution,
-the simplest is to concatenate the files @file{gettext.m4},
-@file{host-cpu-c-abi.m4}, @file{intlmacosx.m4}, @file{iconv.m4},
-@file{lib-ld.m4}, @file{lib-link.m4}, @file{lib-prefix.m4}, @file{nls.m4},
-@file{po.m4}, @file{progtest.m4} from GNU @code{gettext}'s @file{m4/}
-directory into a single file.
+the simplest is to concatenate the files @file{build-to-host.m4},
+@file{gettext.m4}, @file{host-cpu-c-abi.m4}, @file{intlmacosx.m4},
+@file{iconv.m4}, @file{lib-ld.m4}, @file{lib-link.m4}, @file{lib-prefix.m4},
+@file{nls.m4}, @file{po.m4}, @file{progtest.m4} from GNU @code{gettext}'s
+@file{m4/} directory into a single file.
 
 If you already have an @file{aclocal.m4} file, then you will have
 to merge the said macro files into your @file{aclocal.m4}.  Note that if
@@ -8524,11 +8524,11 @@ Their contents may vary as we get more experience with strange systems
 out there.
 
 You should be using GNU @code{automake} 1.9 or newer.  With it, you need
-to copy the files @file{gettext.m4}, @file{host-cpu-c-abi.m4},
-@file{intlmacosx.m4}, @file{iconv.m4}, @file{lib-ld.m4}, @file{lib-link.m4},
-@file{lib-prefix.m4}, @file{nls.m4}, @file{po.m4}, @file{progtest.m4} from
-GNU @code{gettext}'s @file{m4/} directory to a subdirectory named @file{m4/}
-and add the line
+to copy the files @file{build-to-host.m4}, @file{gettext.m4},
+@file{host-cpu-c-abi.m4}, @file{intlmacosx.m4}, @file{iconv.m4},
+@file{lib-ld.m4}, @file{lib-link.m4}, @file{lib-prefix.m4}, @file{nls.m4},
+@file{po.m4}, @file{progtest.m4} from GNU @code{gettext}'s @file{m4/}
+directory to a subdirectory named @file{m4/} and add the line
 
 @example
 ACLOCAL_AMFLAGS = -I m4
index 55683aa81f2e98272a642a13eaea5251e77caa83..90a5742b9ee847e469acead89fc0cd9fe517e61d 100644 (file)
@@ -1,5 +1,5 @@
 ## Makefile for the gettext-tools/m4 directory of GNU gettext
-## Copyright (C) 2003-2010, 2013, 2017-2020 Free Software Foundation, Inc.
+## Copyright (C) 2003-2010, 2013, 2017-2023 Free Software Foundation, Inc.
 ##
 ## This program is free software: you can redistribute it and/or modify
 ## it under the terms of the GNU General Public License as published by
@@ -24,6 +24,7 @@ aclocal_DATA = \
   ../../gettext-runtime/gnulib-m4/lib-ld.m4 \
   ../../gettext-runtime/gnulib-m4/lib-link.m4 \
   ../../gettext-runtime/gnulib-m4/lib-prefix.m4 \
+  ../../gettext-runtime/m4/build-to-host.m4 \
   ../../gettext-runtime/m4/gettext.m4 \
   ../../gettext-runtime/m4/iconv.m4 \
   ../../gettext-runtime/m4/intlmacosx.m4 \
index 6ec6e2a2b5c06e88379623174d081166cdd398c3..efad50799f0384ed203c80b8fc78495540eef1e0 100644 (file)
@@ -1,6 +1,6 @@
 #! /bin/sh
 #
-# Copyright (C) 1995-1998, 2000-2022 Free Software Foundation, Inc.
+# Copyright (C) 1995-1998, 2000-2023 Free Software Foundation, Inc.
 #
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -803,6 +803,7 @@ Please fill $podir/POTFILES.in as described in the documentation.
 done
 
 m4filelist='
+  build-to-host.m4
   gettext.m4
   host-cpu-c-abi.m4
   iconv.m4