[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Libguestfs] [PATCH 5/5] build: Put locking round generator.ml invocation



Running multiple instances of generator.ml simultaneously can cause failure
and/or corruption. This change puts a simple flock around it to ensure this
doesn't happen during a parallel make.
---
 src/Makefile.am |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/Makefile.am b/src/Makefile.am
index 01fe384..a6eed9d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -48,7 +48,7 @@ stamp-generator: generator.ml
 	mkdir -p $(top_srcdir)/perl/lib/Sys
 	mkdir -p $(top_srcdir)/ruby/ext/guestfs
 	mkdir -p $(top_srcdir)/java/com/redhat/et/libguestfs
-	cd $(top_srcdir) && ocaml -warn-error A src/generator.ml
+	cd $(top_srcdir) && flock generator.lock ocaml -warn-error A src/generator.ml
 
 include_HEADERS = guestfs.h guestfs-actions.h guestfs-structs.h
 
-- 
1.6.5.2


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]