tools/build: remove usage of sed -i
PATCH 1/1 tools/build: remove usage of sed -i
The "-i" sed option is not POSIX compatible [0], remove it's usage and instead create yet another temporary intermediate file.
[0] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html
--- tools/include/xen-foreign/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
tools/include/xen-foreign/Makefile +3 -2
@@ -36,8 +36,9 @@ x86_32.h: mkheader.py structs.py $(ROOT)/arch-x86/xen-x86_32.h $(ROOT)/arch-x86/ x86_64.h: mkheader.py structs.py $(ROOT)/arch-x86/xen-x86_64.h $(ROOT)/arch-x86/xen.h $(ROOT)/xen.h $(PYTHON) $< $* [email protected] $(filter %.h,$^) #Avoid mixing an alignment directive with a uint64_t cast or sizeof expression - sed 's/(__align8__ \(u\?int64_t\))/(\1)/g' -i [email protected] - $(call move-if-changed,[email protected],$@) + sed 's/(__align8__ \(u\?int64_t\))/(\1)/g' < [email protected] > [email protected] + rm [email protected] + $(call move-if-changed,[email protected],$@) checker.c: mkchecker.py structs.py $(PYTHON) $< $@ $(architectures)
Signature · 7 lines
2.6.4 (Apple Git-63) _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Quoted 8 lines · Roger Pau Monne
The "-i" sed option is not POSIX compatible [0], remove it's usage and instead create yet another temporary intermediate file.
[0] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html
Signed-off-by Roger Pau Monné <[email protected]>Cc Ian Jackson <[email protected]>Cc Wei Liu <[email protected]>
Sorry for breaking this.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Andrew Cooper writes ("Re: [Xen-devel] [PATCH] tools/build: remove usage of sed -i"):
Quoted 6 lines · Roger Pau Monne
Quoted 5 lines
The "-i" sed option is not POSIX compatible [0], remove it's usage and instead create yet another temporary intermediate file.
[0] http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html
Quoted 7 lines
Quoted 3 lines
Signed-off-by Roger Pau Monné <[email protected]>Cc Ian Jackson <[email protected]>Cc Wei Liu <[email protected]>Sorry for breaking this.
Reviewed-by Andrew Cooper <[email protected]>
Thanks,
Ian.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel