[alsa-devel] [PATCH utils] Fix use of $(SED).

Michał Górny mgorny at gentoo.org
Wed Aug 31 18:34:42 CEST 2011


The alsactl Makefile used 'sed $(SED)' which is going to failed when SED
is actually set. Replaced that with '$(SED)', and a few 'sed' calls in
alsaconf Makefile as well. Added AC_PROG_SED to configure to have it
set.

Fixes: https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5363
Fixes: http://bugs.gentoo.org/show_bug.cgi?id=366587
Signed-off-by: Michał Górny <mgorny at gentoo.org>
---
 alsaconf/Makefile.am |   16 ++++++++--------
 alsactl/Makefile.am  |    2 +-
 configure.in         |    1 +
 3 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/alsaconf/Makefile.am b/alsaconf/Makefile.am
index a11ecc5..a4f5e4a 100644
--- a/alsaconf/Makefile.am
+++ b/alsaconf/Makefile.am
@@ -5,13 +5,13 @@ SUBDIRS = po
 
 install-man8:
 	@for i in $(man_MANS); do \
-	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-	  inst=`echo $$i | sed -e 's/\\.[^.]*$$//'`; \
+	  ext=`echo $$i | $(SED) -e 's/^.*\\.//'`; \
+	  inst=`echo $$i | $(SED) -e 's/\\.[^.]*$$//'`; \
 	  case $$inst in \
 	  *.[a-za-z]*)\
-	    loc=`echo $$inst | sed -e 's/^.*\\.//'`; \
+	    loc=`echo $$inst | $(SED) -e 's/^.*\\.//'`; \
 	    loc="/$$loc"; \
-	    inst=`echo $$inst | sed -e 's/\\.[^.]*$$//'`;; \
+	    inst=`echo $$inst | $(SED) -e 's/\\.[^.]*$$//'`;; \
 	  *)\
 	    loc="";; \
 	  esac; \
@@ -22,13 +22,13 @@ install-man8:
 
 uninstall-man8:
 	@for i in $(man_MANS); do \
-	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-	  inst=`echo $$i | sed -e 's/\\.[^.]*$$//'`; \
+	  ext=`echo $$i | $(SED) -e 's/^.*\\.//'`; \
+	  inst=`echo $$i | $(SED) -e 's/\\.[^.]*$$//'`; \
 	  case $$inst in \
 	  *.[a-za-z]*)\
-	    loc=`echo $$inst | sed -e 's/^.*\\.//'`; \
+	    loc=`echo $$inst | $(SED) -e 's/^.*\\.//'`; \
 	    loc="/$$loc"; \
-	    inst=`echo $$inst | sed -e 's/\\.[^.]*$$//'`;; \
+	    inst=`echo $$inst | $(SED) -e 's/\\.[^.]*$$//'`;; \
 	  *)\
 	    loc="";; \
 	  esac; \
diff --git a/alsactl/Makefile.am b/alsactl/Makefile.am
index 5cfc415..c434e44 100644
--- a/alsactl/Makefile.am
+++ b/alsactl/Makefile.am
@@ -34,7 +34,7 @@ install-data-hook:
 endif
 
 edit = \
-	sed $(SED) -r 's, at sbindir\@,$(sbindir),g' < $< > $@ || rm $@
+	$(SED) -r 's, at sbindir\@,$(sbindir),g' < $< > $@ || rm $@
 
 alsa-store.service: alsa-store.service.in
 	$(edit)
diff --git a/configure.in b/configure.in
index 9ec1fac..b28af80 100644
--- a/configure.in
+++ b/configure.in
@@ -28,6 +28,7 @@ dnl AC_PROG_CXX
 AC_PROG_INSTALL
 AC_PROG_MKDIR_P
 AC_PROG_LN_S
+AC_PROG_SED
 AM_PATH_ALSA(1.0.16)
 
 dnl Check components
-- 
1.7.6.1



More information about the Alsa-devel mailing list