Commit c4a50e56 authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

[Makefile] compile even if tests/ is absent

parent c5dc78c2
......@@ -1413,8 +1413,13 @@ acsl_tests: byte
$(PRINT_EXEC) acsl_tests
find doc/speclang -name \*.c -exec ./bin/toplevel.byte$(EXE) {} \; > /dev/null
LONELY_TESTS_ML_FILES:=\
$(sort $(shell find $(TEST_DIRS_AS_PLUGIN:%=tests/%) -not -path '*/\.*' -name '*.ml'))
LONELY_TESTS_DIR:=$(wildcard $(TEST_DIRS_AS_PLUGIN:%=tests/%))
ifeq ($(strip $(LONELY_TESTS_DIR)),)
LONELY_TESTS_ML_FILES:=
else
LONELY_TESTS_ML_FILES:=\
$(sort $(shell find $(TEST_DIRS_AS_PLUGIN:%=tests/%) -not -path '*/\.*' -name '*.ml'))
endif
$(foreach file,$(LONELY_TESTS_ML_FILES),\
$(eval $(file:%.ml=%.cmo): BFLAGS+=-I $(dir $(file))))
$(foreach file,$(LONELY_TESTS_ML_FILES),\
......
......@@ -899,7 +899,7 @@ $(@PLUGIN_NAME@_DIR)/@PLUGIN_NAME@_DEP_REDO $(@PLUGIN_NAME@_DIR)/.depend: \
$(@PLUGIN_NAME@_ML_SRC) \
$(@PLUGIN_NAME@_MLI) \
$(@PLUGIN_NAME@_GUI_MLI)) \
$(foreach d,$(@PLUGIN_NAME@_TESTS_LIB_DIR),\
$(foreach d,$(wildcard $(@PLUGIN_NAME@_TESTS_LIB_DIR)),\
-I $d $d*.ml $d*.mli) \
> $(@PLUGIN_NAME@_DIR)/.depend
$(CHMOD_RO) $(@PLUGIN_NAME@_DIR)/.depend
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment