24
24
25
25
PKG_NAME := $(CFG_PACKAGE_NAME )
26
26
DOC_PKG_NAME := rust-docs-$(CFG_PACKAGE_VERS )
27
+ MINGW_PKG_NAME := rust-mingw-$(CFG_PACKAGE_VERS )
27
28
28
29
# License suitable for displaying in a popup
29
30
LICENSE.txt : $(S ) COPYRIGHT $(S ) LICENSE-APACHE $(S ) LICENSE-MIT
@@ -238,6 +239,12 @@ dist-install-dir-$(1): prepare-base-dir-$(1) docs compiler-docs
238
239
239
240
dist/$$(PKG_NAME ) -$(1 ) .tar.gz: dist-install-dir-$(1 )
240
241
@$(call E, build: $$@ )
242
+ # Copy essential gcc components into installer
243
+ ifdef CFG_WINDOWSY_$(1)
244
+ $$(Q)rm -Rf dist/win-rust-gcc-$(1)
245
+ $$(Q)$$(CFG_PYTHON) $$(S)src/etc/make-win-dist.py tmp/dist/$$(PKG_NAME)-$(1)-image dist/win-rust-gcc-$(1) $(1)
246
+ $$(Q)cp -r $$(S)src/etc/third-party tmp/dist/$$(PKG_NAME)-$(1)-image/share/doc/
247
+ endif
241
248
$$(Q )$$(S ) src/rust-installer/gen-installer.sh \
242
249
--product-name=Rust \
243
250
--verify-bin=rustc \
@@ -271,6 +278,25 @@ dist/$$(DOC_PKG_NAME)-$(1).tar.gz: dist-doc-install-dir-$(1)
271
278
--bulk-dirs=share/doc/rust/html
272
279
$$(Q ) rm -R tmp/dist/$$(DOC_PKG_NAME ) -$(1 ) -image
273
280
281
+ dist-mingw-install-dir-$(1 ) :
282
+ $$(Q ) mkdir -p tmp/dist/rust-mingw-tmp-$(1 ) -image
283
+ $$(Q ) rm -Rf tmp/dist/$$(MINGW_PKG_NAME ) -$(1 ) -image
284
+ $$(Q )$$(CFG_PYTHON ) $$(S ) src/etc/make-win-dist.py \
285
+ tmp/dist/rust-mingw-tmp-$(1 ) -image tmp/dist/$$(MINGW_PKG_NAME ) -$(1 ) -image $(1 )
286
+
287
+ dist/$$(MINGW_PKG_NAME ) -$(1 ) .tar.gz: dist-mingw-install-dir-$(1 )
288
+ @$(call E, build: $$@ )
289
+ $$(Q )$$(S ) src/rust-installer/gen-installer.sh \
290
+ --product-name=Rust-MinGW \
291
+ --rel-manifest-dir=rustlib \
292
+ --success-message=Rust-MinGW-is-installed. \
293
+ --image-dir=tmp/dist/$$(MINGW_PKG_NAME ) -$(1 ) -image \
294
+ --work-dir=tmp/dist \
295
+ --output-dir=dist \
296
+ --package-name=$$(MINGW_PKG_NAME ) -$(1 ) \
297
+ --component-name=rust-mingw \
298
+ --legacy-manifest-dirs=rustlib,cargo
299
+ $$(Q ) rm -R tmp/dist/$$(MINGW_PKG_NAME ) -$(1 ) -image
274
300
275
301
endef
276
302
@@ -284,11 +310,16 @@ endif
284
310
285
311
dist-install-dirs : $(foreach host,$(CFG_HOST ) ,dist-install-dir-$(host ) )
286
312
313
+ ifdef CFG_WINDOWSY_$(CFG_BUILD)
314
+ MAYBE_MINGW_TARBALLS =$(foreach host,$(CFG_HOST ) ,dist/$(MINGW_PKG_NAME ) -$(host ) .tar.gz)
315
+ endif
316
+
287
317
ifneq ($(CFG_DISABLE_DOCS ) ,)
288
- dist-tar-bins : $(foreach host,$(CFG_HOST ) ,dist/$(PKG_NAME ) -$(host ) .tar.gz)
318
+ dist-tar-bins : $(foreach host,$(CFG_HOST ) ,dist/$(PKG_NAME ) -$(host ) .tar.gz) $( MAYBE_MINGW_TARBALLS )
289
319
else
290
320
dist-tar-bins : $(foreach host,$(CFG_HOST ) ,dist/$(PKG_NAME ) -$(host ) .tar.gz) \
291
- $(foreach host,$(CFG_HOST),dist/$(DOC_PKG_NAME)-$(host).tar.gz)
321
+ $(foreach host,$(CFG_HOST),dist/$(DOC_PKG_NAME)-$(host).tar.gz) \
322
+ $(MAYBE_MINGW_TARBALLS)
292
323
endif
293
324
294
325
# Just try to run the compiler for the build host
0 commit comments