Commits

camlspotter committed f24baa5

OCAMLFIND_DESTDIR fix for oasis odb

  • Participants
  • Parent commits 1f4aedc

Comments (0)

Files changed (4)

 camlGI.cmxa: $(SOURCES) camlGI.cmi
 	$(OCAMLOPT) $(PP) -a -o $@ $(OCAMLOPTFLAGS) $<
 
-ifdef OCAMLLIBDIR
-OCAMLFIND_DESTDIR=-destdir $(OCAMLLIBDIR)
-else
-OCAMLFIND_DESTDIR=
-endif
+# X # ifdef OCAMLLIBDIR
+# X # OCAMLFIND_DESTDIR=-destdir $(OCAMLLIBDIR)
+# X # else
+# X # OCAMLFIND_DESTDIR=
+# X # endif
 # The install rule is separate because "ocamlfind" cannot install
 # incrementally
 install: byte opt
-	$(OCAMLFIND) remove  $(PKGNAME) || true
-	$(OCAMLFIND) install $(OCAMLFIND_DESTDIR) $(PKGNAME) META \
+	$(OCAMLFIND) remove $(PKGNAME) || true
+	$(OCAMLFIND) install $(PKGNAME) META \
 	  $(ARCHIVE) $(XARCHIVE) $(ARCHIVE:.cma=.cmi) $(ARCHIVE:.cma=.mli)
 
 install-byte: byte
 	$(OCAMLFIND) remove  $(PKGNAME) || true
-	$(OCAMLFIND) install $(OCAMLFIND_DESTDIR) $(PKGNAME) META \
+	$(OCAMLFIND) install $(PKGNAME) META \
 	  $(ARCHIVE) $(ARCHIVE:.cma=.cmi) $(ARCHIVE:.cma=.mli)
 
 install-opt: opt
 	$(OCAMLFIND) remove  $(PKGNAME) || true
-	$(OCAMLFIND) install $(OCAMLFIND_DESTDIR) $(PKGNAME) META \
+	$(OCAMLFIND) install $(PKGNAME) META \
 	  $(XARCHIVE) $(ARCHIVE:.cmxa=.cmi) $(ARCHIVE:.cmxa=.mli)
 
 install-doc: doc
 	cp html/* $(DOCDIR)
 
 uninstall:
-	$(OCAMLFIND) remove  $(PKGNAME)
+	$(OCAMLFIND) remove $(PKGNAME)
 	$(REMOVE) -rf $(DOCDIR)
 
 # Documentation

File Makefile.config

 #
 COPY = cp
 #COPY = copy
-REMOVE = rm
+REMOVE = rm
 Authors:     Christophe Troestler
 License:     LGPL-2.1 with OCaml linking exception
 # Plugins:      StdFiles (0.2)
-BuildType:    Custom (0.2)
+BuildType:   Custom (0.2)
 InstallType:    Custom (0.2)
 XCustomBuild: make
-XCustomInstall: make install
-XCustomUninstall: ocamlfind remove CamlGI
+XCustomInstall: OCAMLFIND_DESTDIR=$libdir make install
+XCustomUninstall: OCAMLFIND_DESTDIR=$libdir ocamlfind remove CamlGI
 BuildTools: make
 
 Library camlGI
 (* setup.ml generated for the first time by OASIS v0.2.0 *)
 
 (* OASIS_START *)
-(* DO NOT EDIT (digest: 31a8ffc73a3692faba933f7f342bbc36) *)
+(* DO NOT EDIT (digest: b946fee5e1315d51c5d49521711d798e) *)
 (*
    Regenerated by OASIS v0.2.0
    Visit http://oasis.forge.ocamlcore.org for more information and
        CustomPlugin.main
          {
             CustomPlugin.cmd_main =
-              [(OASISExpr.EBool true, ("make", ["install"]))];
+              [
+                 (OASISExpr.EBool true,
+                   ("OCAMLFIND_DESTDIR=$libdir", ["make"; "install"]))
+              ];
             cmd_clean = [(OASISExpr.EBool true, None)];
             cmd_distclean = [(OASISExpr.EBool true, None)];
             };
        CustomPlugin.main
          {
             CustomPlugin.cmd_main =
-              [(OASISExpr.EBool true, ("ocamlfind", ["remove"; "CamlGI"]))];
+              [
+                 (OASISExpr.EBool true,
+                   ("OCAMLFIND_DESTDIR=$libdir",
+                     ["ocamlfind"; "remove"; "CamlGI"]))
+              ];
             cmd_clean = [(OASISExpr.EBool true, None)];
             cmd_distclean = [(OASISExpr.EBool true, None)];
             };
           CustomPlugin.clean
             {
                CustomPlugin.cmd_main =
-                 [(OASISExpr.EBool true, ("make", ["install"]))];
+                 [
+                    (OASISExpr.EBool true,
+                      ("OCAMLFIND_DESTDIR=$libdir", ["make"; "install"]))
+                 ];
                cmd_clean = [(OASISExpr.EBool true, None)];
                cmd_distclean = [(OASISExpr.EBool true, None)];
                };
           CustomPlugin.clean
             {
                CustomPlugin.cmd_main =
-                 [(OASISExpr.EBool true, ("ocamlfind", ["remove"; "CamlGI"]))
+                 [
+                    (OASISExpr.EBool true,
+                      ("OCAMLFIND_DESTDIR=$libdir",
+                        ["ocamlfind"; "remove"; "CamlGI"]))
                  ];
                cmd_clean = [(OASISExpr.EBool true, None)];
                cmd_distclean = [(OASISExpr.EBool true, None)];
           CustomPlugin.distclean
             {
                CustomPlugin.cmd_main =
-                 [(OASISExpr.EBool true, ("make", ["install"]))];
+                 [
+                    (OASISExpr.EBool true,
+                      ("OCAMLFIND_DESTDIR=$libdir", ["make"; "install"]))
+                 ];
                cmd_clean = [(OASISExpr.EBool true, None)];
                cmd_distclean = [(OASISExpr.EBool true, None)];
                };
           CustomPlugin.distclean
             {
                CustomPlugin.cmd_main =
-                 [(OASISExpr.EBool true, ("ocamlfind", ["remove"; "CamlGI"]))
+                 [
+                    (OASISExpr.EBool true,
+                      ("OCAMLFIND_DESTDIR=$libdir",
+                        ["ocamlfind"; "remove"; "CamlGI"]))
                  ];
                cmd_clean = [(OASISExpr.EBool true, None)];
                cmd_distclean = [(OASISExpr.EBool true, None)];
                       bs_install = [(OASISExpr.EBool true, true)];
                       bs_path = ".";
                       bs_compiled_object = Best;
-                      bs_build_depends = [];
+                      bs_build_depends =
+                        [
+                           FindlibPackage ("threads", None);
+                           FindlibPackage ("unix", None);
+                           FindlibPackage ("str", None)
+                        ];
                       bs_build_tools = [ExternalTool "make"];
                       bs_c_sources = [];
                       bs_data_files = [];