Project

General

Profile

« Previous | Next » 

Revision fc476249

Added by Teme Kahsai almost 8 years ago

adding -I options to lustrec

View differences:

autom4te.cache/requests
14 14
                        'configure.ac'
15 15
                      ],
16 16
                      {
17
                        '_LT_AC_TAGCONFIG' => 1,
18
                        'AM_PROG_CC_C_O' => 1,
19
                        'AM_PROG_F77_C_O' => 1,
17
                        '_AM_MAKEFILE_INCLUDE' => 1,
18
                        'AM_ENABLE_MULTILIB' => 1,
19
                        'm4_sinclude' => 1,
20
                        'AC_CONFIG_FILES' => 1,
20 21
                        'AM_AUTOMAKE_VERSION' => 1,
22
                        'AM_CONDITIONAL' => 1,
23
                        '_AM_COND_IF' => 1,
24
                        'AM_POT_TOOLS' => 1,
21 25
                        'AM_PROG_AR' => 1,
22
                        'AM_GNU_GETTEXT' => 1,
23
                        'AC_INIT' => 1,
26
                        'AM_PROG_F77_C_O' => 1,
27
                        'LT_INIT' => 1,
28
                        'AC_LIBSOURCE' => 1,
29
                        'AC_REQUIRE_AUX_FILE' => 1,
24 30
                        'AC_SUBST_TRACE' => 1,
25
                        'AM_CONDITIONAL' => 1,
26
                        'LT_CONFIG_LTDL_DIR' => 1,
27
                        'LT_SUPPORTED_TAG' => 1,
31
                        'AM_GNU_GETTEXT' => 1,
32
                        '_AM_SUBST_NOTMAKE' => 1,
33
                        'AM_PROG_CXX_C_O' => 1,
34
                        'AC_DEFINE_TRACE_LITERAL' => 1,
35
                        'AM_PROG_MOC' => 1,
36
                        'AC_FC_PP_SRCEXT' => 1,
37
                        'AM_MAKEFILE_INCLUDE' => 1,
38
                        'm4_pattern_forbid' => 1,
28 39
                        'AC_CANONICAL_BUILD' => 1,
29
                        'AH_OUTPUT' => 1,
30
                        'LT_INIT' => 1,
31
                        'include' => 1,
32
                        'AC_CANONICAL_SYSTEM' => 1,
40
                        'AC_SUBST' => 1,
33 41
                        'AC_CONFIG_SUBDIRS' => 1,
34
                        'AC_CONFIG_FILES' => 1,
35
                        'AM_PROG_MOC' => 1,
36
                        'AC_CANONICAL_TARGET' => 1,
37
                        'm4_sinclude' => 1,
38
                        '_m4_warn' => 1,
39
                        'AM_SILENT_RULES' => 1,
40
                        'AM_POT_TOOLS' => 1,
41
                        'AM_ENABLE_MULTILIB' => 1,
42
                        'sinclude' => 1,
43 42
                        'AC_CONFIG_HEADERS' => 1,
44
                        'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
45
                        'AC_FC_FREEFORM' => 1,
46
                        'AC_CANONICAL_HOST' => 1,
47
                        'm4_pattern_allow' => 1,
48
                        'AC_DEFINE_TRACE_LITERAL' => 1,
49
                        'AM_PROG_FC_C_O' => 1,
50
                        'AM_XGETTEXT_OPTION' => 1,
51
                        '_AM_MAKEFILE_INCLUDE' => 1,
43
                        'AC_CONFIG_AUX_DIR' => 1,
52 44
                        'AC_CONFIG_LIBOBJ_DIR' => 1,
53
                        'AC_REQUIRE_AUX_FILE' => 1,
54
                        'AC_LIBSOURCE' => 1,
55
                        'AM_NLS' => 1,
56
                        'AM_MAINTAINER_MODE' => 1,
57
                        '_AM_COND_ELSE' => 1,
58
                        'AM_PATH_GUILE' => 1,
59
                        'm4_pattern_forbid' => 1,
60 45
                        'AC_FC_PP_DEFINE' => 1,
61
                        'AC_CONFIG_AUX_DIR' => 1,
46
                        'AC_CONFIG_LINKS' => 1,
47
                        'AH_OUTPUT' => 1,
48
                        '_LT_AC_TAGCONFIG' => 1,
49
                        'AM_XGETTEXT_OPTION' => 1,
50
                        'AM_SILENT_RULES' => 1,
51
                        'AC_CANONICAL_HOST' => 1,
52
                        'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
53
                        '_m4_warn' => 1,
54
                        'AC_INIT' => 1,
55
                        'm4_include' => 1,
56
                        'AM_MAINTAINER_MODE' => 1,
57
                        'AM_NLS' => 1,
58
                        'AC_FC_SRCEXT' => 1,
62 59
                        'AC_PROG_LIBTOOL' => 1,
60
                        'AM_PATH_GUILE' => 1,
61
                        'AC_CANONICAL_SYSTEM' => 1,
62
                        'include' => 1,
63
                        'LT_CONFIG_LTDL_DIR' => 1,
64
                        'AM_INIT_AUTOMAKE' => 1,
63 65
                        '_AM_COND_ENDIF' => 1,
64
                        'AM_MAKEFILE_INCLUDE' => 1,
65
                        '_AM_SUBST_NOTMAKE' => 1,
66
                        'AC_FC_SRCEXT' => 1,
67
                        'AM_PROG_CXX_C_O' => 1,
68
                        'm4_include' => 1,
69
                        '_AM_COND_IF' => 1,
70
                        'AC_FC_PP_SRCEXT' => 1,
71
                        'AC_CONFIG_LINKS' => 1,
72
                        'AC_SUBST' => 1,
73
                        'AM_INIT_AUTOMAKE' => 1
66
                        'AM_PROG_FC_C_O' => 1,
67
                        'sinclude' => 1,
68
                        'm4_pattern_allow' => 1,
69
                        'AM_PROG_CC_C_O' => 1,
70
                        'AC_FC_FREEFORM' => 1,
71
                        'LT_SUPPORTED_TAG' => 1,
72
                        '_AM_COND_ELSE' => 1,
73
                        'AC_CANONICAL_TARGET' => 1
74 74
                      }
