[openssl-dev] [openssl.org #3737] [PATCH] fix parallel generation of obj headers

Mike Frysinger via RT rt at openssl.org
Sun Mar 8 10:54:57 UTC 2015


The current code has dummy sleep/touch commands to try and work
around the parallel issue, but that is obviously racy.  Instead
lets force one of the files to depend on the other so we know
they'll never run in parallel.
---
 crypto/objects/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/crypto/objects/Makefile b/crypto/objects/Makefile
index a8aedbd..aaa8d29 100644
--- a/crypto/objects/Makefile
+++ b/crypto/objects/Makefile
@@ -44,11 +44,11 @@ obj_dat.h: obj_dat.pl obj_mac.h
 # objects.pl both reads and writes obj_mac.num
 obj_mac.h: objects.pl objects.txt obj_mac.num
 	$(PERL) objects.pl objects.txt obj_mac.num obj_mac.h
-	@sleep 1; touch obj_mac.h; sleep 1
 
-obj_xref.h: objxref.pl obj_xref.txt obj_mac.num
+# This doesn't really need obj_mac.h, but since that rule reads & writes
+# obj_mac.num, we can't run in parallel with it.
+obj_xref.h: objxref.pl obj_xref.txt obj_mac.num obj_mac.h
 	$(PERL) objxref.pl obj_mac.num obj_xref.txt > obj_xref.h
-	@sleep 1; touch obj_xref.h; sleep 1
 
 files:
 	$(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
-- 
2.3.1




More information about the openssl-dev mailing list