bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gettextize: aclocal with multiple -I options


From: Bruno Haible
Subject: Re: gettextize: aclocal with multiple -I options
Date: Mon, 16 Oct 2006 14:53:05 +0200
User-agent: KMail/1.9.1

Ralf Wildenhues wrote:
> Running gettextize (here on CVS findutils) tells me (among other
> things):
> 
> | Please run 'aclocal -I gnulib/m4' to regenerate the aclocal.m4 file.
> | You need aclocal from GNU automake 1.9 (or newer) to do this.
> | Then run 'autoconf' to regenerate the configure file.
> 
> But that is not true:
> $ grep ACLOCAL_AMFLAGS Makefile.am
> ACLOCAL_AMFLAGS = -I gnulib/m4 -I m4
> 
> Could this be fixed

Find attached a fix. Thanks for the report.

> (also in autopoint, I think)?

There's nothing to change in autopoint, as it doesn't run or recommend to
run 'aclocal'. It leaves that to the user or to 'autoreconf'.

Bruno


*** gettext-cvs/gettext-tools/misc/gettextize.in        2006-10-08 
15:29:24.000000000 +0200
--- gettext-6/gettext-tools/misc/gettextize.in  2006-10-15 16:12:17.000000000 
+0200
***************
*** 769,774 ****
--- 769,775 ----
    # Extract the macro directory name from Makefile.am.
    aclocal_amflags=`grep '^ACLOCAL_AMFLAGS[    ]*=' "$srcdir/Makefile.am" | 
sed -e 's/^ACLOCAL_AMFLAGS[        ]*=\(.*\)$/\1/'`
    m4dir=m4
+   m4dir_defaulted=yes
    m4dir_is_next=
    for arg in $aclocal_amflags; do
      if test -n "$m4dir_is_next"; then
***************
*** 777,785 ****
--- 778,788 ----
          /*) ;;
          *)
            m4dir="$arg"
+           m4dir_defaulted=
            break
            ;;
        esac
+       m4dir_is_next=
      else
        if test "X$arg" = "X-I"; then
          m4dir_is_next=yes
***************
*** 961,967 ****
      }' < "$srcdir/Makefile.am" > "$srcdir/Makefile.am.tmp"
      func_modify_Makefile_am "(DIST_SUBDIRS): Remove $removed_directory."
    fi
!   if test -z "$m4dir_is_next"; then
      if grep '^ACLOCAL_AMFLAGS[        ]*=' "$srcdir/Makefile.am" > /dev/null; 
then
        sed -e "s%^\(ACLOCAL_AMFLAGS[   ]*=\) \\?%\\1 -I $m4dir %" < 
"$srcdir/Makefile.am" > "$srcdir/Makefile.am.tmp"
        func_modify_Makefile_am "(ACLOCAL_AMFLAGS): Add -I $m4dir."
--- 964,970 ----
      }' < "$srcdir/Makefile.am" > "$srcdir/Makefile.am.tmp"
      func_modify_Makefile_am "(DIST_SUBDIRS): Remove $removed_directory."
    fi
!   if test -n "$m4dir_defaulted"; then
      if grep '^ACLOCAL_AMFLAGS[        ]*=' "$srcdir/Makefile.am" > /dev/null; 
then
        sed -e "s%^\(ACLOCAL_AMFLAGS[   ]*=\) \\?%\\1 -I $m4dir %" < 
"$srcdir/Makefile.am" > "$srcdir/Makefile.am.tmp"
        func_modify_Makefile_am "(ACLOCAL_AMFLAGS): Add -I $m4dir."
***************
*** 992,999 ****
        func_modify_Makefile_am "(EXTRA_DIST): New variable."
      fi
    fi
    please="$please
! Please run 'aclocal -I $m4dir' to regenerate the aclocal.m4 file.
  You need aclocal from GNU automake $min_automake_version (or newer) to do 
this.
  Then run 'autoconf' to regenerate the configure file.
  "
--- 995,1018 ----
        func_modify_Makefile_am "(EXTRA_DIST): New variable."
      fi
    fi
+   # Extract the aclocal options name from Makefile.am.
+   aclocal_amflags=`grep '^ACLOCAL_AMFLAGS[    ]*=' "$srcdir/Makefile.am" | 
sed -e 's/^ACLOCAL_AMFLAGS[        ]*=\(.*\)$/\1/'`
+   aclocal_options=
+   m4dir_is_next=
+   for arg in $aclocal_amflags; do
+     if test -n "$m4dir_is_next"; then
+       aclocal_options="$aclocal_options -I $arg"
+       m4dir_is_next=
+     else
+       if test "X$arg" = "X-I"; then
+         m4dir_is_next=yes
+       else
+         m4dir_is_next=
+       fi
+     fi
+   done
    please="$please
! Please run 'aclocal$aclocal_options' to regenerate the aclocal.m4 file.
  You need aclocal from GNU automake $min_automake_version (or newer) to do 
this.
  Then run 'autoconf' to regenerate the configure file.
  "




reply via email to

[Prev in Thread] Current Thread [Next in Thread]