Skip to content
Snippets Groups Projects
Commit 3b4b7a2e authored by GARION Christophe's avatar GARION Christophe
Browse files

[lustresf] lustresf targets are optional in Makefiles (see configure.ac)

parent 61e2b4b7
No related branches found
No related tags found
No related merge requests found
lustresf:
@echo Compiling binary lustresf
@make -C src lustresf
json-parser:
@echo Compiling binary json-parser
@make -C src json-parser
......@@ -21,13 +21,7 @@ lustret:
@echo Compiling binary lustret
@make -C src lustret
lustresf:
@echo Compiling binary lustresf
@make -C src lustresf
json-parser:
@echo Compiling binary json-parser
@make -C src json-parser
@lustresf@
configure: configure.ac
@echo configure.ac has changed relaunching autoconf
......
......@@ -61,13 +61,6 @@ AS_IF([ocamlfind query ocamlgraph >/dev/null 2>&1],
)
AC_MSG_RESULT(yes)
#Yojson
AC_MSG_CHECKING(yojson library)
AS_IF([ocamlfind query yojson >/dev/null 2>&1],
[],[AC_MSG_ERROR(yojson required. opam install yojson should solve the issue)],
)
AC_MSG_RESULT(yes)
# logging and command line librairies
AC_MSG_CHECKING(cmdliner library)
AS_IF([ocamlfind query cmdliner >/dev/null 2>&1],
......@@ -81,11 +74,16 @@ AS_IF([ocamlfind query fmt logs >/dev/null 2>&1],
)
AC_MSG_RESULT(yes)
#Yojson
AC_MSG_CHECKING(yojson library)
AS_IF([ocamlfind query yojson >/dev/null 2>&1],
[yojson=yes; AC_MSG_RESULT(yes)],[yojson=no; AC_MSG_WARN(Yojson required for lustresf. opam install yojson should solve the issue)],
)
# Salsa
AC_ARG_ENABLE(salsa, [AS_HELP_STRING([--disable-salsa],
[disable Salsa plugin. Enabled by default if available.])])
AC_MSG_CHECKING(salsa library)
AS_IF([ocamlfind query salsa >/dev/null 2>&1],
[salsa=yes; AC_MSG_RESULT(yes)],[salsa=no; AC_MSG_WARN(no)]
......@@ -110,6 +108,19 @@ AC_CHECK_LIB(mpfr, mpfr_add, [mpfr=yes],
[MPFR not found])
mpfr=no])
# lustresf
AC_ARG_ENABLE(lustresf, [AS_HELP_STRING([--disable-lustresf],
[disable lustresf compilation. Enabled by default.])])
AC_SUBST_FILE(lustresf)
AC_SUBST_FILE(lustresf_src)
lustresf=/dev/null
lustresf_src=/dev/null
AS_IF([test "x$enable_lustresf" != "xno" -a "x$yojson" = "xyes"], [
lustresf=Makefile-lustresf.in
lustresf_src=src/Makefile-lustresf.in
])
# Checking availability of path to regression tests
tests_path="../lustrec-tests/regression_tests"
......@@ -181,6 +192,17 @@ AC_MSG_NOTICE(******** Plugins ********)
else
AC_MSG_NOTICE([Salsa plugin disabled])
fi
if (test "x$yojson" = xyes -a "x$enable_lustresf" != "xno"); then
AC_MSG_NOTICE([lustresf available])
else
if (test "x$enable_lustresf" = "xno"); then
AC_MSG_NOTICE([lustresf not available (you explicitely disabled it)])
else
AC_MSG_NOTICE([lustresf not available])
fi
fi
AC_MSG_NOTICE(****** Regression Tests ******)
if (test "x$valid_test_path" = xfalse); then
AC_MSG_NOTICE(no valid tests path provided ($tests_path))
......
lustresf:
@echo Compiling binary lustresf
@$(OCAMLBUILD) tools/stateflow/sf_sem.native
@mkdir -p $(LOCAL_BINDIR)
@mv _build/tools/stateflow/sf_sem.native $(LOCAL_BINDIR)/lustresf
json-parser:
@echo Compiling binary json-parser-ex
@$(OCAMLBUILD) tools/stateflow/json-parser/main_parse_json_file.native
@mkdir -p $(LOCAL_BINDIR)
@mv _build/tools/stateflow/json-parser/main_parse_json_file.native $(LOCAL_BINDIR)/json-parser
tests: test-simple-var
test-simple-var:
@echo Compiling simple tests for JSON parser -- tests on variables
@$(OCAMLBUILD) tools/stateflow/json-parser/test_json_parser_variables.native
@echo Lauching simple tests for JSON parser -- tests on variables
./_build/tools/stateflow/json-parser/test_json_parser_variables.native
......@@ -24,25 +24,7 @@ lustret:
@mkdir -p $(LOCAL_BINDIR)
@mv _build/main_lustre_testgen.native $(LOCAL_BINDIR)/lustret
lustresf:
@echo Compiling binary lustresf
@$(OCAMLBUILD) tools/stateflow/sf_sem.native
@mkdir -p $(LOCAL_BINDIR)
@mv _build/tools/stateflow/sf_sem.native $(LOCAL_BINDIR)/lustresf
json-parser:
@echo Compiling binary json-parser-ex
@$(OCAMLBUILD) tools/stateflow/json-parser/main_parse_json_file.native
@mkdir -p $(LOCAL_BINDIR)
@mv _build/tools/stateflow/json-parser/main_parse_json_file.native $(LOCAL_BINDIR)/json-parser
tests: test-simple-var
test-simple-var:
@echo Compiling simple tests for JSON parser -- tests on variables
@$(OCAMLBUILD) tools/stateflow/json-parser/test_json_parser_variables.native
@echo Lauching simple tests for JSON parser -- tests on variables
./_build/tools/stateflow/json-parser/test_json_parser_variables.native
@lustresf_src@
doc:
@echo Generating doc
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment