Makefile: add BUILD variable and add to target loop and PATH

This commit is contained in:
Tony Theodore 2013-08-25 19:06:40 +10:00
parent 0871d6048a
commit 08647cc045
1 changed files with 5 additions and 1 deletions

View File

@ -37,7 +37,8 @@ TMP_DIR = $(PWD)/tmp-$(1)
MAKEFILE := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
TOP_DIR := $(patsubst %/,%,$(dir $(MAKEFILE)))
PKGS := $(shell $(SED) -n 's/^.* class="package">\([^<]*\)<.*$$/\1/p' '$(TOP_DIR)/index.html')
PATH := $(PREFIX)/bin:$(PATH)
BUILD = $(shell '$(TOP_DIR)/tools/config.guess')
PATH := $(PREFIX)/$(BUILD)/bin:$(PREFIX)/bin:$(PATH)
# use a minimal whitelist of safe environment variables
ENV_WHITELIST := PATH LANG MXE%
@ -146,6 +147,9 @@ include $(patsubst %,$(TOP_DIR)/src/%.mk,$(PKGS))
.PHONY: download
download: $(addprefix download-,$(PKGS))
# all cross targets depend on build requirements
MXE_TARGETS += $(BUILD)
define TARGET_DEPS
$(1)_DEPS := $(shell echo '$(MXE_TARGETS)' | \
$(SED) -n 's,.*$(1)\(.*\),\1,p' | \