From 1bb8ad417188650e9049da9b33177de7f14226cb Mon Sep 17 00:00:00 2001 From: "Chas Williams (CONTRACTOR)" Date: Tue, 6 Jan 2015 17:58:05 -0500 Subject: [PATCH] uss: Avoid -i (inplace) with sed Not all sed versions support inplace editing, so do things ourselves. Also use the sed version found by configure for consistency. Change-Id: I6194b8dd6b7abf88d0b0fa36ba871e0ba092ce1e Reviewed-on: http://gerrit.openafs.org/11655 Tested-by: BuildBot Reviewed-by: Daria Brashear --- src/config/Makefile.config.in | 1 + src/uss/Makefile.in | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/config/Makefile.config.in b/src/config/Makefile.config.in index 8a8f9826a..317dd2522 100644 --- a/src/config/Makefile.config.in +++ b/src/config/Makefile.config.in @@ -96,6 +96,7 @@ RM = @RM@ RXDEBUG = @RXDEBUG@ ROKEN_HEADERS = @ROKEN_HEADERS@ ROKEN_LTLIBOBJS = @LTLIBOBJS@ +SED = @SED@ SHLIB_CFLAGS = @SHLIB_CFLAGS@ SHLIB_LDFLAGS = @SHLIB_LDFLAGS@ SHLIB_LINKER = @SHLIB_LINKER@ diff --git a/src/uss/Makefile.in b/src/uss/Makefile.in index 8338c63b8..7a5fe4f98 100644 --- a/src/uss/Makefile.in +++ b/src/uss/Makefile.in @@ -53,7 +53,8 @@ lex.yy.o : lex.yy.c y.tab.c lex.yy.c : lex.l ${LEX} ${srcdir}/lex.l - sed -f ${srcdir}/yy-lsed -i.orig lex.yy.c + ${MV} lex.yy.c lex.yy.c.orig + ${SED} -f ${srcdir}/yy-lsed lex.yy.c.orig > lex.yy.c y.tab.o : y.tab.c @@ -75,7 +76,10 @@ uss_fs.c: uss_fs.h y.tab.c : grammar.y ${YACC} -d ${srcdir}/grammar.y - sed -f ${srcdir}/yy-lsed -i.orig y.tab.h y.tab.c + ${MV} y.tab.h y.tab.h.orig + ${MV} y.tab.c y.tab.c.orig + ${SED} -f ${srcdir}/yy-lsed y.tab.h.orig > y.tab.h + ${SED} -f ${srcdir}/yy-lsed y.tab.c.orig > y.tab.c # # Installation targets -- 2.39.5