75 75
                    ], 'Autom4te::Request' )
76 76
           );
src/Makefile
1 1
OCAMLBUILD=/opt/local/bin/ocamlbuild -classic-display -use-ocamlfind -no-links 
2 2

  
3
prefix=/Users/Teme/Documents/GitHub/lustrec/cocosim
3
prefix=/usr/local
4 4
exec_prefix=${prefix}
5 5
bindir=${exec_prefix}/bin
6 6
datarootdir = ${prefix}/share
src/backends/C/c_backend_header.ml
39 39
      begin
40 40
	fprintf fmt "#include <mpfr.h>@."
41 41
      end;
42
    fprintf fmt "#include \"%s/arrow.h\"@.@." Version.include_path
42
(*fprintf fmt "#include \"%s/arrow.h\"@.@." Version.include_path*)
43
  fprintf fmt "#include \"%s/arrow.h\"@.@." !Options.include_dir
43 44
  end
44 45

  
45 46
let rec print_static_val pp_var fmt v =
src/backends/C/c_backend_main.ml
167 167
  fprintf fmt "@]@ }@."       
168 168

  
169 169
let print_main_header fmt =
170
  fprintf fmt "#include <stdio.h>@.#include <unistd.h>@.#include \"%s/io_frontend.h\"@." Version.include_path 
170
(*fprintf fmt "#include <stdio.h>@.#include <unistd.h>@.#include \"%s/io_frontend.h\"@." Version.include_path*)
171
fprintf fmt "#include <stdio.h>@.#include <unistd.h>@.#include \"%s/io_frontend.h\"@." !Options.include_dir
171 172

  
172 173

  
173 174
let print_main_c main_fmt main_machine basename prog machines _ (*dependencies*) =
src/corelang.ml
241 241

  
242 242
(* alias and type definition table *)
243 243

  
244
let mktop = mktop_decl Location.dummy_loc Version.include_path false 
244
(*let mktop = mktop_decl Location.dummy_loc Version.include_path false *)
245

  
246
let mktop = mktop_decl Location.dummy_loc !Options.include_dir false
245 247

  
246 248
let top_int_type = mktop (TypeDef {tydef_id = "int"; tydef_desc = Tydec_int})
247 249
let top_bool_type = mktop (TypeDef {tydef_id = "bool"; tydef_desc = Tydec_bool})
src/machine_code.ml
161 161
    node_spec = None;
