Commit ce778017 authored by Kir Kolyshkin's avatar Kir Kolyshkin Committed by Cyrill Gorcunov

gen-offsets.sh: error out if something goes wrong

In addition, add target rm if script has failed.
Signed-off-by: 's avatarKir Kolyshkin <kir@openvz.org>
Signed-off-by: 's avatarCyrill Gorcunov <gorcunov@openvz.org>
parent 944ebac4
...@@ -91,7 +91,7 @@ $(HEAD-BIN): $(HEAD-LDS) $(OBJS-BLOB) parasite-util-net.o ...@@ -91,7 +91,7 @@ $(HEAD-BIN): $(HEAD-LDS) $(OBJS-BLOB) parasite-util-net.o
$(HEAD-BLOB-GEN): $(HEAD-BIN) $(GEN-OFFSETS) $(HEAD-BLOB-GEN): $(HEAD-BIN) $(GEN-OFFSETS)
$(E) " GEN " $@ $(E) " GEN " $@
$(Q) $(SH) $(GEN-OFFSETS) parasite > $@ $(Q) $(SH) $(GEN-OFFSETS) parasite > $@ || rm -f $@
$(Q) sync $(Q) sync
$(ROBJS): $(RSRCS-BLOB) $(ROBJS): $(RSRCS-BLOB)
...@@ -104,7 +104,7 @@ $(RHEAD-BIN): $(ROBJS) $(RHEAD-LDS) ...@@ -104,7 +104,7 @@ $(RHEAD-BIN): $(ROBJS) $(RHEAD-LDS)
$(RHEAD-BLOB-GEN): $(RHEAD-BIN) $(GEN-OFFSETS) $(RHEAD-BLOB-GEN): $(RHEAD-BIN) $(GEN-OFFSETS)
$(E) " GEN " $@ $(E) " GEN " $@
$(Q) $(SH) $(GEN-OFFSETS) restorer > $@ $(Q) $(SH) $(GEN-OFFSETS) restorer > $@ || rm -f $@
$(Q) sync $(Q) sync
%.o: %.c %.o: %.c
......
#!/bin/sh #!/bin/sh
set -e
set -u
NAME=$1 NAME=$1
INC_GUARD=__${NAME}_h__ INC_GUARD=__${NAME}_h__
PREFIX=${NAME}_blob_offset__ PREFIX=${NAME}_blob_offset__
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment