Makefile and build-pkg: use {pkg}~{target} directly

Required for the case where a cross package is independent of it's
native package (e.g. libiconv) and the native pkg may not have been
built in the dep chain. Calling:
```
make pkg MXE_TARGETS=...
```
will then cause `make` to build the native pkg as well. (MXE_TARGETS
is still required otherwise it will be picked up from settings.mk)
This commit is contained in:
Tony Theodore 2017-11-27 15:52:21 +11:00
parent 5fe1c5043b
commit 9d39a40a2b
2 changed files with 4 additions and 4 deletions

View File

@ -663,8 +663,8 @@ download-$(1): download-$(3)~$(1) download-only-$(1)
download-$(3)~$(1): download-only-$(1) \
$(addprefix download-,$(PKG_ALL_DEPS))
.PHONY: $(1)
$(1): $(PREFIX)/$(3)/installed/$(1)
.PHONY: $(1) $(1)~$(3)
$(1) $(1)~$(3): $(PREFIX)/$(3)/installed/$(1)
$(PREFIX)/$(3)/installed/$(1): $(PKG_MAKEFILES) \
$($(PKG)_PATCHES) \
$(PKG_TESTFILES) \

View File

@ -688,8 +688,8 @@ end
local function buildItem(item, item2deps, file2item, item2index, pass, prev_files)
prepareTree(pass, item, item2deps, prev_files, item2index)
local target, pkg = parseItem(item)
local cmd = '%s %s MXE_TARGETS=%s --jobs=1'
os.execute(cmd:format(tool 'make', pkg, target))
local cmd = '%s %s~%s MXE_TARGETS=%s --jobs=1'
os.execute(cmd:format(tool 'make', pkg, target, target))
gitAdd()
local new_files, changed_files = gitStatus(item, item2deps, file2item)
if #new_files + #changed_files > 0 then