Mercurial > mxe-octave
changeset 1398:c6aaf7d9c746
check most of the requirements in advance
author | Volker Grabsch <vog@notjusthosting.com> |
---|---|
date | Thu, 18 Nov 2010 12:00:26 +0100 |
parents | b33871ee26a3 |
children | 6b28a4f27b8c 49cea12fd19f |
files | Makefile |
diffstat | 1 files changed, 24 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile Thu Nov 18 04:00:31 2010 +0100 +++ b/Makefile Thu Nov 18 12:00:26 2010 +0100 @@ -21,6 +21,11 @@ SED := $(shell gsed --help >/dev/null 2>&1 && echo g)sed VERSION := $(shell $(SED) -n 's,^.*<span id="latest-version">\([^<]*\)</span>.*$$,\1,p' '$(TOP_DIR)/doc/index.html') +REQUIREMENTS := autoconf automake bash bison bzip2 cmake flex \ + gcc $(INSTALL) intltoolize $(LIBTOOLIZE) $(MAKE) \ + openssl $(PATCH) $(PERL) pkg-config scons $(SED) \ + unzip wget xz yasm + # unexport any environment variables that might cause trouble unexport AR CC CFLAGS C_INCLUDE_PATH CPATH CPLUS_INCLUDE_PATH CPP unexport CPPFLAGS CROSS CXX CXXCPP CXXFLAGS EXEEXT EXTRA_CFLAGS @@ -68,6 +73,23 @@ .PHONY: all all: $(PKGS) +.PHONY: check-requirements +define CHECK_REQUIREMENT + @if ! $(1) --help &>/dev/null; then \ + echo; \ + echo 'Missing 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: + @echo '[check requirements]' + $(foreach REQUIREMENT,$(REQUIREMENTS),$(call CHECK_REQUIREMENT,$(REQUIREMENT))) + .PHONY: download download: $(addprefix download-,$(PKGS)) @@ -81,7 +103,8 @@ .PHONY: $(1) $(1): $(PREFIX)/installed/$(1) -$(PREFIX)/installed/$(1): $(TOP_DIR)/src/$(1).mk \ +$(PREFIX)/installed/$(1): check-requirements \ + $(TOP_DIR)/src/$(1).mk \ $(wildcard $(TOP_DIR)/src/$(1)-*.patch) \ $(wildcard $(TOP_DIR)/src/$(1)-test*) \ $(addprefix $(PREFIX)/installed/,$($(1)_DEPS))