Skip to content

Commit fc2ba13

Browse files
committed
auto merge of #20456 : brson/rust/packaging2, r=alexcrichton
2 parents 9c3e608 + d30353c commit fc2ba13

File tree

9 files changed

+3
-495
lines changed

9 files changed

+3
-495
lines changed

mk/dist.mk

+2-106
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@
1717
# * dist - make all distribution artifacts
1818
# * distcheck - sanity check dist artifacts
1919
# * dist-tar-src - source tarballs
20-
# * dist-win - Windows exe installers
21-
# * dist-osx - OS X .pkg installers
2220
# * dist-tar-bins - Ad-hoc Unix binary installers
2321
# * dist-docs - Stage docs for upload
2422

@@ -106,108 +104,6 @@ distcheck-tar-src: dist-tar-src
106104
$(Q)rm -Rf tmp/distcheck/srccheck
107105

108106

109-
######################################################################
110-
# Windows .exe installer
111-
######################################################################
112-
113-
# FIXME Needs to support all hosts, but making rust.iss compatible looks like a chore
114-
115-
ifdef CFG_ISCC
116-
117-
PKG_EXE = dist/$(PKG_NAME)-$(CFG_BUILD).exe
118-
119-
%.iss: $(S)src/etc/pkg/%.iss
120-
cp $< $@
121-
122-
%.ico: $(S)src/etc/pkg/%.ico
123-
cp $< $@
124-
125-
$(PKG_EXE): rust.iss modpath.iss upgrade.iss LICENSE.txt rust-logo.ico \
126-
$(CSREQ3_T_$(CFG_BUILD)_H_$(CFG_BUILD)) \
127-
dist-prepare-win
128-
$(Q)rm -rf tmp/dist/win/gcc
129-
$(CFG_PYTHON) $(S)src/etc/make-win-dist.py tmp/dist/win/rust tmp/dist/win/gcc $(CFG_BUILD)
130-
@$(call E, ISCC: $@)
131-
$(Q)$(CFG_ISCC) $<
132-
133-
$(eval $(call DEF_PREPARE,win))
134-
135-
dist-prepare-win: PREPARE_HOST=$(CFG_BUILD)
136-
dist-prepare-win: PREPARE_TARGETS=$(CFG_BUILD)
137-
dist-prepare-win: PREPARE_DEST_DIR=tmp/dist/win/rust
138-
dist-prepare-win: PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
139-
dist-prepare-win: PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
140-
dist-prepare-win: PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
141-
dist-prepare-win: PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
142-
dist-prepare-win: PREPARE_CLEAN=true
143-
dist-prepare-win: prepare-base-win
144-
145-
endif
146-
147-
dist-win: $(PKG_EXE)
148-
149-
distcheck-win: dist-win
150-
151-
######################################################################
152-
# OS X .pkg installer
153-
######################################################################
154-
155-
ifeq ($(CFG_OSTYPE), apple-darwin)
156-
157-
define DEF_OSX_PKG
158-
159-
$$(eval $$(call DEF_PREPARE,osx-$(1)))
160-
161-
dist-prepare-osx-$(1): PREPARE_HOST=$(1)
162-
dist-prepare-osx-$(1): PREPARE_TARGETS=$(2)
163-
dist-prepare-osx-$(1): PREPARE_DEST_DIR=tmp/dist/pkgroot-$(1)
164-
dist-prepare-osx-$(1): PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
165-
dist-prepare-osx-$(1): PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
166-
dist-prepare-osx-$(1): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
167-
dist-prepare-osx-$(1): PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
168-
dist-prepare-osx-$(1): prepare-base-osx-$(1)
169-
170-
dist/$(PKG_NAME)-$(1).pkg: $(S)src/etc/pkg/Distribution.xml LICENSE.txt \
171-
dist-prepare-osx-$(1) \
172-
tmp/dist/pkgres-$(1)/LICENSE.txt \
173-
tmp/dist/pkgres-$(1)/welcome.rtf \
174-
tmp/dist/pkgres-$(1)/rust-logo.png
175-
@$$(call E, making OS X pkg)
176-
$(Q)pkgbuild --identifier org.rust-lang.rust --root tmp/dist/pkgroot-$(1) rust.pkg
177-
$(Q)productbuild --distribution $(S)src/etc/pkg/Distribution.xml \
178-
--resources tmp/dist/pkgres-$(1) dist/$(PKG_NAME)-$(1).pkg
179-
$(Q)rm -rf tmp rust.pkg
180-
181-
tmp/dist/pkgres-$(1)/LICENSE.txt: LICENSE.txt
182-
@$$(call E,pkg resource LICENSE.txt)
183-
$(Q)mkdir -p $$(@D)
184-
$(Q)cp $$< $$@
185-
186-
tmp/dist/pkgres-$(1)/%: $(S)src/etc/pkg/%
187-
@$$(call E,pkg resource $$*)
188-
$(Q)mkdir -p $$(@D)
189-
$(Q)cp -r $$< $$@
190-
191-
endef
192-
193-
ifneq ($(CFG_ENABLE_DIST_HOST_ONLY),)
194-
$(foreach host,$(CFG_HOST),$(eval $(call DEF_OSX_PKG,$(host),$(host))))
195-
else
196-
$(foreach host,$(CFG_HOST),$(eval $(call DEF_OSX_PKG,$(host),$(TARGET))))
197-
endif
198-
199-
dist-osx: $(foreach host,$(CFG_HOST),dist/$(PKG_NAME)-$(host).pkg)
200-
201-
else
202-
203-
dist-osx:
204-
205-
endif
206-
207-
# FIXME should do something
208-
distcheck-osx: dist-osx
209-
210-
211107
######################################################################
212108
# Unix binary installer tarballs
213109
######################################################################
@@ -377,9 +273,9 @@ MAYBE_DIST_DOCS=dist-docs
377273
MAYBE_DISTCHECK_DOCS=distcheck-docs
378274
endif
379275

380-
dist: $(MAYBE_DIST_TAR_SRC) dist-osx dist-win dist-tar-bins $(MAYBE_DIST_DOCS)
276+
dist: $(MAYBE_DIST_TAR_SRC) dist-tar-bins $(MAYBE_DIST_DOCS)
381277

382-
distcheck: $(MAYBE_DISTCHECK_TAR_SRC) distcheck-osx distcheck-win distcheck-tar-bins $(MAYBE_DISTCHECK_DOCS)
278+
distcheck: $(MAYBE_DISTCHECK_TAR_SRC) distcheck-tar-bins $(MAYBE_DISTCHECK_DOCS)
383279
$(Q)rm -Rf tmp/distcheck
384280
@echo
385281
@echo -----------------------------------------------

mk/main.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ CFG_PACKAGE_VERS=$(CFG_RELEASE_NUM)-dev
4545
endif
4646

4747
# The name of the package to use for creating tarballs, installers etc.
48-
CFG_PACKAGE_NAME=rust-$(CFG_PACKAGE_VERS)
48+
CFG_PACKAGE_NAME=rustc-$(CFG_PACKAGE_VERS)
4949

5050
# The version string plus commit information - this is what rustc reports
5151
CFG_VERSION = $(CFG_RELEASE)

src/etc/pkg/Distribution.xml

-26
This file was deleted.

src/etc/pkg/modpath.iss

-219
This file was deleted.

src/etc/pkg/rust-logo.ico

-4.19 KB
Binary file not shown.

src/etc/pkg/rust-logo.png

-5.71 KB
Binary file not shown.

0 commit comments

Comments
 (0)