From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike McClurg Subject: [PATCH] OCaml tools: ask compiler for correct library path Date: Tue, 7 Jun 2011 18:28:33 +0100 Message-ID: <4DEE5FC1.4040609@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "xen-devel@lists.xensource.com" Cc: Jonathan Ludlam List-Id: xen-devel@lists.xenproject.org From: Mike McClurg OCaml libraries will live in /usr/local/ if the user compiles OCaml from source. This patch asks the OCaml compiler where we should look for libraries. NB: it may be that we should do the same thing for the NetBSD case, but I don't have a BSD box to test this out. Signed-off-by: Mike McClurg diff -r 37c77bacb52a -r ebc32e1f7f6f tools/ocaml/common.make --- a/tools/ocaml/common.make Mon May 23 17:38:28 2011 +0100 +++ b/tools/ocaml/common.make Tue Jun 07 18:01:10 2011 +0100 @@ -9,7 +9,7 @@ OCAMLYACC ?= ocamlyacc CFLAGS += -fPIC -Werror -CFLAGS-$(CONFIG_Linux) += -I/usr/lib64/ocaml -I/usr/lib/ocaml +CFLAGS-$(CONFIG_Linux) += -I$(shell ocamlc -where) CFLAGS-$(CONFIG_NetBSD) += -I/usr/pkg/lib/ocaml -fPIC OCAMLOPTFLAG_G := $(shell $(OCAMLOPT) -h 2>&1 | sed -n 's/^ *\(-g\) .*/\1/p')