@@ -58,6 +58,7 @@ PKG_FILES := \
5858 rt \
5959 rustllvm \
6060 snapshots.txt \
61+ rust-installer \
6162 test) \
6263 $(PKG_GITMODULES ) \
6364 $(filter-out config.stamp, \
@@ -209,33 +210,40 @@ distcheck-osx: dist-osx
209210# Unix binary installer tarballs
210211# #####################################################################
211212
213+ NON_INSTALLED_PREFIXES =COPYRIGHT,LICENSE-APACHE,LICENSE-MIT,README.md,doc
214+
212215define DEF_INSTALLER
213216
214217$$(eval $$(call DEF_PREPARE,dir-$(1 ) ) )
215218
216219dist-install-dir-$(1 ) : PREPARE_HOST=$(1 )
217220dist-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
219222dist-install-dir-$(1 ) : PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD )
220223dist-install-dir-$(1 ) : PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD )
221224dist-install-dir-$(1 ) : PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD )
222225dist-install-dir-$(1 ) : PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD )
223226dist-install-dir-$(1 ) : PREPARE_CLEAN=true
224227dist-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
229228 $$(Q )$$(PREPARE_MAN_CMD ) $$(S ) COPYRIGHT $$(PREPARE_DEST_DIR )
230229 $$(Q )$$(PREPARE_MAN_CMD ) $$(S ) LICENSE-APACHE $$(PREPARE_DEST_DIR )
231230 $$(Q )$$(PREPARE_MAN_CMD ) $$(S ) LICENSE-MIT $$(PREPARE_DEST_DIR )
232231 $$(Q )$$(PREPARE_MAN_CMD ) $$(S ) README.md $$(PREPARE_DEST_DIR )
233232 $$(Q ) cp -r doc $$(PREPARE_DEST_DIR )
234- $$(Q )$$(PREPARE_BIN_CMD ) $$(S ) src/etc/install.sh $$(PREPARE_DEST_DIR )
235233
236234dist/$$(PKG_NAME ) -$(1 ) .tar.gz: dist-install-dir-$(1 )
237235 @$(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
239247
240248endef
241249
0 commit comments