]> xenbits.xensource.com Git - xen.git/commitdiff
tools/build: remove usage of sed -i
authorRoger Pau Monne <roger.pau@citrix.com>
Thu, 24 Mar 2016 17:05:13 +0000 (18:05 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Thu, 24 Mar 2016 17:09:54 +0000 (17:09 +0000)
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é <roger.pau@citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/include/xen-foreign/Makefile

index bb09c93915aec5df2b8a8cfc8cad207428a3e9a4..270a9752cae75daa05c450b92762d759572db035 100644 (file)
@@ -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) $< $* $@.tmp $(filter %.h,$^)
        #Avoid mixing an alignment directive with a uint64_t cast or sizeof expression
-       sed 's/(__align8__ \(u\?int64_t\))/(\1)/g' -i $@.tmp
-       $(call move-if-changed,$@.tmp,$@)
+       sed 's/(__align8__ \(u\?int64_t\))/(\1)/g' < $@.tmp > $@.tmp2
+       rm $@.tmp
+       $(call move-if-changed,$@.tmp2,$@)
 
 checker.c: mkchecker.py structs.py
        $(PYTHON) $< $@ $(architectures)