]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Make bootstrap.conf a tiny bit more generic.
authorJim Meyering <jim@meyering.net>
Mon, 12 Mar 2007 08:47:36 +0000 (09:47 +0100)
committerJim Meyering <jim@meyering.net>
Mon, 12 Mar 2007 08:47:36 +0000 (09:47 +0100)
* bootstrap.conf (XGETTEXT_OPTIONS): Exclude gettext-related .m4
files when e.g., AM_GNU_GETTEXT([external] appears in configure.ac.

ChangeLog
bootstrap.conf

index ad29325a88340ddbac6074aea5419c25087b5f1b..267c5662c63499ff2bd1435ec670ddec9b8509e7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-03-12  Jim Meyering  <jim@meyering.net>
+
+       Make bootstrap.conf a tiny bit more generic.
+       * bootstrap.conf (XGETTEXT_OPTIONS): Exclude gettext-related .m4
+       files when e.g., AM_GNU_GETTEXT([external] appears in configure.ac.
+
 2007-03-10  Jim Meyering  <jim@meyering.net>
 
        Try to fix today's NFS-related failure: Treat ESTALE like EACCES.
index 6709afd046d8b3d3e62deb364e5c04cba98fe20f..30433216d225360246093d4a0f07475e19aaac2e 100644 (file)
@@ -81,17 +81,32 @@ XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
  --flag=wrapf:1:c-format\\\
 '
 
-# Gettext supplies these files, but we don't need them since
-# we don't have an intl subdirectory.
-excluded_files='
-    m4/glibc2.m4
-    m4/intdiv0.m4
-    m4/lcmessage.m4
-    m4/lock.m4
-    m4/printf-posix.m4
-    m4/size_max.m4
-    m4/uintmax_t.m4
-    m4/ulonglong.m4
-    m4/visibility.m4
-    m4/xsize.m4
-'
+# If "AM_GNU_GETTEXT(external" or "AM_GNU_GETTEXT([external]"
+# appears in configure.ac, exclude some unnecessary files.
+# Without grep's -E option (not portable enough, pre-configure),
+# the following test is ugly.  Also, this depends on the existence
+# of configure.ac, not the obsolescent-named configure.in.  But if
+# you're using this infrastructure, you should care about such things.
+
+gettext_external=0
+grep '^[        ]*AM_GNU_GETTEXT(external\>' configure.ac > /dev/null &&
+  gettext_external=1
+grep '^[        ]*AM_GNU_GETTEXT(\[external\]' configure.ac > /dev/null &&
+  gettext_external=1
+
+if test $gettext_external = 1; then
+  # Gettext supplies these files, but we don't need them since
+  # we don't have an intl subdirectory.
+  excluded_files='
+      m4/glibc2.m4
+      m4/intdiv0.m4
+      m4/lcmessage.m4
+      m4/lock.m4
+      m4/printf-posix.m4
+      m4/size_max.m4
+      m4/uintmax_t.m4
+      m4/ulonglong.m4
+      m4/visibility.m4
+      m4/xsize.m4
+  '
+fi