Skip to content

Commit e34e86d

Browse files
committed
mk: Have the various flavors of 'dist' install all targets by default
Closes #15711
1 parent 04914fd commit e34e86d

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

mk/dist.mk

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ define DEF_OSX_PKG
156156
$$(eval $$(call DEF_PREPARE,osx-$(1)))
157157

158158
dist-prepare-osx-$(1): PREPARE_HOST=$(1)
159-
dist-prepare-osx-$(1): PREPARE_TARGETS=$(1)
159+
dist-prepare-osx-$(1): PREPARE_TARGETS=$(2)
160160
dist-prepare-osx-$(1): PREPARE_DEST_DIR=tmp/dist/pkgroot-$(1)
161161
dist-prepare-osx-$(1): PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
162162
dist-prepare-osx-$(1): PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
@@ -187,7 +187,11 @@ tmp/dist/pkgres-$(1)/%: $(S)src/etc/pkg/%
187187

188188
endef
189189

190-
$(foreach host,$(CFG_HOST),$(eval $(call DEF_OSX_PKG,$(host))))
190+
ifneq ($(CFG_ENABLE_DIST_HOST_ONLY),)
191+
$(foreach host,$(CFG_HOST),$(eval $(call DEF_OSX_PKG,$(host),$(host))))
192+
else
193+
$(foreach host,$(CFG_HOST),$(eval $(call DEF_OSX_PKG,$(host),$(TARGET))))
194+
endif
191195

192196
dist-osx: $(foreach host,$(CFG_HOST),dist/$(PKG_NAME)-$(host).pkg)
193197

@@ -210,7 +214,7 @@ define DEF_INSTALLER
210214
$$(eval $$(call DEF_PREPARE,dir-$(1)))
211215

212216
dist-install-dir-$(1): PREPARE_HOST=$(1)
213-
dist-install-dir-$(1): PREPARE_TARGETS=$(1)
217+
dist-install-dir-$(1): PREPARE_TARGETS=$(2)
214218
dist-install-dir-$(1): PREPARE_DEST_DIR=tmp/dist/$$(PKG_NAME)-$(1)
215219
dist-install-dir-$(1): PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
216220
dist-install-dir-$(1): PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
@@ -235,8 +239,13 @@ dist/$$(PKG_NAME)-$(1).tar.gz: dist-install-dir-$(1)
235239

236240
endef
237241

242+
ifneq ($(CFG_ENABLE_DIST_HOST_ONLY),)
238243
$(foreach host,$(CFG_HOST),\
239-
$(eval $(call DEF_INSTALLER,$(host))))
244+
$(eval $(call DEF_INSTALLER,$(host),$(host))))
245+
else
246+
$(foreach host,$(CFG_HOST),\
247+
$(eval $(call DEF_INSTALLER,$(host),$(CFG_TARGET))))
248+
endif
240249

241250
dist-install-dirs: $(foreach host,$(CFG_HOST),dist-install-dir-$(host))
242251

0 commit comments

Comments
 (0)