camlspotter avatar camlspotter committed 1cb9bf7

external and oasis update

Comments (0)

Files changed (2)

 SOURCES_DIR=sources
 DOWNLOADED_DIR=_downloaded
 
+# Gggg need "declarations"
+SOURCEPATHS[]=
+REQUIRED_PACKS[]=
+REQUIRED_FILES[]=
+
 #| OCamlExternalPack(package)
 #    Final goal: installed/$(package), md5 of files in site-lib/$(package)
 #    Source: files in sources dir and _downloaded dir
 #| SOURCES
 OCamlExternalPack2(PACKS) =
 
-    SOURCEPATHS[]=
-
-#    $(BUILD_DIR):
-#        mkdir_if_not_exists($(BUILD_DIR))
-
     .PHONY: very-clean
     very-clean:
         rm -rf $(BUILD_DIR)
         DependPATH($(x))
         export
 
-    $(installed): $(SOURCEPATHS)
+    $(installed): $(SOURCEPATHS) $(Installed $(REQUIRED_PACKS)) $(REQUIRED_FILES)
         # CR jfuruse: todo: clear _build
+	pwd
         mkdir_if_not_exists($(BUILD_DIR))
         ocamlfind remove $(PACKS)
         cd $(BUILD_DIR); ../install.sh
 
     export
 
+OCamlExternalTool(PATHS) =
+
+    .PHONY: very-clean
+    very-clean:
+        rm -rf $(BUILD_DIR)
+
+    foreach(x, $(SOURCES))
+        DependPATH($(x))
+        export
+
+    $(PATHS): $(SOURCEPATHS) $(Installed $(REQUIRED_PACKS)) $(REQUIRED_FILES)
+        # CR jfuruse: todo: clear _build
+        mkdir_if_not_exists($(BUILD_DIR))
+        cd $(BUILD_DIR); ../install.sh
+
+    install: $(PATH)
+
+    export
+
 #| Returns true if $(file) has ://
 is_url(file) =
   match $(file)
+OMyOdb(PACK) =
+    $(Installed $(PACK)): 
+        ocamlfind remove $(PACK)
+        odb $(PACK)
+        (cd install-$(PACK); spotinstall $(PACK))
+        CreateInstalled($(PACK), $(find $(OCAMLFIND_DESTDIR)$(DIRSEP)$(PACK) -f {}))
+
+OMyOasis(PACK, REQUIRED) =
+    $(Installed $(PACK)): $(REQUIRED)
+        ocaml setup.ml -configure
+        ocaml setup.ml -build
+        ocaml setup.ml -reinstall
+        spotinstall $(PACK)
+        CreateInstalled($(PACK), $(find $(OCAMLFIND_DESTDIR)$(DIRSEP)$(PACK) -f {}))
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.