From 3de9fa7ba9090f3a279bae08faaa5447dda92d6d Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Mon, 20 Oct 2014 16:32:01 +0200 Subject: [PATCH] build: use $(SED) instead of sed when possible Make use of the sed executable set at configure time. --- fish/Makefile.am | 2 +- p2v/Makefile.am | 2 +- po-docs/Makefile.am | 2 +- run.in | 2 +- src/Makefile.am | 2 +- tests/guests/Makefile.am | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fish/Makefile.am b/fish/Makefile.am index d28a94ba9..e633422a7 100644 --- a/fish/Makefile.am +++ b/fish/Makefile.am @@ -163,7 +163,7 @@ endif rc_protocol.c: rc_protocol.x rm -f $@-t $@-t2 $(RPCGEN) $(RPCGEN_DEFS) -c -o $@-t $< - sed 's,\.\./\(\.\./\)*fish,.,' < $@-t > $@-t2 + $(SED) 's,\.\./\(\.\./\)*fish,.,' < $@-t > $@-t2 rm $@-t mv $@-t2 $@ diff --git a/p2v/Makefile.am b/p2v/Makefile.am index cafad0bd8..3e22b4c26 100644 --- a/p2v/Makefile.am +++ b/p2v/Makefile.am @@ -89,7 +89,7 @@ virtp2vdata_DATA = \ # Deal with stupid autotools libexecdir-not-expandable crap. launch-virt-p2v: launch-virt-p2v.in rm -f $@ $@-t - sed 's,@''libexecdir@,$(libexecdir),g' < $< > $@-t + $(SED) 's,@''libexecdir@,$(libexecdir),g' < $< > $@-t chmod 0555 $@-t mv $@-t $@ diff --git a/po-docs/Makefile.am b/po-docs/Makefile.am index 17823ab30..8803891f8 100644 --- a/po-docs/Makefile.am +++ b/po-docs/Makefile.am @@ -57,7 +57,7 @@ libguestfs-docs.pot: po4a.conf --copyright-holder "Red Hat Inc." \ po4a.conf for f in `cd $(srcdir); find $(linguas) -name '*.pod'`; do \ - sed '0,/^=encoding/d' < $$f > $$f.new; \ + $(SED) '0,/^=encoding/d' < $$f > $$f.new; \ mv $$f.new $$f; \ done diff --git a/run.in b/run.in index 1cf7c20b3..760885f9f 100755 --- a/run.in +++ b/run.in @@ -267,7 +267,7 @@ else echo "$b/run: command failed with exit code $fail" fi if [ -n "$RUN_OUTPUT_FILE" ]; then - testname=`echo "$1" | sed -e 's,^./,,g'` + testname=`echo "$1" | @SED@ -e 's,^./,,g'` echo "" >> $RUN_OUTPUT_FILE echo "> $RUN_OUTPUT_FILE # skip the results of test-virt-rescue.pl, as they contain diff --git a/src/Makefile.am b/src/Makefile.am index e7172511c..be8d3a36b 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -211,7 +211,7 @@ endif guestfs_protocol.c: guestfs_protocol.x rm -f $@-t $@-t2 $(RPCGEN) $(RPCGEN_DEFS) -c -o $@-t $< - sed 's,\.\./\(\.\./\)*src,.,' < $@-t > $@-t2 + $(SED) 's,\.\./\(\.\./\)*src,.,' < $@-t > $@-t2 rm $@-t mv $@-t2 $@ diff --git a/tests/guests/Makefile.am b/tests/guests/Makefile.am index 62f5d1436..e58d56301 100644 --- a/tests/guests/Makefile.am +++ b/tests/guests/Makefile.am @@ -67,7 +67,7 @@ blank-%.img: rm -f $@ $@-t $(top_builddir)/run \ ../../fish/guestfish \ - -N $@-t="$$(echo $@ | sed -e 's/blank-//' -e 's/.img//')" exit + -N $@-t="$$(echo $@ | $(SED) -e 's/blank-//' -e 's/.img//')" exit mv $@-t $@ # Make a (dummy) Fedora image.