REFACTOR Allow parallel builds by serializing native/byte in correct cases
2 files changed, 9 insertions(+), 8 deletions(-)

M files/build_Makefile.tmpl
M src/pds/pds.ml
M files/build_Makefile.tmpl +4 -4
@@ 1,7 1,3 @@ 
-@?not_parallel-@
-.NOTPARALLEL:
-@/not_parallel-@
-
 .PHONY: release debug profile docs install remove
 
 OCAMLDEP_OPTS=@extra_ocamldep_opts@

          
@@ 21,6 17,10 @@ META_LINKOPTS=@meta_linkopts@
 
 all: native-code byte-code
 
+@?native_byte_in_serial-@
+$(BYTE_TARGET): $(NATIVE_TARGET)
+@/native_byte_in_serial-@
+
 @?library-@
 	@-?install-@
 all: META

          
M src/pds/pds.ml +5 -4
@@ 432,10 432,11 @@ let emit_ocaml_build lookup project_type
          (Lookup.strings lookup build "extra_makefile_lines"))
   in
   let kv = Snabela.Kv.(Map.of_list
-                         [ ("not_parallel", bool (non_lib_modules <> []))
-                             (* If there are any non_lib_modules then make the build serial.  This
-                                is because generating .cmi's will conflict if they are generated in
-                                parallel. *)
+                         [ ("native_byte_in_serial", bool (non_lib_modules <> []))
+                         (* If there are any non_lib_modules then make the build
+                            native and byte in serial.  This is because
+                            generating .cmi's will conflict if they are
+                            generated in parallel. *)
                          ; ("src_dir", string src_dir)
                          ; ("packages", list packages)
                          ; ("packages_str", string packages_str)