From d384c3b64cdf00c1ff0789eddceb107cff78e4f0 Mon Sep 17 00:00:00 2001 From: Michael Greenberg Date: Tue, 25 Feb 2020 14:17:44 -0800 Subject: [PATCH] go back to libdash.install approach --- libdash.opam | 4 +++- libdash_install.sh => mk_dot_install.sh | 13 ++++++++----- 2 files changed, 11 insertions(+), 6 deletions(-) rename libdash_install.sh => mk_dot_install.sh (61%) diff --git a/libdash.opam b/libdash.opam index 3ce41b4..f6f0d98 100644 --- a/libdash.opam +++ b/libdash.opam @@ -12,6 +12,7 @@ depends: [ "ocamlfind" {>= "1.8.0"} "ctypes" {>= "0.11.5"} "ctypes-foreign" {>= "0.4.0"} + "opam-installer" {>= "2.0.0"} "conf-autoconf" {build} # "conf-libtool" {build} ] @@ -27,11 +28,12 @@ build: [ [make] [make "install"] # into _build [make "-C" "ocaml" "all"] + ["./mk_dot_install.sh"] ["./ldconfig.sh"] # fix up .so files if ldconfig didn't do it [make "-C" "ocaml" "test"] {with-test} ] install: [ - ["./libdash_install.sh"] # autotools borks if we call it install.sh, lol + ["opam-installer" "--prefix=%{prefix}%" "libdash.install"] [make "-C" "test" "test"] {with-test} ] dev-repo: "git+https:///github.com/mgree/libdash" diff --git a/libdash_install.sh b/mk_dot_install.sh similarity index 61% rename from libdash_install.sh rename to mk_dot_install.sh index 7b1a955..0ac9473 100755 --- a/libdash_install.sh +++ b/mk_dot_install.sh @@ -1,6 +1,6 @@ -#!/bin/bash +#!/bin/sh -set -ex +set -e libdash_files=$(ls _build/lib) bindings_files="META dash.cmxa dash.cma dash.a dash.mli dash.cmi dash.cmo dash.cmx ast.mli ast.cmi ast.cmo ast.cmx" @@ -8,12 +8,15 @@ bindings_files="META dash.cmxa dash.cma dash.a dash.mli dash.cmi dash.cmo dash.c files= for f in ${libdash_files} do - files="${files} _build/lib/${f}" + files="${files} \"_build/lib/${f}\"" done for f in ${bindings_files} do - files="${files} ocaml/${f}" + files="${files} \"ocaml/${f}\"" done -ocamlfind install libdash -nodll $files +cat >libdash.install <