build: use $(SED) instead of sed when possible

Make use of the sed executable set at configure time.
This commit is contained in:
Pino Toscano
2014-10-20 16:32:01 +02:00
parent ea9b225480
commit 3de9fa7ba9
6 changed files with 6 additions and 6 deletions

View File

@@ -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 $@

View File

@@ -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 $@

View File

@@ -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

2
run.in
View File

@@ -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 "<test rescode=\"$fail\" name=\"$testname\" time=\"$(($end_t - $start_t))\">" >> $RUN_OUTPUT_FILE
echo "<![CDATA[" >> $RUN_OUTPUT_FILE
# skip the results of test-virt-rescue.pl, as they contain

View File

@@ -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 $@

View File

@@ -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.