bug-coreutils
[Top][All Lists]
Advanced

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

Re: coreutils-6.9-375-3e3f8 is lacking a ginstall.x


From: Jim Meyering
Subject: Re: coreutils-6.9-375-3e3f8 is lacking a ginstall.x
Date: Mon, 05 Nov 2007 12:12:32 +0100

Andreas Schwab <address@hidden> wrote:
> Jim Meyering <address@hidden> writes:
>
>> # Change ginstall.1 to "install.h" in $MAN.
>> MAN=`echo "$MAN"|sed 's/\<ginstall\.1\>/install.1/'`
>
> \< and \> are GNU extension.

There was an unportable use in m4/include-exclude-prog.m4, too,
and an imprecision in man/Makefile.am:

Here are the fixes:

        Don't use GNU-sed-specific \< \> operators here, either.
        * m4/include-exclude-prog.m4 (gl_REMOVE_PROG): Use a loop, as below.

        Use tighter regexps when performing name substitution.
        * man/Makefile.am (mapped_name): Add ^ and $$ anchors.

        Don't use GNU-sed-specific \< \> operators.
        * configure.ac (MAN): Transform ginstall.1 to install.1 using
        a loop, rather than sed with \<...\>.
        Problem reported by Bruno Haible.
        Andreas Schwab reminded me that \< and \> are not portable.


diff --git a/configure.ac b/configure.ac
index a685c95..494155a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -307,7 +307,7 @@ esac
 MAN=`echo "$optional_bin_progs "|sed 's/ /.1 /g;s/ $//'`

 # Change ginstall.1 to "install.h" in $MAN.
-MAN=`echo "$MAN"|sed 's/\<ginstall\.1\>/install.1/'`
+MAN=`for m in $MAN; do test $m = ginstall.1 && m=install.1; echo $m; done | tr 
'\012' ' '; echo`

 # Remove [.1, since writing a portable rule for it in man/Makefile.am
 # is not practical.  The sed LHS below uses the autoconf quadrigraph

======================================
diff --git a/man/Makefile.am b/man/Makefile.am
index a7b96d1..8d1f7f7 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -136,7 +136,7 @@ SUFFIXES = .x .1
 # `install' when creating install.1.
 # Similarly, ensure that it uses the ../src/[ binary to create test.1.
 t = $*.td
-mapped_name = `echo $*|sed 's/install/ginstall/; s/test/[/'`
+mapped_name = `echo $*|sed 's/^install$$/ginstall/; s/^test$$/[/'`

 # Note the use of $t/$*, rather than just `$*' as in other packages.
 # That is necessary to avoid failures for programs that are also shell built-in

======================================
diff --git a/m4/include-exclude-prog.m4 b/m4/include-exclude-prog.m4
index e5612c6..d0addc7 100644
--- a/m4/include-exclude-prog.m4
+++ b/m4/include-exclude-prog.m4
@@ -19,7 +19,8 @@ AC_DEFUN([gl_ADD_PROG],
 # Usage: gl_REMOVE_PROG([prog_list_var_name], [prog_name])
 AC_DEFUN([gl_REMOVE_PROG],
 [{
-  $1=`echo "$$1"|sed 's/\<'"$2"'\>//;s/  */ /g;s/^  *//;s/  *$//'`
+  $1=`for gl_rem_i in $$1; do
+        test "$gl_rem_i" = "$2" || echo "$gl_rem_i" done | tr '\012' ' '; echo`
 }])

 # Given the name of a variable containing a space-separated list of




reply via email to

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