From 323b372191d91e35824127929f3b51e1886369fa Mon Sep 17 00:00:00 2001 From: Ralf Wildenhues Date: Fri, 5 Sep 2008 01:07:02 +0200 Subject: [PATCH] Make gnulib-tool work with native 'sed' on AIX. --- ChangeLog | 10 ++++++++++ gnulib-tool | 16 ++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index e7a4333b5..2edf0c375 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2008-09-04 Ralf Wildenhues + Bruno Haible + + 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 . + 2008-09-04 Albert Chin Bruno Haible diff --git a/gnulib-tool b/gnulib-tool index 4a1d02e3e..155553390 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -83,6 +83,10 @@ if (alias) > /dev/null 2>&1 && echo | sed --posix -e d >/dev/null 2>&1; then alias sed='sed --posix' fi +# sed_noop is a sed expression that does nothing. +# An empty expression does not 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 @@ func_emit_lib_Makefile_am () 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 @@ func_emit_lib_Makefile_am () # 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 @@ func_emit_tests_Makefile_am () { 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 @@ func_emit_tests_Makefile_am () # 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 @@ func_import () 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 @@ func_create_testdir () ba }' else - sed_replace_build_aux= + sed_replace_build_aux="$sed_noop" fi func_emit_initmacro_start $macro_prefix echo "gl_source_base='$sourcebase'" -- 2.11.0