+2009-12-09 Bruno Haible <bruno@clisp.org>
+
+ Use sed with option -e.
+ * gnulib-tool (func_version, func_emit_copyright_notice,
+ func_emit_initmacro_end, func_import, func_create_testdir): Pass
+ option -e to sed.
+ * modules/link-warning (Makefile.am): Likewise.
+
2009-12-10 Jim Meyering <meyering@redhat.com>
mgetgroups: do not write bytes beyond end of malloc'd buffer
fi
version=
fi
- year=`"$gnulib_dir"/build-aux/mdate-sh "$self_abspathname" | sed 's,^.* ,,'`
+ year=`"$gnulib_dir"/build-aux/mdate-sh "$self_abspathname" | sed -e 's,^.* ,,'`
echo "\
gnulib-tool (GNU $package $date)$version
Copyright (C) $year Free Software Foundation, Inc.
# outputs to stdout a header for a generated file.
func_emit_copyright_notice ()
{
- sed -n '/Copyright/ {
- p
- q
- }' < "$self_abspathname"
+ sed -n -e '/Copyright/ {
+ p
+ q
+ }' < "$self_abspathname"
echo "#"
echo "# This file is free software, distributed under the terms of the GNU"
echo "# General Public License. As a special exception to the GNU General"
if test -n "$prereqs"; then
autoconf_minversion=`
for version in $prereqs; do echo $version; done |
- LC_ALL=C sort -nru | sed 1q
+ LC_ALL=C sort -nru | sed -e 1q
`
fi
fi
echo " if test -n \"\$${macro_prefix_arg}_LIBOBJS\"; then"
echo " # Remove the extension."
echo " sed_drop_objext='s/\\.o\$//;s/\\.obj\$//'"
- echo " for i in \`for i in \$${macro_prefix_arg}_LIBOBJS; do echo \"\$i\"; done | sed \"\$sed_drop_objext\" | sort | uniq\`; do"
+ echo " for i in \`for i in \$${macro_prefix_arg}_LIBOBJS; do echo \"\$i\"; done | sed -e \"\$sed_drop_objext\" | sort | uniq\`; do"
echo " ${macro_prefix_arg}_libobjs=\"\$${macro_prefix_arg}_libobjs \$i.\$ac_objext\""
echo " ${macro_prefix_arg}_ltlibobjs=\"\$${macro_prefix_arg}_ltlibobjs \$i.lo\""
echo " done"
esac
echo "gl_LOCAL_DIR([$relative_local_gnulib_dir])"
echo "gl_MODULES(["
- echo "$specified_modules" | sed 's/^/ /g'
+ echo "$specified_modules" | sed -e 's/^/ /g'
echo "])"
test -z "$incobsolete" || echo "gl_WITH_OBSOLETE"
echo "gl_AVOID([$avoidlist])"
-e "$sed_replace_build_aux"
if test "$module" = 'alloca' && test "$libtool" = true; then
echo 'changequote(,)dnl'
- echo 'LTALLOCA=`echo "$ALLOCA" | sed '"'"'s/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'"'"'`'
+ echo 'LTALLOCA=`echo "$ALLOCA" | sed -e '"'"'s/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'"'"'`'
echo 'changequote([, ])dnl'
echo 'AC_SUBST([LTALLOCA])'
fi
test -d "$testdir/$testsbase" || mkdir "$testdir/$testsbase"
# Viewed from the $testsbase subdirectory, $auxdir is different.
saved_auxdir="$auxdir"
- auxdir=`echo "$testsbase/"|sed 's%[^/][^/]*//*%../%g'`"$auxdir"
+ auxdir=`echo "$testsbase/" | sed -e 's%[^/][^/]*//*%../%g'`"$auxdir"
# Create $testsbase/Makefile.am.
use_libtests=false
destfile="$testsbase/Makefile.am"
m4dirs=
m4dirs_count=0
if test -f "$destdir"/Makefile.am; then
- aclocal_amflags=`sed -n 's/^ACLOCAL_AMFLAGS[ ]*=\(.*\)$/\1/p' "$destdir"/Makefile.am`
+ aclocal_amflags=`sed -n -e 's/^ACLOCAL_AMFLAGS[ ]*=\(.*\)$/\1/p' "$destdir"/Makefile.am`
m4dir_is_next=
for arg in $aclocal_amflags; do
if test -n "$m4dir_is_next"; then
# build-aux/link-warning.h, except that it has the copyright header cut off.
link-warning.h: $(top_srcdir)/build-aux/link-warning.h
$(AM_V_GEN)rm -f $@-t $@ && \
- sed -n '/GL_LINK_WARNING/,$$p' \
- $(top_srcdir)/build-aux/link-warning.h > $@-t && \
+ sed -n -e '/GL_LINK_WARNING/,$$p' \
+ < $(top_srcdir)/build-aux/link-warning.h \
+ > $@-t && \
mv $@-t $@
MOSTLYCLEANFILES += link-warning.h link-warning.h-t