diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2010-02-10 09:19:16 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2010-02-10 09:19:16 +0000 |
commit | 01d99a32129bb60ab0e180c7a64b2bd45cf699c1 (patch) | |
tree | 790f2def3263e9d94c49c05d4d0cf61cd852d702 /tools | |
parent | b14339379a571840ce040fce563580c09fb0a1f5 (diff) | |
download | xen-01d99a32129bb60ab0e180c7a64b2bd45cf699c1.tar.gz xen-01d99a32129bb60ab0e180c7a64b2bd45cf699c1.tar.bz2 xen-01d99a32129bb60ab0e180c7a64b2bd45cf699c1.zip |
tools/remus: fix build in (symlinked) read-only source tree
Modifying source files should generally be avoided; if it is being
done, care should at least be taken to not attempt writes to read-only
files.
While at it, also force the whole ugly construct to fail if any of its
commands fails.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/remus/imqebt/Makefile | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/remus/imqebt/Makefile b/tools/remus/imqebt/Makefile index f2d3f06712..59dcd7d955 100644 --- a/tools/remus/imqebt/Makefile +++ b/tools/remus/imqebt/Makefile @@ -52,11 +52,12 @@ build: $(PROGRAMS) # a little scripting for a static binary, making one for ebtables-restore # should be completely analogous imqebt: extensions/ebt_*.c extensions/ebtable_*.c ebtables.c communication.c ebtables-standalone.c getethertype.c libebtc.c useful_functions.c - cp ebtables-standalone.c ebtables-standalone.c_ ; \ - cp include/ebtables_u.h include/ebtables_u.h_ ; \ - sed "s/ main(/ pseudomain(/" ebtables-standalone.c > ebtables-standalone.c__ ; \ - mv ebtables-standalone.c__ ebtables-standalone.c ; \ + set -e ; \ + mv ebtables-standalone.c ebtables-standalone.c_ ; \ + sed "s/ main(/ pseudomain(/" ebtables-standalone.c_ > ebtables-standalone.c ; \ printf "\nint main(int argc, char *argv[])\n{\n " >> ebtables-standalone.c ; \ + mv include/ebtables_u.h include/ebtables_u.h_ ; \ + cat include/ebtables_u.h_ >include/ebtables_u.h ; \ for arg in $(EXT_FUNC) \ ; do \ sed s/_init/_$${arg}_init/ extensions/ebt_$${arg}.c > extensions/ebt_$${arg}.c_ ; \ |