162 162
    node_annot = [];  }
163 163

  
164
let arrow_top_decl =
164
(*let arrow_top_decl =
165 165
  {
166 166
    top_decl_desc = Node arrow_desc;
167 167
    top_decl_owner = Version.include_path;
168 168
    top_decl_itf = false;
169 169
    top_decl_loc = Location.dummy_loc
170
  }*)
171

  
172
let arrow_top_decl =
173
  {
174
    top_decl_desc = Node arrow_desc;
175
    top_decl_owner = !Options.include_dir;
176
    top_decl_itf = false;
177
    top_decl_loc = Location.dummy_loc
170 178
  }
171 179

  
180

  
172 181
let mk_val v t = { value_desc = v; 
173 182
		   value_type = t; 
174 183
		   value_annot = None }
src/modules.ml
113 113
    | _       -> assert false
114 114
  with Not_found -> Hashtbl.add consts_table name value
115 115

  
116
let name_dependency (local, dep) =
117
  ((if local then !Options.dest_dir else Version.include_path) ^ "/") ^ dep
116
(*let name_dependency (local, dep) =
117
      ((if local then !Options.dest_dir else Version.include_path) ^ "/") ^ dep
118
      *)
118 119

  
120
let name_dependency (local, dep) =
121
  ((if local then !Options.dest_dir else !Options.include_dir) ^ "/") ^ dep
122
  
119 123
let import_dependency_aux loc (local, dep) =
120 124
  let basename = name_dependency (local, dep) in
121 125
  let extension = ".lusic" in 
src/options.ml
11 11

  
12 12
let version = Version.number
13 13
let codename = Version.codename
14
let include_path = Version.include_path
14
let include_dir = ref "."
15
let include_path =
16
if (!include_dir != ".") then Version.prefix ^ !include_dir
17
else Version.include_path
18
    
19

  
20

  
15 21

  
16 22
let print_version () =
17 23
  Format.printf "Lustrec compiler, version %s (%s)@." version codename;
18
  Format.printf "Include directory: %s@." include_path
24
  Format.printf "Include directory: %s@." include_path;
25
  Format.printf "User selected Include directory: %s@." !include_dir
19 26

  
20 27
let main_node = ref ""
21 28
let static_mem = ref true
......
28 35
let spec = ref "acsl"
29 36
let output = ref "C"
30 37
let dest_dir = ref "."
38

  
31 39
let verbose_level = ref 1
32 40
let global_inline = ref false
33 41
let witnesses = ref false
......
54 62
    failwith "mpfr requires a positive integer"
55 63
			
56 64
let options =
57
  [ "-d", Arg.Set_string dest_dir,
58
    "uses the specified directory \x1b[4mdir\x1b[0m as root for generated/imported object and C files <default: .>";
65
[ "-d", Arg.Set_string dest_dir,
66
"uses the specified directory \x1b[4mdir\x1b[0m as root for generated/imported object and C files <default: .>";
67
"-I", Arg.Set_string include_dir, "Include directory";
59 68
    "-node", Arg.Set_string main_node, "specifies the \x1b[4mmain\x1b[0m node";
60 69
    "-init", Arg.Set delay_calculus, "performs an initialisation analysis for Lustre nodes <default: no analysis>";
61 70
    "-dynamic", Arg.Clear static_mem, "specifies a dynamic allocation scheme for main Lustre node <default: static>";
src/version.ml
3 3

  
4 4
let codename ="@VERSION_CODENAME@"
5 5

  
6
let prefix = "/Users/Teme/Documents/GitHub/lustrec/cocosim"
6
let prefix = "/usr/local"
7 7

  
8 8
let include_path = prefix ^ "/include/lustrec"

Also available in: Unified diff