bug-grep
[Top][All Lists]
Advanced

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

Re: grep-2.9.69-f91c on OSF/1


From: Bruno Haible
Subject: Re: grep-2.9.69-f91c on OSF/1
Date: Sat, 12 Nov 2011 14:03:22 +0100
User-agent: KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; )

Jim Meyering wrote:
> > 2011-11-11  Bruno Haible  <address@hidden>
> >
> >       Fix test suite execution failure on OSF/1 5.1.
> >       * tests/Makefile.am (TESTS_ENVIRONMENT): Use only the portable form of
> >       the 'export' shell built-in.
> 
> Thanks, but I'd like to find a way to resolve this that does not involve
> repeating every envvar name.

If that's your requirement, how about this patch then? Tested on OSF/1 and
Solaris. With this, "make check" passes in the tests/ directory.


2011-11-12  Bruno Haible  <address@hidden>

        Fix test suite execution failure on OSF/1 5.1.
        * tests/Makefile.am (TESTS_ENVIRONMENT): Use a shell function, to
        ensure that we use only the portable form of the 'export' shell
        built-in.

--- grep-2.9.69-f91c/tests/Makefile.am  2011-10-10 14:41:27.000000000 +0200
+++ grep-2.9.69-f91c/tests/Makefile.am  2011-11-12 13:52:58.000000000 +0100
@@ -105,7 +105,20 @@
 TESTS_ENVIRONMENT =                            \
   tmp__=$$TMPDIR; test -d "$$tmp__" || tmp__=.;        \
   TMPDIR=$$tmp__; export TMPDIR;               \
-  export                                       \
+                                               \
+  export_with_values ()                                        \
+  {                                                    \
+    sed_extract_var='s/=.*//';                         \
+    sed_quote_value="s/=\\(.*\\)/='\\1'/";             \
+    for arg in "$$@"; do                               \
+      var=`echo "$$arg" | sed -e "$$sed_extract_var"`; \
+      arg=`echo "$$arg" | sed -e "$$sed_quote_value"`; \
+      eval "$$arg";                                    \
+      export "$$var";                                  \
+    done;                                              \
+  };                                                   \
+                                               \
+  export_with_values                           \
   VERSION='$(VERSION)'                          \
   LOCALE_FR='$(LOCALE_FR)'                      \
   LOCALE_FR_UTF8='$(LOCALE_FR_UTF8)'            \

-- 
In memoriam Nicholas Owen <http://en.wikipedia.org/wiki/Nicholas_Owen_(martyr)>



reply via email to

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