summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorVolker Grabsch <vog@notjusthosting.com>2012-03-19 11:19:52 (GMT)
committerVolker Grabsch <vog@notjusthosting.com>2012-03-19 11:19:52 (GMT)
commita889647b5883fdc406d1678352711954e8b593a7 (patch)
treefd0c2be05ce0ee134b9cff44ff0ca7304108f4da /Makefile
parentf33aaaa2a063e080bb05fa1f2f39ab606b9a4ed9 (diff)
downloadmxe-a889647b5883fdc406d1678352711954e8b593a7.zip
mxe-a889647b5883fdc406d1678352711954e8b593a7.tar.gz
mxe-a889647b5883fdc406d1678352711954e8b593a7.tar.bz2
Check for required versions of Autoconf and Automake
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile14
1 files changed, 14 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 2d9b5f1..01ce544 100644
--- a/Makefile
+++ b/Makefile
@@ -86,10 +86,24 @@ define CHECK_REQUIREMENT
fi
endef
+define CHECK_REQUIREMENT_VERSION
+ @if ! $(1) --version | head -1 | grep ' \($(2)\)$$' >/dev/null; then \
+ echo; \
+ echo 'Wrong version of requirement: $(1)'; \
+ echo; \
+ echo 'Please have a look at "doc/index.html" to ensure'; \
+ echo 'that your system meets all requirements.'; \
+ echo; \
+ exit 1; \
+ fi
+
+endef
check-requirements: $(PREFIX)/installed/check-requirements
$(PREFIX)/installed/check-requirements: $(MAKEFILE)
@echo '[check requirements]'
$(foreach REQUIREMENT,$(REQUIREMENTS),$(call CHECK_REQUIREMENT,$(REQUIREMENT)))
+ $(call CHECK_REQUIREMENT_VERSION,autoconf,2\.6[4-9]\|2\.[7-9][0-9])
+ $(call CHECK_REQUIREMENT_VERSION,automake,1\.[1-9][0-9]\.[0-9]\+)
@[ -d '$(PREFIX)/installed' ] || mkdir -p '$(PREFIX)/installed'
@touch '$@'