diff --git a/src/plugins/markdown-report/.gitignore b/src/plugins/markdown-report/.gitignore index fec8b03f6b4f049c87b39f34b6aa8380886f6830..6c2faaa71d31861e38605eb6bebc51dec9a0e3da 100644 --- a/src/plugins/markdown-report/.gitignore +++ b/src/plugins/markdown-report/.gitignore @@ -7,6 +7,7 @@ top/ .depend .merlin *~ +/Makefile /Markdown_report.mli /tests/ptests_config /tests/*/result diff --git a/src/plugins/markdown-report/Makefile b/src/plugins/markdown-report/Makefile.in similarity index 97% rename from src/plugins/markdown-report/Makefile rename to src/plugins/markdown-report/Makefile.in index fae71e12424ed195bfac838cdf66b269a06d3392..a12c24717659b288d576805fb730a7319fd89bbb 100644 --- a/src/plugins/markdown-report/Makefile +++ b/src/plugins/markdown-report/Makefile.in @@ -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 diff --git a/src/plugins/markdown-report/configure.ac b/src/plugins/markdown-report/configure.ac index 41588070016b0340560fa6cc3b77a918540def0d..e58d4f1b60c623f240184747f20699d3e3f0d972 100644 --- a/src/plugins/markdown-report/configure.ac +++ b/src/plugins/markdown-report/configure.ac @@ -1,4 +1,4 @@ -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)