camlspotter avatar camlspotter committed 6103784 Merge

merge

Comments (0)

Files changed (1)

 OCamlRequirePackages(packages) =
     packages += findlib # Yes we use findlib
     required_packs = $(OMyManagedPackages $(packages))
-    %.cmx %.cmo %.cmi %.cma %.cmxa %.annot %.spot %.spit : $(Installed $(required_packs))
+    if $(defined INSTALLED)
+      %.cmx %.cmo %.cmi %.cma %.cmxa %.annot %.spot %.spit : $(Installed $(required_packs))
+      export
     export
 
 #|Add dependencies of OCaml dependency analysis and build over $(packages).
 OCamlRequireCamlP4Packages(packages) =
     packages += findlib # Yes we use findlib
     required_packs = $(OMyManagedPackages $(packages))
-    .SCANNER: scan-ocaml-%: $(Installed $(required_packs))
-    %.cmx %.cmo %.cmi %.cma %.cmxa %.annot %.spot %.spit : $(Installed $(required_packs))
+    if $(defined INSTALLED)
+      .SCANNER: scan-ocaml-%: $(Installed $(required_packs))
+      %.cmx %.cmo %.cmi %.cma %.cmxa %.annot %.spot %.spit : $(Installed $(required_packs))
+      export 
     export
 
 #|``omake xxx.auto.mli`` generates .mli file from xxx.ml 
   ## install
 
   # CR jfuruse: x.cmi is required if x.mli does not exist!
-  targets[]=META $(glob i, *.mli) $(library_name).cmi $(library_name).cmo $(library_name).cmx $(library_name).cma $(library_name).cmxa $(library_name).o
+  targets[]=META $(glob i, *.mli) $(library_name).cmi $(library_name).cmo $(library_name).cmx $(library_name).cma $(library_name).cmxa $(library_name).o $(library_name).a $(CSTUBLIBRARIES)
 
   if $(OCAML_SPOT)
     targets[]+= $(library_name).spot
 
-  $(BIG_ROOT)/installed/$(library_name): $(targets)
+  if $(defined INSTALLED)
+    $(Installed $(library_name)): $(targets)
 	$(OCAMLFIND) remove $(library_name)
 	section:
-          $(OCAMLFIND) install $(library_name) $(targets)
-          CreateInstalled($(library_name), $(targets))
+            $(OCAMLFIND) install $(library_name) $(targets)
+            CreateInstalled($(library_name), $(targets))
 
-  install: $(BIG_ROOT)/installed/$(library_name)
+    install: $(Installed $(library_name))
 
-  uninstall:
-	rm -f $(BIG_ROOT)/installed/$(library_name)
+    uninstall:
+	rm -f $(Installed $(library_name))
 	$(OCAMLFIND) remove $(library_name)
 
+    export
+  else
+    install:
+	$(OCAMLFIND) remove $(library_name)
+        $(OCAMLFIND) install $(library_name) $(targets)
+
+    uninstall:
+	$(OCAMLFIND) remove $(library_name)
+
+    export
+
 ############################################################## build ocaml exec
 
 #| Add a rule to build a program $(name)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.