Просмотр исходного кода

build: Use the SED variable provided by configure

Signed-off-by: Ferenc Wágner <wferi@debian.org>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
Ferenc Wágner 7 лет назад
Родитель
Сommit
6a476017b9
8 измененных файлов с 21 добавлено и 21 удалено
  1. 4 4
      Makefile.am
  2. 5 5
      conf/logrotate/Makefile.am
  3. 1 1
      init/Makefile.am
  4. 1 1
      lib/Makefile.am
  5. 3 3
      man/Makefile.am
  6. 2 2
      pkgconfig/Makefile.am
  7. 1 1
      test/Makefile.am
  8. 4 4
      tools/Makefile.am

+ 4 - 4
Makefile.am

@@ -132,9 +132,9 @@ $(SPEC): $(SPEC).in
 		numcomm=""; \
 		numcomm=""; \
 	else \
 	else \
 		gitver="$(shell git describe --abbrev=4 --match='v*' HEAD 2>/dev/null)" && \
 		gitver="$(shell git describe --abbrev=4 --match='v*' HEAD 2>/dev/null)" && \
-		rpmver=`echo $$gitver | sed -e "s/^v//" -e "s/-.*//g"` && \
-		alphatag=`echo $$gitver | sed -e "s/.*-//" -e "s/^g//"` && \
-		vtag=`echo $$gitver | sed -e "s/-.*//g"` && \
+		rpmver=`echo $$gitver | $(SED) -e "s/^v//" -e "s/-.*//g"` && \
+		alphatag=`echo $$gitver | $(SED) -e "s/.*-//" -e "s/^g//"` && \
+		vtag=`echo $$gitver | $(SED) -e "s/-.*//g"` && \
 		numcomm=`git rev-list $$vtag..HEAD | wc -l` && \
 		numcomm=`git rev-list $$vtag..HEAD | wc -l` && \
 		git update-index --refresh > /dev/null 2>&1 || true && \
 		git update-index --refresh > /dev/null 2>&1 || true && \
 		dirty=`git diff-index --name-only HEAD 2>/dev/null`; \
 		dirty=`git diff-index --name-only HEAD 2>/dev/null`; \
@@ -144,7 +144,7 @@ $(SPEC): $(SPEC).in
 	if [ "$$alphatag" = "$$gitver" ]; then alphatag=""; fi && \
 	if [ "$$alphatag" = "$$gitver" ]; then alphatag=""; fi && \
 	if [ -n "$$alphatag" ]; then alphatag="%global alphatag $$alphatag"; fi && \
 	if [ -n "$$alphatag" ]; then alphatag="%global alphatag $$alphatag"; fi && \
 	if [ -n "$$dirty" ]; then dirty="%global dirty dirty"; fi && \
 	if [ -n "$$dirty" ]; then dirty="%global dirty dirty"; fi && \
-	sed \
+	$(SED) \
 		-e "s#@version@#$$rpmver#g" \
 		-e "s#@version@#$$rpmver#g" \
 		-e "s#@ALPHATAG@#$$alphatag#g" \
 		-e "s#@ALPHATAG@#$$alphatag#g" \
 		-e "s#@NUMCOMM@#$$numcomm#g" \
 		-e "s#@NUMCOMM@#$$numcomm#g" \

+ 5 - 5
conf/logrotate/Makefile.am

@@ -36,13 +36,13 @@ EXTRA_DIST		= corosync-reopen.in corosync-copytruncate.in
 
 
 if HAVE_QB_LOG_FILE_REOPEN
 if HAVE_QB_LOG_FILE_REOPEN
 corosync: corosync-reopen.in
 corosync: corosync-reopen.in
-	sed -e 's#@''LOGDIR@#${LOGDIR}#g' \
-	    -e 's#@''SBINDIR@#$(sbindir)#g' \
-	    $< > $@
+	$(SED) -e 's#@''LOGDIR@#${LOGDIR}#g' \
+	       -e 's#@''SBINDIR@#$(sbindir)#g' \
+	       $< > $@
 else
 else
 corosync: corosync-copytruncate.in
 corosync: corosync-copytruncate.in
-	sed -e 's#@''LOGDIR@#${LOGDIR}#g' \
-	    $< > $@
+	$(SED) -e 's#@''LOGDIR@#${LOGDIR}#g' \
+	       $< > $@
 endif
 endif
 
 
 logrotatecorosyncdir    = ${LOGROTATEDIR}
 logrotatecorosyncdir    = ${LOGROTATEDIR}

+ 1 - 1
init/Makefile.am

@@ -48,7 +48,7 @@ endif
 
 
 %: %.in Makefile
 %: %.in Makefile
 	rm -f $@-t $@
 	rm -f $@-t $@
-	cat $< | sed \
+	cat $< | $(SED) \
 		-e 's#@''SBINDIR@#$(sbindir)#g' \
 		-e 's#@''SBINDIR@#$(sbindir)#g' \
 		-e 's#@''BINDIR@#$(bindir)#g' \
 		-e 's#@''BINDIR@#$(bindir)#g' \
 		-e 's#@''SYSCONFDIR@#$(sysconfdir)#g' \
 		-e 's#@''SYSCONFDIR@#$(sysconfdir)#g' \

+ 1 - 1
lib/Makefile.am

@@ -31,7 +31,7 @@
 # THE POSSIBILITY OF SUCH DAMAGE.
 # THE POSSIBILITY OF SUCH DAMAGE.
 
 
 # Functions to be used at link time (target.lo)
 # Functions to be used at link time (target.lo)
