Commit ea78ff30 authored by Erwan Jahier's avatar Erwan Jahier
Browse files

Some changes (mostly in makefiles) so that i can package up a 64-bits mac version.

Note that it triggered a bug in the use of Random.int: it cannot be
use on max_int, as its max admissible value is 2^30, and max_int=2^62
on 64 bits arch!!
parent a323fd67
......@@ -37,7 +37,7 @@ CPP_COMPILER=$(GPP)
CPP_LINKER=$(GPP)
CPP_FLAGS=-g -O0 -fno-operator-names -I$(HOME)/$(HOST_TYPE)/include/ -I$(shell $(OCAMLC) -where)
CPP_FLAGS=-g -O0 -fno-operator-names -I$(HOME)/$(HOST_TYPE)/include/ -I$(shell $(OCAMLC) -where) $(CPP_FLAGS0)
LFLAGS = -cclib -lstdc++
......
......@@ -398,7 +398,7 @@ void GBddNode::dbg_print(int mark){
size_mark = mark;
printf("%3d = ", dbg_index);
if(index == GBddNode::leaf_index()){
printf("[0x%x];", (int)info);
printf("[0x%x];", (long)info);
printf("\n");
} else {
printf("(%3d)?", index);
......@@ -529,7 +529,7 @@ int GBdd::hash(int max) const {
}
int GBdd::code() const {
int i = (int)value();
int i = (long)value();
return (i >= 0)? i : -i;
}
......
......@@ -2,7 +2,6 @@
#include <stdio.h>
//#include <values.h>
#include <memory.h>
#define MAXINT ((int)((unsigned)(~(unsigned)0) >> 1))
/****************************************************************
......
......@@ -88,11 +88,45 @@ ifeq ($(HOSTTYPE),sparc-sun)
else
ifeq ($(HOSTTYPE),mac)
CC=g++ -g
CAML_LIB=/private/var/automount/import/macos/ocaml/3.09.3/lib/ocaml
# CAML_LIB=/private/var/automount/import/macos/ocaml/3.09.3/lib/ocaml
OCAMLFLAGS= -cc g++
CAML_INSTALL_DIR=`ocamlc -where`
else
ifeq ($(HOSTTYPE),Darwin-x86_64)
CC=gcc -I/usr/local/soft/gmp/5.1.3/ -I/home/jahier/ocamlbrew/ocaml-4.01.0/.opam/system/lib/camlidl/
# CAML_LIB=/private/var/automount/import/macos/ocaml/3.09.3/lib/ocaml
OCAMLFLAGS= -cc g++
CFLAGS=-g -O2 -fpic -DPOLKA_NUM=3 -I/home/jahier/ocamlbrew/ocaml-4.01.0/.opam/system/lib/camlidl/ -I/usr/local/soft/gmp/5.1.3/
CPP_FLAGS0=-I/home/jahier/ocamlbrew/ocaml-4.01.0/.opam/system/lib/camlidl/
CAML_INSTALL_DIR=`ocamlc -where`
CAMLP4=$(OCAML_PATH)camlp4
CAMLP4O=$(OCAML_PATH)camlp4o
CAMLP4OF=$(OCAML_PATH)camlp4of
CAMLP4OOF=$(OCAML_PATH)camlp4oof
OCAMLOPT=$(OCAML_PATH)ocamlopt
OCAMLC=$(OCAML_PATH)ocamlc
OCAMLDEP=$(OCAML_PATH)ocamldep
OCAMLRUN=$(OCAML_PATH)ocamlrun
OCAML=$(OCAML_PATH)ocaml
OCAMLMKTOP=$(OCAML_PATH)ocamlmktop
OCAMLLEX=$(OCAML_PATH)ocamllex
OCAMLYACC=$(OCAML_PATH)ocamlyacc
OCAMLCP=$(OCAML_PATH)ocamlcp
OCAMLDOC=$(OCAML_PATH)ocamldoc
OCAMLMKLIB=$(OCAML_PATH)ocamlmklib
OCAMLPROF=$(OCAML_PATH)ocamlprof
OCAMLOPTFLAG= -cclib -L/usr/local/soft/gmp/5.1.3/.libs/
#-cclib -lcrt0.o
OCAMLLIB = `$(OCAMLC) -where`
CAML_INSTALL_DIR=`$(OCAMLC) -where`
LD_LIBRARY_PATH=/usr/local/soft/gmp/5.1.3/.libs:$LD_LIBRARY_PATH
else
......@@ -162,7 +196,7 @@ ifeq ($(HOSTTYPE),win32)
else
# LINUX quoi ...
OCAML_PATH=/usr/local/soft/ocaml/3.10.0/bin/
OCAML_PATH=
......@@ -201,6 +235,7 @@ endif
endif
endif
endif
endif
LURETTE_SOURCES_C = \
$(OBJDIR)/liblutin_c.c \
......
......@@ -12,11 +12,11 @@ ifeq ($(HOSTTYPE),mac)
LD_ARCH=-DMAC
endif
CMXA_LIB = unix.cmxa nums.cmxa str.cmxa bdd.cmxa polka.cmxa rdbg-plugin.cmxa luc4ocaml.cmxa
CMXA_LIB = unix.cmxa nums.cmxa str.cmxa bdd.cmxa polka.cmxa rdbg-plugin.cmxa lut4ocaml.cmxa
CMA_LIB=luc4ocaml.cma
LUC4OCAML_INSTALL_DIR = -I ../../../lib -I +rdbg-plugin
INCLUDE_DIR = -I ../../../lib -I ../../../lib/rdbg-plugin
LUTIN=../../../bin/lutin$(EXE)
# LUC4OCAML_INSTALL_DIR = -I +lucky
# INCLUDE_DIR = -I +lucky
......@@ -25,10 +25,10 @@ LUTIN=../../../bin/lutin$(EXE)
MAIN=call_foo
$(MAIN).opt:$(MAIN).ml
ocamlopt.opt -cc g++ -cclib -lgmp $(LUC4OCAML_INSTALL_DIR) $(CMXA_LIB) $(MAIN).ml -o $(MAIN).opt
ocamlopt.opt -cc g++ $(INCLUDE_DIR) -cclib -lgmp $(CMXA_LIB) $(MAIN).ml -o $(MAIN).opt
$(MAIN):$(MAIN).ml
ocamlc.opt $(LUC4OCAML_INSTALL_DIR) graphics.cma $(CMA_LIB) $(MAIN).ml -o $(MAIN)
ocamlc.opt $(INCLUDE_DIR) graphics.cma $(CMA_LIB) $(MAIN).ml -o $(MAIN)
......
(* Demonstrate the use of Lutin from Ocaml. *)
open Luc4ocaml
let oc = open_out "call_foo.rif"
(* node main(a:int; b:bool; c:real) returns ( x:int; y:bool; z:real) = *)
let rec main_loop foo_state (a, b, c) cpt =
open Data
let foo_inputs = ["a",I a ; "b", B b; "c", F c] in
let (foo_state, (foo_outputs, _)) = Luc4ocaml.step foo_state foo_inputs in
let I x = List.assoc "x" foo_outputs
and B y = List.assoc "y" foo_outputs
and F z = List.assoc "z" foo_outputs
let _ =
let inputs, outputs, kill, step, step_dbg, mems_i,mems_o =
let args = Array.of_list ["../../../bin/lutin";"foo.lut";"-n";"main";"-seed";"1"] in
LutinRun.make_lut args
in
if cpt = 0 then () else (
rif_write oc foo_state foo_inputs foo_outputs;
main_loop foo_state (x, not y, z) (cpt-1)
)
let _ =
let foo_state = Luc4ocaml.make ~seed:1 ["foo.lut"] ~main:(Some "main") in
rif_write_interface oc foo_state false;
main_loop foo_state (0, true, 0.0) 100
let rec main_loop (a, b, c) cpt cpt_max =
let foo_inputs = ["a",I a ; "b", B b; "c", F c] in
let foo_outputs = step foo_inputs in
let I x = List.assoc "x" foo_outputs
and B y = List.assoc "y" foo_outputs
and F z = List.assoc "z" foo_outputs
in
if cpt >= cpt_max then () else (
RifIO.write oc (Printf.sprintf "\n#step %i\n" cpt);
RifIO.write_outputs oc string_of_float inputs foo_inputs;
RifIO.write oc " #outs ";
RifIO.write_outputs oc string_of_float outputs foo_outputs;
main_loop (x, not y, z) (cpt+1) cpt_max)
in
RifIO.write_interface oc inputs outputs None None;
main_loop (0, true, 0.0) 1 100
......@@ -23,9 +23,17 @@ ifeq ($(HOST_TYPE),sparc-sun)
else
ifeq ($(HOST_TYPE),mac)
CC = gcc
CC = gcc -I$(OCAMLLIB) -L $(OCAMLLIB)
CC = gcc -I$(OCAMLLIB) -L $(OCAMLLIB)
GMP_INSTALL=/sw
else
ifeq ($(HOST_TYPE),Darwin-x86_64)
CC = gcc
CC = gcc -I$(OCAMLLIB) -L $(OCAMLLIB) -L/home/jahier/ocamlbrew/ocaml-4.01.0/.opam/system/lib/camlidl/
GCC=$CC
GMP_INSTALL=/usr/local/soft/gmp/5.1.3/
else
ifeq ($(HOST_TYPE),win32)
AR = /usr/bin/i586-mingw32msvc-ar
CC = /usr/bin/i586-mingw32msvc-gcc
......@@ -39,6 +47,7 @@ endif
endif
endif
endif
endif
CURDIR = $(shell pwd)
# (where to install Polka)
......
......@@ -142,7 +142,7 @@ let (make_lucky : string -> string -> process_nb) =
by self_init. *)
let seed =
match !seed_ref with
| None -> Random.int max_int
| None -> Random.int 1073741823
| Some s -> s
in
let _ =
......@@ -179,7 +179,7 @@ let (make_lutin : string -> string -> process_nb) =
by self_init. *)
let seed =
match !seed_ref with
| None -> Random.int max_int
| None -> Random.int 1073741823
| Some s -> s
in
let _ =
......
......@@ -36,7 +36,7 @@ type step_mode = StepInside | StepEdges | StepVertices
(* I defined mine because i need to know the seed that has been drawn by self_init. *)
let random_seed () =
let () = Random.self_init () in
Random.int max_int
Random.int 1073741823
open Prog
......@@ -160,7 +160,7 @@ let (string_of_subst_list : subst list -> string) =
let (rif_read : in_channel -> state -> inputs) =
fun ic st ->
let i = Rif.read ic None st.s.in_vars in
let i = Rif.read false ic None st.s.in_vars in
map2list i
......
......@@ -58,7 +58,7 @@ let arg_nb = (Array.length Sys.argv)
by self_init. *)
let random_seed () =
let () = Random.self_init () in
Random.int max_int
Random.int 1073741823
let string_of_node n = n
let pid_oracle = ref 0
......@@ -315,7 +315,7 @@ and
Rif.write stdout step_str;
)
in
let input = Rif.read stdin (Some stdout) state.s.in_vars in
let input = Rif.read (state.d.verbose >0) stdin (Some stdout) state.s.in_vars in
(* let input_list = Hashtbl.fold (fun vn x acc -> (vn,x)::acc) input [] in *)
let ral = LucFGen.get input state in
let (next_state, (out, loc)) =
......
......@@ -8,7 +8,9 @@ include $(LURETTE_PATH)/source/Makefile.ln
######################################################################
ifneq ($(HOSTTYPE),Darwin-x86_64)
STATIC=yes
endif
OCAMLFLAGS += -I $(OBJDIR) -I $(OCAMLLIB) -I $(PREFIX)/$(HOSTTYPE)/lib
OCAMLFLAGS += -I +rdbg-plugin
......@@ -21,9 +23,9 @@ ifdef STATIC
OCAMLLDFLAGS = -cclib -lstdc++ -cclib -lm -cclib -lc -ccopt -static\
-cclib -l$(POLKA)_caml -cclib -l$(POLKA) -cclib -lgmp $(OCAMLOPTFLAG)
else
OCAMLLDFLAGS= -cclib -lstdc++ -cclib -I/usr/lib/w32api \
OCAMLLDFLAGS= -cclib -lstdc++ -cclib -I/usr/lib/w32api $(OCAMLOPTFLAG) \
-cclib -l$(POLKA)_caml \
-cclib -l$(POLKA) -cclib -lgmp $(OCAMLOPTFLAG)
-cclib -l$(POLKA) -cclib -lgmp
endif
OCAMLLDFLAGS += -I +rdbg-plugin
......
(** COMPILATION/EXPANSION : expressions algébriques
(** COMPILATION/EXPANSION : expressions algébriques
------------------------------------------------------------
Représentation des expressions algébriques.
Représentation des expressions algébriques.
----------------------------------------------------------*)
(**********************************************************)
(**
C'est la structure utilisée pour toutes les expressions non "trace"
C'est la structure utilisée pour toutes les expressions non "trace"
(grosso/modo du Lustre !).
La structure est très simple~: on distingue plusieurs cas de
feuilles, et un seul cas de noeud (opérateur).
La structure est très simple~: on distingue plusieurs cas de
feuilles, et un seul cas de noeud (opérateur).
Elle contient, dès la construction, les infos sémantiques associées :
type de valeur et "controlabilité".
Elle contient, dès la construction, les infos sémantiques associées :
type de valeur et "controlabilité".
Rappel~: une alg_exp est contrôlable si et seulement si elle contient
au moins une référence à une variable support contrôlable (output ou local).
Rappel~: une alg_exp est contrôlable si et seulement si elle contient
au moins une référence à une variable support contrôlable (output ou local).
*)
......@@ -76,22 +76,22 @@ val of_bval : bool -> t
val of_ival : int -> t
val of_rval : float -> t
(** Réference à une variable du support *)
(** Réference à une variable du support *)
val of_support : CoIdent.t -> CkTypeEff.t -> bool -> t
(** Réference au pre d'une variable du support *)
(** Réference au pre d'une variable du support *)
val of_pre : CoIdent.t -> CkTypeEff.t -> t
(** Référence à un alias *)
(** Référence à un alias *)
val of_alias : CoIdent.t -> CkTypeEff.t -> bool -> t
(** Tout calcul est un appel, prédéfini ou non *)
(** Tout calcul est un appel, prédéfini ou non *)
val of_call : CoIdent.t -> CkTypeEff.t -> t list -> t
val of_external_call :
CoIdent.t -> CkIdentInfo.extern_info ->
CkTypeEff.profile -> CkTypeEff.t -> t list -> t
(** On donne quand même le and ... *)
(** On donne quand même le and ... *)
val of_and : t -> t -> t
val of_big_and : t list -> t
......@@ -108,18 +108,18 @@ val is_controlable : t -> bool
val get_type : t -> CkTypeEff.t
(** Affichage prefixé sur stdout *)
(** Affichage prefixé sur stdout *)
val dump : t -> unit
(** Affichage prefixé sur os *)
(** Affichage prefixé sur os *)
val dumpf : Pervasives.out_channel -> t -> unit
(** Affichage infixé (autant que possible) sur os
(** Affichage infixé (autant que possible) sur os
n.b. compatible Lustre/Lucky
*)
val lus_dumpf : Pervasives.out_channel -> t -> unit
(** Affichage infixé (autant que possible) dans une string
(** Affichage infixé (autant que possible) dans une string
n.b. compatible Lustre/Lucky
*)
val lus_dumps : t -> string
......
(* Time-stamp: <modified the 04/12/2013 (at 17:55) by Erwan Jahier> *)
(* Time-stamp: <modified the 17/12/2013 (at 11:03) by Erwan Jahier> *)
(* generate ocaml glue code that makes it possible to call lutin
from ocaml with the current set of arguments.
......@@ -28,6 +28,10 @@ let inputs, outputs, kill, step, step_dbg, mems_i,mems_o =
let args = Array.of_list [%s] in
LutinRun.make_lut args
(* The following is to make it possible for rdbg to call this lutin program.
But of course, one can use it to dynamically call those steps functions from
any ocaml programs (as rdbg does).
*)
let dyn_file = (Dynlink.adapt_filename \"%s\")
let _ =
OcamlRM.add_inputs dyn_file inputs;
......
......@@ -206,7 +206,8 @@ let test_stop_average () = (
let rec run cpt = (
(* let (goon,stop) = average_weights m s cpt in *)
let (goon,stop) = new_goon_stop m s cpt in
let alea = Random.int (goon + stop) in
let s = goon + stop in
let alea = assert (s>0); Random.int (s) in
if (alea <= goon) then run (cpt+1)
else cpt
) in
......
......@@ -1061,6 +1061,7 @@ let rec genpath
| [] -> assert false
| [(wc, e)] -> assert (sum = wc); (wc,e)::acc
| (wc,e)::cel' -> (
assert (sum > 0);
if (Random.int sum < wc) then
(wc, e)::(acc @ cel')
else select_first (sum - wc) ((wc,e)::acc) cel'
......@@ -1771,6 +1772,7 @@ let rec (genpath_ldbg : t -> store -> CoTraceExp.t -> Event.ctx -> (behavior ->
| [] -> assert false
| [(wc, e)] -> assert (sum = wc); (wc,e)::acc
| (wc,e)::cel' -> (
assert (sum > 0);
if (Random.int sum < wc) then
(wc, e)::(acc @ cel')
else select_first (sum - wc) ((wc,e)::acc) cel'
......
......@@ -147,7 +147,7 @@ let rec to_simu oc infile mnode opt = (
let lut_memories =
if MainArg.load_mem opt then (
output_string oc "#lutin_outputs_memories ";
Rif.read stdin (if noo then Some oc else None) init_state.Prog.s.Prog.out_vars)
Rif.read (Verbose.level()>0) stdin (if noo then Some oc else None) init_state.Prog.s.Prog.out_vars)
else
Value.OfIdent.empty
in
......@@ -175,7 +175,7 @@ and main_loop_core oc opt t state pre_lut_output = (
let noo = not (MainArg.only_outputs opt) in
let _ = if noo then Rif.write oc step_str in
let lut_input = if t=1 && (boot opt) then Value.OfIdent.empty else
Rif.read stdin (if noo then Some oc else None) state.Prog.s.Prog.in_vars in
Rif.read (Verbose.level()>0) stdin (if noo then Some oc else None) state.Prog.s.Prog.in_vars in
let generator = LucFGen.get lut_input state in
(*
Call Lucky explorer/solver
......@@ -324,7 +324,7 @@ let to_exe oc infile mnode opt = (
Rif.flush oc
);
let pres' = LutExe.make_pre exe ins outs locs in
let ins' = Rif.read stdin (if noo then Some oc else None) in_vars in
let ins' = Rif.read (Verbose.level()>0) stdin (if noo then Some oc else None) in_vars in
Event.incr_nb ();
do_step (cpt+1) ctrl' ins' pres'
)
......@@ -367,7 +367,7 @@ let to_exe oc infile mnode opt = (
Rif.flush oc
);
let ins = if (boot opt) then Value.OfIdent.empty else
Rif.read stdin (if noo then Some oc else None) in_vars
Rif.read (Verbose.level()>0) stdin (if noo then Some oc else None) in_vars
in
(* HERE: init input/output pres *)
let pres = LutExe.get_init_pres exe in
......
......@@ -89,7 +89,7 @@ let set_precision = Util.change_precision
let seed opt = match opt._seed with
| Some i -> i
| None -> ( Random.self_init (); Random.int max_int)
| None -> ( Random.self_init (); Random.int 1073741823)
let set_seed opt s = opt._seed <- s
......
......@@ -650,9 +650,9 @@ ifeq ($(HOSTTYPE),cygwin)
LUCKY_DEF=lucky.def
endif
compile_all: gen_version $(OBJDIR) lucky show stubs gnuplot-rif gnuplot-socket call-via-socket gen_luc luc2luciole luc4c liblucky_nc.a libluc4c_nc.a draw-all luc4ocaml-all $(LUCKY_DEF) lutin check-rif ltop lut4ocaml-clean lut4ocaml ldbg
compile_all: gen_version $(OBJDIR) lucky show stubs gnuplot-rif gnuplot-socket call-via-socket gen_luc luc2luciole luc4c liblucky_nc.a libluc4c_nc.a draw-all $(LUCKY_DEF) lutin check-rif ltop lut4ocaml-clean lut4ocaml-all ldbg
rest: stubs gnuplot-rif gnuplot-socket call-via-socket gen_luc luc2luciole luc4c liblucky_nc.a libluc4c_nc.a draw-all luc4ocaml-all $(LUCKY_DEF) lutin check-rif ltop lut4ocaml-clean lut4ocaml ldbg
rest: stubs gnuplot-rif gnuplot-socket call-via-socket gen_luc luc2luciole luc4c liblucky_nc.a libluc4c_nc.a draw-all $(LUCKY_DEF) lutin check-rif ltop lut4ocaml-clean lut4ocaml ldbg
allnc: clean lucky ltop show stubs gnuplot-rif gnuplot-socket call-via-socket gen_luc luc2luciole luc4c libluc4c_nc.a draw-all lut4ocaml-all check-rif
......@@ -687,7 +687,7 @@ create_dirs:
[ -d $(LIB_INSTALL_DIR) ] || mkdir $(LIB_INSTALL_DIR) && \
[ -d $(INC_INSTALL_DIR) ] || mkdir $(INC_INSTALL_DIR)
cp: create_dirs lut4ocaml-cp luc4ocaml-cp draw-cp
cp: create_dirs lut4ocaml-cp draw-cp
cp $(OBJDIR)/gnuplot-rif$(EXE) $(BIN_INSTALL_DIR) ; \
cp $(OBJDIR)/gnuplot-socket$(EXE) $(BIN_INSTALL_DIR) ; \
cp $(OBJDIR)/call-via-socket$(EXE) $(BIN_INSTALL_DIR) ; \
......@@ -719,7 +719,8 @@ cp: create_dirs lut4ocaml-cp luc4ocaml-cp draw-cp
cp $(OBJDIR)/droconf.h $(INC_INSTALL_DIR) ;\
cp $(OBJDIR)/luc4c_stubs.h $(INC_INSTALL_DIR) ;\
cp $(OBJDIR)/dllEzdl_c_stubs.so $(LIB_INSTALL_DIR)
cp $(OBJDIR)/libEzdl_c_stubs.a $(LIB_INSTALL_DIR)
cp $(OBJDIR)/libEzdl_c_stubs.a $(LIB_INSTALL_DIR); \
cp $(OBJDIR)/lutinRun.cm* $(LIB_INSTALL_DIR); \
# cp $(OBJDIR)/*.cmx $(LIB_INSTALL_DIR) ;\
......@@ -783,3 +784,4 @@ lutin-labo-install:
cp -f $(OBJDIR)/lutinRun.cm* $(CAML_INSTALL_DIR)/lutin
cp -f $(OBJDIR)/*Ezdl_c_stubs* $(CAML_INSTALL_DIR)/lutin
cp ../working/$(HOSTTYPE)/lib/* $(CAML_INSTALL_DIR)/lutin
......@@ -189,61 +189,48 @@ test-lurette-rel:
#################################################################################################"
LUCKY_RELEASE_NAME=lutin_$(VERSION)_$(HOSTTYPE)
lutin-rel:$(LUCKY_RELEASE_NAME).tgz
$(LUCKY_RELEASE_NAME).tgz:strip
rm -rf /tmp/$(LUCKY_RELEASE_NAME)/
mkdir /tmp/$(LUCKY_RELEASE_NAME)/
mkdir /tmp/$(LUCKY_RELEASE_NAME)/examples
mkdir /tmp/$(LUCKY_RELEASE_NAME)/examples/lutin
mkdir /tmp/$(LUCKY_RELEASE_NAME)/examples/lucky
mkdir /tmp/$(LUCKY_RELEASE_NAME)/bin
mkdir /tmp/$(LUCKY_RELEASE_NAME)/lib
mkdir /tmp/$(LUCKY_RELEASE_NAME)/utils
mkdir /tmp/$(LUCKY_RELEASE_NAME)/include
mkdir /tmp/$(LUCKY_RELEASE_NAME)/doc
cp -rf $(LURETTE_PATH)/$(HOSTTYPE)/lib/* /tmp/$(LUCKY_RELEASE_NAME)/lib
cp -rf $(LURETTE_PATH)/$(HOSTTYPE)/include /tmp/$(LUCKY_RELEASE_NAME)/
cp $(LURETTE_PATH)/$(HOSTTYPE)/bin/lucky$(EXE) /tmp/$(LUCKY_RELEASE_NAME)/bin/
cp $(LURETTE_PATH)/utils/lucky_cpp /tmp/$(LUCKY_RELEASE_NAME)/utils
cp $(LURETTE_PATH)/$(HOSTTYPE)/bin/luc2luciole$(EXE) /tmp/$(LUCKY_RELEASE_NAME)/bin/
cp $(LURETTE_PATH)/$(HOSTTYPE)/bin/lutin$(EXE) /tmp/$(LUCKY_RELEASE_NAME)/bin/
cp $(LURETTE_PATH)/$(HOSTTYPE)/bin/gnuplot-rif$(EXE) /tmp/$(LUCKY_RELEASE_NAME)/bin/
cp $(LURETTE_PATH)/utils/simec_trap /tmp/$(LUCKY_RELEASE_NAME)/bin/
cp `which simec$(EXE)` /tmp/$(LUCKY_RELEASE_NAME)/bin/ || mymsg "cant find simec$(EXE)?"
cp `which luciole` /tmp/$(LUCKY_RELEASE_NAME)/bin/ || mymsg "cant find luciole?"
cp `which sim2chrogtk$(EXE)` /tmp/$(LUCKY_RELEASE_NAME)/bin/ || mymsg "cant find sim2chrogtk$(EXE)?"
cp $(LURETTE_PATH)/doc/lucky-man/lucky-man.pdf /tmp/$(LUCKY_RELEASE_NAME)/doc/
cp $(LURETTE_PATH)/doc/lutin-man/lutin-man.pdf /tmp/$(LUCKY_RELEASE_NAME)/doc/
cp -rf $(LURETTE_PATH)/examples/lucky/C /tmp/$(LUCKY_RELEASE_NAME)/examples/lucky/
cp -rf $(LURETTE_PATH)/examples/lucky/lustre /tmp/$(LUCKY_RELEASE_NAME)/examples/lucky/
cp -rf $(LURETTE_PATH)/examples/lucky/luciole /tmp/$(LUCKY_RELEASE_NAME)/examples/lucky/
cp -rf $(LURETTE_PATH)/examples/lutin/external_code /tmp/$(LUCKY_RELEASE_NAME)/examples/lutin/
cp -rf $(LURETTE_PATH)/examples/lutin/C /tmp/$(LUCKY_RELEASE_NAME)/examples/lutin/
cp -rf $(LURETTE_PATH)/examples/lutin/luciole /tmp/$(LUCKY_RELEASE_NAME)/examples/lutin/
cp -rf $(LURETTE_PATH)/examples/lutin/lustre /tmp/$(LUCKY_RELEASE_NAME)/examples/lutin/
cp -rf $(LURETTE_PATH)/examples/lutin/ocaml /tmp/$(LUCKY_RELEASE_NAME)/examples/lutin/
cp -rf $(LURETTE_PATH)/examples/lutin/up_and_down/ /tmp/$(LUCKY_RELEASE_NAME)/examples/lutin/
cp -rf $(LURETTE_PATH)/examples/lutin/test_ok/ /tmp/$(LUCKY_RELEASE_NAME)/examples/lutin/
cp -rf $(LURETTE_PATH)/utils /tmp/$(LUCKY_RELEASE_NAME)/utils/
cp $(LURETTE_PATH)/LICENCE /tmp/$(LUCKY_RELEASE_NAME)/
cd /tmp && tar cvfz $(LUCKY_RELEASE_NAME).tgz $(LUCKY_RELEASE_NAME)/
LUTIN_RELEASE_NAME=lutin_$(VERSION)_$(HOSTTYPE)
lutin-rel:$(LUTIN_RELEASE_NAME).tgz
$(LUTIN_RELEASE_NAME).tgz:
rm -rf /tmp/$(LUTIN_RELEASE_NAME)/
mkdir /tmp/$(LUTIN_RELEASE_NAME)/
mkdir /tmp/$(LUTIN_RELEASE_NAME)/examples
mkdir /tmp/$(LUTIN_RELEASE_NAME)/examples/lutin
mkdir /tmp/$(LUTIN_RELEASE_NAME)/bin
mkdir /tmp/$(LUTIN_RELEASE_NAME)/lib
mkdir /tmp/$(LUTIN_RELEASE_NAME)/utils
mkdir /tmp/$(LUTIN_RELEASE_NAME)/include
mkdir /tmp/$(LUTIN_RELEASE_NAME)/doc
cp -rf $(CAML_INSTALL_DIR)/lutin /tmp/$(LUTIN_RELEASE_NAME)/lib
cp -rf $(LURETTE_PATH)/$(HOSTTYPE)/include /tmp/$(LUTIN_RELEASE_NAME)/
cp $(LURETTE_PATH)/$(HOSTTYPE)/bin/lutin$(EXE) /tmp/$(LUTIN_RELEASE_NAME)/bin/
cp $(LURETTE_PATH)/$(HOSTTYPE)/bin/gnuplot-rif$(EXE) /tmp/$(LUTIN_RELEASE_NAME)/bin/
cp -rf $(LURETTE_PATH)/examples/lutin/ocaml /tmp/$(LUTIN_RELEASE_NAME)/examples/lutin/
cp -rf $(LURETTE_PATH)/examples/lutin/up_and_down /tmp/$(LUTIN_RELEASE_NAME)/examples/lutin/
cp -rf $(LURETTE_PATH)/utils /tmp/$(LUTIN_RELEASE_NAME)/
cp $(LURETTE_PATH)/LICENCE /tmp/$(LUTIN_RELEASE_NAME)/
cp -rf `ocamlc -where`/rdbg-plugin /tmp/$(LUTIN_RELEASE_NAME)/lib/
ifeq ($(HOSTTYPE),Darwin-x86_64)
cp /usr/local/soft/gmp/5.1.3/.libs/libgmp.* /tmp/$(LUTIN_RELEASE_NAME)/lib
cp $(LURETTE_PATH)/pre_release/$(HOSTTYPE)/lib/libcamlidl.a /tmp/$(LUTIN_RELEASE_NAME)/lib
endif
cd /tmp && tar cvfz $(LUTIN_RELEASE_NAME).tgz $(LUTIN_RELEASE_NAME)/
test-lutin-rel:
cd /tmp/ && \
rm -rf $(LUCKY_RELEASE_NAME) && \
tar xvfz $(LUCKY_RELEASE_NAME).tgz && pwd &&\
cd $(LUCKY_RELEASE_NAME) &&\
rm -rf $(LUTIN_RELEASE_NAME) && \
tar xvfz $(LUTIN_RELEASE_NAME).tgz && pwd &&\
cd $(LUTIN_RELEASE_NAME) &&\
\
cd /tmp/$(LUCKY_RELEASE_NAME)/examples/lutin/external_code && make test &&\
cd /tmp/$(LUCKY_RELEASE_NAME)/examples/lutin/C && make test && \
cd /tmp/$(LUCKY_RELEASE_NAME)/examples/lutin/luciole && make test && \
cd /tmp/$(LUCKY_RELEASE_NAME)/examples/lutin/lustre && make test && \
cd /tmp/$(LUCKY_RELEASE_NAME)/examples/lutin/ocaml && make test && \
mv /tmp/$(LUCKY_RELEASE_NAME).tgz $(SYNCHRONE_DIR)/lurette
cd /tmp/$(LUTIN_RELEASE_NAME)/examples/lutin/up_and_down && make test &&\
cd /tmp/$(LUTIN_RELEASE_NAME)/examples/lutin/ocaml && make test && \
cp /tmp/$(LUTIN_RELEASE_NAME).tgz $(SYNCHRONE_DIR)/lurette
cp-lutin-rel:
cp /tmp/$(LUTIN_RELEASE_NAME).tgz $(SYNCHRONE_DIR)/lurette
......@@ -414,7 +401,7 @@ rel_nodep:$(ALL_RELEASE_NAME).tgz
$(ALL_RELEASE_NAME).tgz:
rm -rf /tmp/$(ALL_RELEASE_NAME)
mkdir /tmp/$(ALL_RELEASE_NAME)
cp -rf /tmp/$(LUCKY_RELEASE_NAME)/* /tmp/$(ALL_RELEASE_NAME)/
cp -rf /tmp/$(LUTIN_RELEASE_NAME)/* /tmp/$(ALL_RELEASE_NAME)/
cp -rf /tmp/$(LURETTE_RELEASE_NAME)/* /tmp/$(ALL_RELEASE_NAME)/
cp -rf /tmp/$(LUC4OCAML_RELEASE_NAME)/* /tmp/$(ALL_RELEASE_NAME)/
cp -rf /tmp/$(DRAW_RELEASE_NAME)/* /tmp/$(ALL_RELEASE_NAME)/
......@@ -448,10 +435,12 @@ test-rel:
echo "test ok; consider issuing a 'make www' and a 'make verimag'"
# Update the web site with the new tgz