uss: Avoid -i (inplace) with sed
authorChas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Tue, 6 Jan 2015 22:58:05 +0000 (17:58 -0500)
committerDaria Brashear <shadow@your-file-system.com>
Wed, 7 Jan 2015 17:37:11 +0000 (12:37 -0500)
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 <buildbot@rampaginggeek.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>

src/config/Makefile.config.in
src/uss/Makefile.in

index 8a8f982..317dd25 100644 (file)
@@ -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@
index 8338c63..7a5fe4f 100644 (file)
@@ -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