diff options
| author | Jean-Sébastien Pédron <jean-sebastien.pedron@dumbbell.fr> | 2015-08-13 16:46:36 +0200 |
|---|---|---|
| committer | Jean-Sébastien Pédron <jean-sebastien.pedron@dumbbell.fr> | 2015-08-13 16:46:36 +0200 |
| commit | f20a1e271e6e7fbaefe442ebf3c62e2058202244 (patch) | |
| tree | c89feaa522bfa9f2e6a2fa6d70f84c736615bd09 /Makefile | |
| parent | 72853aaf40e30dd586c15cd618f5c295b12d7938 (diff) | |
| parent | 0fe7916899076f90f6ba3e8e73d077b3bd5b6d12 (diff) | |
| download | rabbitmq-server-git-f20a1e271e6e7fbaefe442ebf3c62e2058202244.tar.gz | |
Merge branch 'stable'
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -40,9 +40,25 @@ ERLC_OPTS=-I $(INCLUDE_DIR) -Wall +warn_export_vars -v +debug_info $(call boolea # Our type specs rely on dict:dict/0 etc, which are only available in # 17.0 upwards. +define compare_version +$(shell awk 'BEGIN { + split("$(1)", v1, "\."); + version1 = v1[1] * 1000000 + v1[2] * 10000 + v1[3] * 100 + v1[4]; + + split("$(2)", v2, "\."); + version2 = v2[1] * 1000000 + v2[2] * 10000 + v2[3] * 100 + v2[4]; + + if (version1 $(3) version2) { + print "true"; + } else { + print "false"; + } +}') +endef + ERTS_VER = $(shell erl -version 2>&1 | sed -E 's/.* version //') USE_SPECS_MIN_ERTS_VER = 5.11 -ifeq ($(shell printf "$(ERTS_VER)\n$(USE_SPECS_MIN_ERTS_VER)\n" | sort -V | head -n 1),$(USE_SPECS_MIN_ERTS_VER)) +ifeq ($(call compare_version,$(ERTS_VER),$(USE_SPECS_MIN_ERTS_VER),>=),true) ERLC_OPTS += -Duse_specs endif |
