+ exit 1
+ | exn ->
+ perror "open: HACKING" exn;
+ exit 1 in
+
+ (* Acquire a lock so parallel builds won't try to run the generator
+ * twice at the same time. Subsequent builds will wait for the first
+ * one to finish. Note the lock is released implicitly when the
+ * program exits.
+ *)
+ (try Unix.lockf lock_fd Unix.F_LOCK 1
+ with exn ->
+ perror "lock: HACKING" exn;
+ exit 1);
+
+ check_functions ();