@@ -58,6 +58,7 @@ PKG_FILES := \
58
58
rt \
59
59
rustllvm \
60
60
snapshots.txt \
61
+ rust-installer \
61
62
test) \
62
63
$(PKG_GITMODULES ) \
63
64
$(filter-out config.stamp, \
@@ -209,33 +210,40 @@ distcheck-osx: dist-osx
209
210
# Unix binary installer tarballs
210
211
# #####################################################################
211
212
213
+ NON_INSTALLED_PREFIXES =COPYRIGHT,LICENSE-APACHE,LICENSE-MIT,README.md,doc
214
+
212
215
define DEF_INSTALLER
213
216
214
217
$$(eval $$(call DEF_PREPARE,dir-$(1 ) ) )
215
218
216
219
dist-install-dir-$(1 ) : PREPARE_HOST=$(1 )
217
220
dist-install-dir-$(1 ) : PREPARE_TARGETS=$(2 )
218
- dist-install-dir-$(1 ) : PREPARE_DEST_DIR=tmp/dist/$$(PKG_NAME ) -$(1 )
221
+ dist-install-dir-$(1 ) : PREPARE_DEST_DIR=tmp/dist/$$(PKG_NAME ) -$(1 ) -image
219
222
dist-install-dir-$(1 ) : PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD )
220
223
dist-install-dir-$(1 ) : PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD )
221
224
dist-install-dir-$(1 ) : PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD )
222
225
dist-install-dir-$(1 ) : PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD )
223
226
dist-install-dir-$(1 ) : PREPARE_CLEAN=true
224
227
dist-install-dir-$(1 ) : prepare-base-dir-$(1 ) docs compiler-docs
225
- $$(Q ) (cd $$(PREPARE_DEST_DIR ) / && find . -type f | sed 's/^\.\///') \
226
- > tmp/dist/manifest-$(1 ) .in
227
- $$(Q ) mv tmp/dist/manifest-$(1 ) .in $$(PREPARE_DEST_DIR ) /$$(CFG_LIBDIR_RELATIVE ) /rustlib/manifest.in
228
- # Add remaining non-installed files
229
228
$$(Q )$$(PREPARE_MAN_CMD ) $$(S ) COPYRIGHT $$(PREPARE_DEST_DIR )
230
229
$$(Q )$$(PREPARE_MAN_CMD ) $$(S ) LICENSE-APACHE $$(PREPARE_DEST_DIR )
231
230
$$(Q )$$(PREPARE_MAN_CMD ) $$(S ) LICENSE-MIT $$(PREPARE_DEST_DIR )
232
231
$$(Q )$$(PREPARE_MAN_CMD ) $$(S ) README.md $$(PREPARE_DEST_DIR )
233
232
$$(Q ) cp -r doc $$(PREPARE_DEST_DIR )
234
- $$(Q )$$(PREPARE_BIN_CMD ) $$(S ) src/etc/install.sh $$(PREPARE_DEST_DIR )
235
233
236
234
dist/$$(PKG_NAME ) -$(1 ) .tar.gz: dist-install-dir-$(1 )
237
235
@$(call E, build: $$@ )
238
- $$(Q ) tar -czf dist/$$(PKG_NAME ) -$(1 ) .tar.gz -C tmp/dist $$(PKG_NAME ) -$(1 )
236
+ $$(Q )$$(S ) src/rust-installer/gen-installer.sh \
237
+ --product-name=Rust \
238
+ --verify-bin=rustc \
239
+ --rel-manifest-dir=rustlib \
240
+ --success-message=Rust-is-ready-to-roll. \
241
+ --image-dir=tmp/dist/$$(PKG_NAME ) -$(1 ) -image \
242
+ --work-dir=tmp/dist \
243
+ --output-dir=dist \
244
+ --non-installed-prefixes=$$(NON_INSTALLED_PREFIXES ) \
245
+ --package-name=$$(PKG_NAME ) -$(1 )
246
+ $$(Q ) rm -R tmp/dist/$$(PKG_NAME ) -$(1 ) -image
239
247
240
248
endef
241
249
0 commit comments