Skip to content
Snippets Groups Projects
Commit 1f2423a6 authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

[configure] use newly available configure_pkg macro in MdR's configure.ac

parent b2071cb8
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ top/
.depend
.merlin
*~
/Makefile
/Markdown_report.mli
/tests/ptests_config
/tests/*/result
......
......@@ -10,6 +10,7 @@ PLUGIN_CMO:=\
PLUGIN_REQUIRES:=ppx_deriving ppx_deriving_yojson yojson
PLUGIN_DISTRIB_EXTERNAL:=share/acsl.xml
PLUGIN_TESTS_DIRS:= eva
PLUGIN_ENABLE:=@ENABLE_MDR@
include $(FRAMAC_SHARE)/Makefile.dynamic
......
m4_define([plugin_file],Makefile)
m4_define([plugin_file],Makefile.in)
m4_define([FRAMAC_SHARE_ENV],
[m4_normalize(m4_esyscmd([echo $FRAMAC_SHARE]))])
......@@ -13,27 +13,12 @@ m4_ifndef([FRAMAC_M4_MACROS],
check_plugin(mdr,PLUGIN_RELATIVE_PATH(plugin_file),[Mardown/SARIF report plug-in],yes)
AC_MSG_CHECKING(for ppx_deriving)
if $OCAMLFIND query ppx_deriving -qo -qe; then
HAS_PPX_DERIVING=yes;
AC_MSG_RESULT(yes)
AC_MSG_CHECKING(for ppx_deriving_yojson)
if $OCAMLFIND query ppx_deriving_yojson -qo -qe; then
HAS_PPX_DERIVING_YOJSON=yes;
else
HAS_PPX_DERIVING_YOJSON=no;
fi
AC_MSG_RESULT($HAS_PPX_DERIVING_YOJSON);
else
HAS_PPX_DERIVING=no;
HAS_PPX_DERIVING_YOJSON=no;
AC_MSG_RESULT(no)
fi
if test "$HAS_PPX_DERIVING_YOJSON" != "yes"; then
plugin_disable(mdr, [ppx_deriving_yojson not available]);
fi
plugin_require_pkg(mdr,ppx_deriving)
plugin_require_pkg(mdr,ppx_deriving_yojson)
configure_pkg(ppx_deriving,[package ppx_deriving not found])
configure_pkg(ppx_deriving_yojson,[package ppx_deriving_yojson not found])
check_plugin_dependencies
write_plugin_config()
write_plugin_config(Makefile)
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