Commit 362083a7 authored by Virgile Prevosto's avatar Virgile Prevosto
Browse files

Merge branch 'fix/andre/ocp-indent-detect-dune' into 'master'

[Makefile] add warning about weird ocp-indent + dune 2 bug

See merge request frama-c/frama-c!2802
parents 172b910d b4098739
...@@ -1790,11 +1790,14 @@ lint: $(LINT_TARGET) ...@@ -1790,11 +1790,14 @@ lint: $(LINT_TARGET)
check-ocp-indent-version: check-ocp-indent-version:
if command -v ocp-indent >/dev/null; then \ if command -v ocp-indent >/dev/null; then \
$(eval ocp_version_major := $(shell ocp-indent --version | $(SED) -E "s/^([0-9]+)\.[0-9]+\..*/\1/")) \ if [ -z "$(shell ocp-indent --version)" ]; then echo "warning: ocp-indent returned an empty string, assuming it is the correct version"; \
$(eval ocp_version_minor := $(shell ocp-indent --version | $(SED) -E "s/^[0-9]+\.([0-9]+)\..*/\1/")) \ else \
if [ "$(ocp_version_major)" -lt 1 -o "$(ocp_version_minor)" -lt 7 ]; then \ $(eval ocp_version_major := $(shell ocp-indent --version | $(SED) -E "s/^([0-9]+)\.[0-9]+\..*/\1/")) \
echo "error: ocp-indent >=1.7.0 required for linting (got $(ocp_version_major).$(ocp_version_minor))"; \ $(eval ocp_version_minor := $(shell ocp-indent --version | $(SED) -E "s/^[0-9]+\.([0-9]+)\..*/\1/")) \
if [ "$(ocp_version_major)" -lt 1 -o "$(ocp_version_minor)" -lt 7 ]; then \
echo "error: ocp-indent 1.7.0 required for linting (got $(ocp_version_major).$(ocp_version_minor))"; \
exit 1; \ exit 1; \
fi; \
fi; \ fi; \
else \ else \
exit 1; \ exit 1; \
......
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