From a0ceaf3a5434a582b1cb3a66620e7309f0cc37a6 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Tue, 15 Dec 2009 18:21:33 +0000 Subject: [PATCH] wild guess for fixing the f12 build --- Makefile | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index cbed53d..af27b1d 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,13 @@ -all: vsys +# +# $Id$ +# $URL$ +# + +# OCAML_OLD is set to non-empty if str.cmxa needs to be passed twice to the loader +OCAML_RELEASE := $(shell ocaml -version) +OCAML_OLD := $(strip $(findstring version 3.09,$(OCAML_RELEASE)) $(findstring version 3.10,$(OCAML_RELEASE))) + +all: vsys docs include .dep @@ -33,8 +42,12 @@ ocaml_inotify-0.4/inotify.cmxa: splice_stub.o: splice_stub.c gcc -c -I /usr/lib/ocaml -I /usr/lib64/ocaml splice_stub.c -o splice_stub.o -vsys: ocaml_inotify-0.4/inotify.cmxa globals.cmx fdwatcher.cmx conffile.cmx splice_stub.o splice.cmx dirwatcher.cmx fifowatcher.cmx frontend.cmx unixsocketwatcher.cmx backend.cmx main.cmx docs +vsys: ocaml_inotify-0.4/inotify.cmxa globals.cmx fdwatcher.cmx conffile.cmx splice_stub.o splice.cmx dirwatcher.cmx fifowatcher.cmx frontend.cmx unixsocketwatcher.cmx backend.cmx main.cmx +ifeq "$(OCAML_OLD)" "" ocamlopt -I ocaml_inotify-0.4 str.cmxa unix.cmxa inotify.cmxa globals.cmx fdwatcher.cmx dirwatcher.cmx splice.cmx splice_stub.o directfifowatcher.cmx unixsocketwatcher.cmx frontend.cmx backend.cmx str.cmxa conffile.cmx main.cmx -o vsys +else + ocamlopt -I ocaml_inotify-0.4 str.cmxa unix.cmxa inotify.cmxa globals.cmx fdwatcher.cmx dirwatcher.cmx splice.cmx splice_stub.o directfifowatcher.cmx unixsocketwatcher.cmx frontend.cmx backend.cmx conffile.cmx main.cmx -o vsys +endif vsys.b: ocaml_inotify-0.4/inotify.cma inotify.cmi globals.ml fdwatcher.ml dirwatcher.ml directfifowatcher.ml frontend.ml backend.ml main.ml ocamlc -g str.cma unix.cma ocaml_inotify-0.4/inotify.cma globals.cmo fdwatcher.cmo dirwatcher.cmo directfifowatcher.cmo frontend.cmo backend.cmo str.cma conffile.cmo main.cmo -o vsys.b -- 2.43.0