-get_libname=$(shell echo $1 | sed -e "s/\.lo//")
+get_libname=$(shell echo $1 | $(SED) -e "s/\.lo//")
 uc=$(shell echo $(call get_libname,$1) | tr a-z A-Z)
 uc=$(shell echo $(call get_libname,$1) | tr a-z A-Z)
 get_soname=$(subst .,:,$(if $($(call uc,$1)_SONAME),$($(call uc,$1)_SONAME),$(SONAME)))
 get_soname=$(subst .,:,$(if $($(call uc,$1)_SONAME),$($(call uc,$1)_SONAME),$(SONAME)))
 get_major=$(firstword $(subst :, ,$(call get_soname,$1)))
 get_major=$(firstword $(subst :, ,$(call get_soname,$1)))

+ 3 - 3
man/Makefile.am

@@ -156,9 +156,9 @@ HTML_DOCS 		= $(dist_man_MANS:%=%.html) $(man_MANS:%=%.html)
 	cat ${top_srcdir}/man/$(autogen_common) >> $@-t-t && \
 	cat ${top_srcdir}/man/$(autogen_common) >> $@-t-t && \
 	awk -v p=0 "(\$$1 ~ /@COMMONIPCERRORS@/){p = 1} {if(p==1)print}" ${top_srcdir}/man/$@.in >> $@-t-t && \
 	awk -v p=0 "(\$$1 ~ /@COMMONIPCERRORS@/){p = 1} {if(p==1)print}" ${top_srcdir}/man/$@.in >> $@-t-t && \
 	cat $@-t-t | \
 	cat $@-t-t | \
-		sed -e 's#@BUILDDATE@#'$$date'#g' \
-		    -e 's#@COMMONIPCERRORS@##g' \
-		    > $@-t && \
+		$(SED) -e 's#@BUILDDATE@#'$$date'#g' \
+		       -e 's#@COMMONIPCERRORS@##g' \
+		       > $@-t && \
 	rm -f $@-t-t && \
 	rm -f $@-t-t && \
 	mv $@-t $@
 	mv $@-t $@
 
 

+ 2 - 2
pkgconfig/Makefile.am

@@ -47,7 +47,7 @@ CLEANFILES = $(pkgconfig_DATA)
 
 
 lib%.pc: libtemplate.pc.in Makefile
 lib%.pc: libtemplate.pc.in Makefile
 	rm -f $@-t $@
 	rm -f $@-t $@
-	sed \
+	$(SED) \
 		-e 's#@''PREFIX@#$(exec_prefix)#g' \
 		-e 's#@''PREFIX@#$(exec_prefix)#g' \
 		-e 's#@''LIBDIR@#$(libdir)#g' \
 		-e 's#@''LIBDIR@#$(libdir)#g' \
 		-e 's#@''LIBVERSION@#$(VERSION)#g' \
 		-e 's#@''LIBVERSION@#$(VERSION)#g' \
@@ -58,7 +58,7 @@ lib%.pc: libtemplate.pc.in Makefile
 
 
 %: %.in Makefile
 %: %.in Makefile
 	rm -f $@-t $@
 	rm -f $@-t $@
-	sed \
+	$(SED) \
 		-e 's#@''PREFIX@#$(exec_prefix)#g' \
 		-e 's#@''PREFIX@#$(exec_prefix)#g' \
 		-e 's#@''LIBDIR@#$(libdir)#g' \
 		-e 's#@''LIBDIR@#$(libdir)#g' \
 		-e 's#@''LIBVERSION@#$(VERSION)#g' \
 		-e 's#@''LIBVERSION@#$(VERSION)#g' \

+ 1 - 1
test/Makefile.am

@@ -63,7 +63,7 @@ cpgverify_LDADD		= $(LIBQB_LIBS) $(top_builddir)/lib/libcpg.la -lz
 endif
 endif
 
 
 ploadstart: ploadstart.sh
 ploadstart: ploadstart.sh
-	sed -e 's#@''BASHPATH@#${BASHPATH}#g' $< > $@
+	$(SED) -e 's#@''BASHPATH@#${BASHPATH}#g' $< > $@
 	chmod 755 $@
 	chmod 755 $@
 
 
 LINT_FILES1:=$(filter-out sa_error.c, $(wildcard *.c))
 LINT_FILES1:=$(filter-out sa_error.c, $(wildcard *.c))

+ 4 - 4
tools/Makefile.am

@@ -49,12 +49,12 @@ EXTRA_DIST		= corosync-xmlproc.sh \
                           corosync-blackbox.sh
                           corosync-blackbox.sh
 
 
 corosync-xmlproc: corosync-xmlproc.sh
 corosync-xmlproc: corosync-xmlproc.sh
-	sed -e 's#@''DATADIR@#${datadir}#g' \
-	    -e 's#@''BASHPATH@#${BASHPATH}#g' \
-	    $< > $@
+	$(SED) -e 's#@''DATADIR@#${datadir}#g' \
+	       -e 's#@''BASHPATH@#${BASHPATH}#g' \
+	       $< > $@
 
 
 corosync-blackbox: corosync-blackbox.sh
 corosync-blackbox: corosync-blackbox.sh
-	sed -e 's#@''LOCALSTATEDIR@#${localstatedir}#g' $< > $@
+	$(SED) -e 's#@''LOCALSTATEDIR@#${localstatedir}#g' $< > $@
 
 
 corosync_cmapctl_LDADD	= $(LIBQB_LIBS) $(top_builddir)/lib/libcmap.la
 corosync_cmapctl_LDADD	= $(LIBQB_LIBS) $(top_builddir)/lib/libcmap.la