bug-gnulib
[Top][All Lists]
Advanced

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

Re: gnulib-tool not working on AIX


From: Bruno Haible
Subject: Re: gnulib-tool not working on AIX
Date: Fri, 5 Sep 2008 01:09:19 +0200
User-agent: KMail/1.5.4

Ralf Wildenhues wrote:
> 2008-09-04  Ralf Wildenhues  <address@hidden>
> 
>       * gnulib-tool (func_emit_lib_Makefile_am)
>       (func_emit_tests_Makefile_am, func_import, func_add_or_update)
>       (func_create_testdir): Do not feed empty scripts to `sed -e',
>       for AIX sed.
>       Report by Albert Chin.

Mostly ok, but not exactly. The modification in line 2505 is not necessary;
actually it would cause no-op sed invocations to happen. Also, I prefer a
variable instead of a literal string - as a place where we can put a comment.
Applied as below.

Thanks also to Albert for reporting and for testing the fix!


2008-09-04  Ralf Wildenhues  <address@hidden>
            Bruno Haible  <address@hidden>

        Make gnulib-tool work with native 'sed' on AIX.
        * gnulib-tool (sed_noop): New variable.
        (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am, func_import,
        func_add_or_update, func_create_testdir): Use it to initialize sed
        script variables.
        Reported by Albert Chin <address@hidden>.

--- gnulib-tool.orig    2008-09-05 01:03:12.000000000 +0200
+++ gnulib-tool 2008-09-05 00:59:26.000000000 +0200
@@ -83,6 +83,10 @@
   alias sed='sed --posix'
 fi
 
+# sed_noop is a sed expression that does nothing.
+# An empty expression does not work with the native 'sed' on AIX 6.1.
+sed_noop='s,x,x,'
+
 # func_usage
 # outputs to stdout the --help usage message.
 func_usage ()
@@ -1672,7 +1676,7 @@
   if test "$libtool" = true; then
     libext=la
     perhapsLT=LT
-    sed_eliminate_LDFLAGS=
+    sed_eliminate_LDFLAGS="$sed_noop"
   else
     libext=a
     perhapsLT=
@@ -1685,7 +1689,7 @@
     # situation. Turn check_PROGRAMS into noinst_PROGRAMS.
     sed_transform_check_PROGRAMS='s,check_PROGRAMS,noinst_PROGRAMS,g'
   else
-    sed_transform_check_PROGRAMS=
+    sed_transform_check_PROGRAMS="$sed_noop"
   fi
   echo "## DO NOT EDIT! GENERATED AUTOMATICALLY!"
   echo "## Process this file with automake to produce Makefile.in."
@@ -1897,7 +1901,7 @@
 {
   if test "$libtool" = true; then
     libext=la
-    sed_eliminate_LDFLAGS=
+    sed_eliminate_LDFLAGS="$sed_noop"
   else
     libext=a
     sed_eliminate_LDFLAGS='/^lib_LDFLAGS[       ]*+=/d'
@@ -1909,7 +1913,7 @@
     # situation. Turn check_PROGRAMS into noinst_PROGRAMS.
     sed_transform_check_PROGRAMS='s,check_PROGRAMS,noinst_PROGRAMS,g'
   else
-    sed_transform_check_PROGRAMS=
+    sed_transform_check_PROGRAMS="$sed_noop"
   fi
   testsbase_inverse=`echo "$testsbase" | sed -e 's,/$,,' | sed -e 
's,[^/][^/]*,..,g'`
   echo "## DO NOT EDIT! GENERATED AUTOMATICALLY!"
@@ -3153,7 +3157,7 @@
           ba
         }'
     else
-      sed_replace_build_aux=
+      sed_replace_build_aux="$sed_noop"
     fi
     func_emit_initmacro_start $macro_prefix
     echo "  gl_source_base='$sourcebase'"
@@ -3830,7 +3834,7 @@
          ba
        }'
    else
-     sed_replace_build_aux=
+     sed_replace_build_aux="$sed_noop"
    fi
    func_emit_initmacro_start $macro_prefix
    echo "gl_source_base='$sourcebase'"





reply via email to

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