Skip to content

Commit cfa1581

Browse files
committed
---
yaml --- r: 106303 b: refs/heads/auto c: 85ff90c h: refs/heads/master i: 106301: 1e8b062 106299: d419228 106295: ed9a678 106287: df8dbb7 106271: fc6d887 106239: 57dd653 v: v3
1 parent ac21401 commit cfa1581

File tree

162 files changed

+3173
-4782
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

162 files changed

+3173
-4782
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: 2c71cdf64bf39cb4d2bbc14c279eeda60e46d140
16+
refs/heads/auto: 85ff90c86c98b9fad41f792a8fabb145db320a50
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/mk/clean.mk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,7 @@ clean-misc:
4343
$(Q)rm -f $(RUSTLLVM_LIB_OBJS) $(RUSTLLVM_OBJS_OBJS) $(RUSTLLVM_DEF)
4444
$(Q)rm -Rf $(GENERATED)
4545
$(Q)rm -Rf tmp/*
46-
$(Q)rm -Rf rust-stage0-*.tar.bz2 $(PKG_NAME)-*.tar.gz $(PKG_NAME)-*.exe
47-
$(Q)rm -Rf dist/*
46+
$(Q)rm -Rf rust-stage0-*.tar.bz2 $(PKG_NAME)-*.tar.gz $(PKG_NAME)-*.exe dist
4847
$(Q)rm -Rf doc
4948

5049
define CLEAN_GENERIC

branches/auto/mk/dist.mk

Lines changed: 91 additions & 181 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,23 @@
1-
# Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2-
# file at the top-level directory of this distribution and at
3-
# http://rust-lang.org/COPYRIGHT.
4-
#
5-
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6-
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7-
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8-
# option. This file may not be copied, modified, or distributed
9-
# except according to those terms.
10-
111
######################################################################
122
# Distribution
133
######################################################################
144

15-
# Primary targets:
16-
#
17-
# * dist - make all distribution artifacts
18-
# * distcheck - sanity check dist artifacts
19-
# * dist-tar-src - source tarballs
20-
# * dist-win - Windows exe installers
21-
# * dist-osx - OS X .pkg installers
22-
# * dist-tar-bins - Ad-hoc Unix binary installers
23-
# * dist-docs - Stage docs for upload
24-
25-
PKG_NAME = $(CFG_PACKAGE_NAME)
5+
PKG_NAME := rust
6+
PKG_DIR = $(PKG_NAME)-$(CFG_RELEASE)
7+
PKG_TAR = dist/$(PKG_DIR).tar.gz
268

27-
# License suitable for displaying in a popup
28-
LICENSE.txt: $(S)COPYRIGHT $(S)LICENSE-APACHE $(S)LICENSE-MIT
29-
cat $^ > $@
30-
31-
32-
######################################################################
33-
# Source tarball
34-
######################################################################
9+
ifdef CFG_ISCC
10+
PKG_ISS = $(wildcard $(S)src/etc/pkg/*.iss)
11+
PKG_ICO = $(S)src/etc/pkg/rust-logo.ico
12+
PKG_EXE = dist/$(PKG_DIR)-install.exe
13+
endif
3514

36-
PKG_TAR = dist/$(PKG_NAME).tar.gz
15+
ifeq ($(CFG_OSTYPE), apple-darwin)
16+
PKG_OSX = dist/$(PKG_DIR).pkg
17+
endif
3718

3819
PKG_GITMODULES := $(S)src/libuv $(S)src/llvm $(S)src/gyp $(S)src/compiler-rt
20+
3921
PKG_FILES := \
4022
$(S)COPYRIGHT \
4123
$(S)LICENSE-APACHE \
@@ -58,73 +40,28 @@ PKG_FILES := \
5840
snapshots.txt \
5941
test) \
6042
$(PKG_GITMODULES) \
61-
$(filter-out config.stamp, \
62-
$(MKFILES_FOR_TARBALL))
43+
$(filter-out Makefile config.stamp config.mk, \
44+
$(MKFILE_DEPS))
6345

6446
UNROOTED_PKG_FILES := $(patsubst $(S)%,./%,$(PKG_FILES))
6547

66-
$(PKG_TAR): $(PKG_FILES)
67-
@$(call E, making dist dir)
68-
$(Q)rm -Rf tmp/dist/$(PKG_NAME)
69-
$(Q)mkdir -p tmp/dist/$(PKG_NAME)
70-
$(Q)tar \
71-
-C $(S) \
72-
--exclude-vcs \
73-
--exclude=*~ \
74-
--exclude=*/llvm/test/*/*.ll \
75-
--exclude=*/llvm/test/*/*.td \
76-
--exclude=*/llvm/test/*/*.s \
77-
--exclude=*/llvm/test/*/*/*.ll \
78-
--exclude=*/llvm/test/*/*/*.td \
79-
--exclude=*/llvm/test/*/*/*.s \
80-
-c $(UNROOTED_PKG_FILES) | tar -x -C tmp/dist/$(PKG_NAME)
81-
$(Q)tar -czf $(PKG_TAR) -C tmp/dist $(PKG_NAME)
82-
$(Q)rm -Rf tmp/dist/$(PKG_NAME)
83-
84-
dist-tar-src: $(PKG_TAR)
85-
86-
distcheck-tar-src: dist-tar-src
87-
$(Q)rm -Rf tmp/distcheck/$(PKG_NAME)
88-
$(Q)rm -Rf tmp/distcheck/srccheck
89-
$(Q)mkdir -p tmp/distcheck
90-
@$(call E, unpacking $(PKG_TAR) in tmp/distcheck/$(PKG_NAME))
91-
$(Q)cd tmp/distcheck && tar -xzf ../../$(PKG_TAR)
92-
@$(call E, configuring in tmp/distcheck/srccheck)
93-
$(Q)mkdir -p tmp/distcheck/srccheck
94-
$(Q)cd tmp/distcheck/srccheck && ../$(PKG_NAME)/configure
95-
@$(call E, making 'check' in tmp/distcheck/srccheck)
96-
$(Q)+make -C tmp/distcheck/srccheck check
97-
@$(call E, making 'clean' in tmp/distcheck/srccheck)
98-
$(Q)+make -C tmp/distcheck/srccheck clean
99-
$(Q)rm -Rf tmp/distcheck/$(PKG_NAME)
100-
$(Q)rm -Rf tmp/distcheck/srccheck
101-
102-
103-
######################################################################
104-
# Windows .exe installer
105-
######################################################################
106-
107-
# FIXME Needs to support all hosts, but making rust.iss compatible looks like a chore
48+
LICENSE.txt: $(S)COPYRIGHT $(S)LICENSE-APACHE $(S)LICENSE-MIT
49+
cat $^ > $@
10850

10951
ifdef CFG_ISCC
110-
111-
PKG_EXE = dist/$(PKG_NAME)-install.exe
112-
11352
%.iss: $(S)src/etc/pkg/%.iss
11453
cp $< $@
11554

11655
%.ico: $(S)src/etc/pkg/%.ico
11756
cp $< $@
11857

11958
$(PKG_EXE): rust.iss modpath.iss LICENSE.txt rust-logo.ico \
120-
$(CSREQ3_T_$(CFG_BUILD)_H_$(CFG_BUILD)) \
59+
$(PKG_FILES) $(CSREQ3_T_$(CFG_BUILD)_H_$(CFG_BUILD)) \
12160
dist-prepare-win
12261
$(CFG_PYTHON) $(S)src/etc/copy-runtime-deps.py tmp/dist/win/bin
12362
@$(call E, ISCC: $@)
12463
$(Q)"$(CFG_ISCC)" $<
12564

126-
$(eval $(call DEF_PREPARE,win))
127-
12865
dist-prepare-win: PREPARE_HOST=$(CFG_BUILD)
12966
dist-prepare-win: PREPARE_TARGETS=$(CFG_BUILD)
13067
dist-prepare-win: PREPARE_DEST_DIR=tmp/dist/win
@@ -133,72 +70,105 @@ dist-prepare-win: PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
13370
dist-prepare-win: PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
13471
dist-prepare-win: PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
13572
dist-prepare-win: PREPARE_CLEAN=true
136-
dist-prepare-win: prepare-base-win
73+
dist-prepare-win: prepare-base
13774

13875
endif
13976

140-
dist-win: $(PKG_EXE)
141-
142-
distcheck-win: dist-win
77+
$(PKG_TAR): $(PKG_FILES)
78+
@$(call E, making dist dir)
79+
$(Q)rm -Rf tmp/dist/$(PKG_DIR)
80+
$(Q)mkdir -p tmp/dist/$(PKG_DIR)
81+
$(Q)tar \
82+
-C $(S) \
83+
--exclude-vcs \
84+
--exclude=*~ \
85+
--exclude=*/llvm/test/*/*.ll \
86+
--exclude=*/llvm/test/*/*.td \
87+
--exclude=*/llvm/test/*/*.s \
88+
--exclude=*/llvm/test/*/*/*.ll \
89+
--exclude=*/llvm/test/*/*/*.td \
90+
--exclude=*/llvm/test/*/*/*.s \
91+
-c $(UNROOTED_PKG_FILES) | tar -x -C tmp/dist/$(PKG_DIR)
92+
$(Q)tar -czf $(PKG_TAR) -C tmp/dist $(PKG_DIR)
93+
$(Q)rm -Rf tmp/dist/$(PKG_DIR)
14394

144-
######################################################################
145-
# OS X .pkg installer
146-
######################################################################
95+
.PHONY: dist distcheck
14796

148-
ifeq ($(CFG_OSTYPE), apple-darwin)
97+
ifdef CFG_WINDOWSY_$(CFG_BUILD)
14998

150-
define DEF_OSX_PKG
99+
dist: $(PKG_EXE)
151100

152-
$$(eval $$(call DEF_PREPARE,osx-$(1)))
101+
distcheck: dist
102+
@echo
103+
@echo -----------------------------------------------
104+
@echo $(PKG_EXE) ready for distribution
105+
@echo -----------------------------------------------
153106

154-
dist-prepare-osx-$(1): PREPARE_HOST=$(1)
155-
dist-prepare-osx-$(1): PREPARE_TARGETS=$(1)
156-
dist-prepare-osx-$(1): PREPARE_DEST_DIR=tmp/dist/pkgroot-$(1)
157-
dist-prepare-osx-$(1): PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
158-
dist-prepare-osx-$(1): PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
159-
dist-prepare-osx-$(1): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
160-
dist-prepare-osx-$(1): PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
161-
dist-prepare-osx-$(1): prepare-base-osx-$(1)
107+
else
162108

163-
dist/$(PKG_NAME)-$(1).pkg: $(S)src/etc/pkg/Distribution.xml LICENSE.txt dist-prepare-osx-$(1)
164-
@$$(call E, making OS X pkg)
165-
$(Q)pkgbuild --identifier org.rust-lang.rust --root tmp/dist/pkgroot-$(1) rust.pkg
166-
$(Q)productbuild --distribution $(S)src/etc/pkg/Distribution.xml --resources . dist/$(PKG_NAME)-$(1).pkg
167-
$(Q)rm -rf tmp rust.pkg
109+
dist: $(PKG_TAR) $(PKG_OSX)
110+
111+
distcheck: $(PKG_TAR)
112+
$(Q)rm -Rf dist
113+
$(Q)mkdir -p dist
114+
@$(call E, unpacking $(PKG_TAR) in dist/$(PKG_DIR))
115+
$(Q)cd dist && tar -xzf ../$(PKG_TAR)
116+
@$(call E, configuring in dist/$(PKG_DIR)-build)
117+
$(Q)mkdir -p dist/$(PKG_DIR)-build
118+
$(Q)cd dist/$(PKG_DIR)-build && ../$(PKG_DIR)/configure
119+
@$(call E, making 'check' in dist/$(PKG_DIR)-build)
120+
$(Q)+make -C dist/$(PKG_DIR)-build check
121+
@$(call E, making 'clean' in dist/$(PKG_DIR)-build)
122+
$(Q)+make -C dist/$(PKG_DIR)-build clean
123+
$(Q)rm -Rf dist
124+
@echo
125+
@echo -----------------------------------------------
126+
@echo $(PKG_TAR) ready for distribution
127+
@echo -----------------------------------------------
168128

169-
endef
129+
endif
170130

171-
$(foreach host,$(CFG_HOST),$(eval $(call DEF_OSX_PKG,$(host))))
131+
ifeq ($(CFG_OSTYPE), apple-darwin)
172132

173-
dist-osx: $(foreach host,$(CFG_HOST),dist/$(PKG_NAME)-$(host).pkg)
133+
dist-prepare-osx: PREPARE_HOST=$(CFG_BUILD)
134+
dist-prepare-osx: PREPARE_TARGETS=$(CFG_BUILD)
135+
dist-prepare-osx: PREPARE_DEST_DIR=tmp/dist/pkgroot
136+
dist-prepare-osx: PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
137+
dist-prepare-osx: PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
138+
dist-prepare-osx: PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
139+
dist-prepare-osx: PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
140+
dist-prepare-osx: prepare-base
141+
142+
$(PKG_OSX): Distribution.xml LICENSE.txt dist-prepare-osx
143+
@$(call E, making OS X pkg)
144+
$(Q)pkgbuild --identifier org.rust-lang.rust --root tmp/dist/pkgroot rust.pkg
145+
$(Q)productbuild --distribution Distribution.xml --resources . $(PKG_OSX)
146+
$(Q)rm -rf tmp rust.pkg
174147

175-
else
148+
dist-osx: $(PKG_OSX)
176149

177-
dist-osx:
150+
distcheck-osx: $(PKG_OSX)
151+
@echo
152+
@echo -----------------------------------------------
153+
@echo $(PKG_OSX) ready for distribution
154+
@echo -----------------------------------------------
178155

179156
endif
180157

181-
# FIXME should do something
182-
distcheck-osx: dist-osx
158+
dist-install-dir: $(foreach host,$(CFG_HOST),dist-install-dir-$(host))
183159

184-
185-
######################################################################
186-
# Unix binary installer tarballs
187-
######################################################################
160+
dist-tar-bins: $(foreach host,$(CFG_HOST),dist/$(PKG_DIR)-$(host).tar.gz)
188161

189162
define DEF_INSTALLER
190-
191-
$$(eval $$(call DEF_PREPARE,dir-$(1)))
192-
193163
dist-install-dir-$(1): PREPARE_HOST=$(1)
194164
dist-install-dir-$(1): PREPARE_TARGETS=$(1)
195-
dist-install-dir-$(1): PREPARE_DEST_DIR=tmp/dist/$$(PKG_NAME)-$(1)
165+
dist-install-dir-$(1): PREPARE_DEST_DIR=tmp/dist/$$(PKG_DIR)-$(1)
196166
dist-install-dir-$(1): PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
197167
dist-install-dir-$(1): PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
198168
dist-install-dir-$(1): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
199169
dist-install-dir-$(1): PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
200170
dist-install-dir-$(1): PREPARE_CLEAN=true
201-
dist-install-dir-$(1): prepare-base-dir-$(1)
171+
dist-install-dir-$(1): prepare-base
202172
$$(Q)(cd $$(PREPARE_DEST_DIR)/ && find -type f) \
203173
> $$(PREPARE_DEST_DIR)/$$(CFG_LIBDIR_RELATIVE)/$$(CFG_RUSTLIBDIR)/manifest
204174
$$(Q)$$(PREPARE_MAN_CMD) $$(S)COPYRIGHT $$(PREPARE_DEST_DIR)
@@ -207,71 +177,11 @@ dist-install-dir-$(1): prepare-base-dir-$(1)
207177
$$(Q)$$(PREPARE_MAN_CMD) $$(S)README.md $$(PREPARE_DEST_DIR)
208178
$$(Q)$$(PREPARE_BIN_CMD) $$(S)src/etc/install.sh $$(PREPARE_DEST_DIR)
209179

210-
dist/$$(PKG_NAME)-$(1).tar.gz: dist-install-dir-$(1)
180+
dist/$$(PKG_DIR)-$(1).tar.gz: dist-install-dir-$(1)
211181
@$(call E, build: $$@)
212-
$$(Q)tar -czf dist/$$(PKG_NAME)-$(1).tar.gz -C tmp/dist $$(PKG_NAME)-$(1)
182+
$$(Q)tar -czf dist/$$(PKG_DIR)-$(1).tar.gz -C tmp/dist $$(PKG_DIR)-$(1)
213183

214184
endef
215185

216186
$(foreach host,$(CFG_HOST),\
217187
$(eval $(call DEF_INSTALLER,$(host))))
218-
219-
dist-install-dirs: $(foreach host,$(CFG_HOST),dist-install-dir-$(host))
220-
221-
dist-tar-bins: $(foreach host,$(CFG_HOST),dist/$(PKG_NAME)-$(host).tar.gz)
222-
223-
# Just try to run the compiler for the build host
224-
distcheck-tar-bins: dist-tar-bins
225-
@$(call E, checking binary tarball)
226-
$(Q)rm -Rf tmp/distcheck/$(PKG_NAME)-$(CFG_BUILD)
227-
$(Q)rm -Rf tmp/distcheck/tarbininstall
228-
$(Q)mkdir -p tmp/distcheck
229-
$(Q)cd tmp/distcheck && tar -xzf ../../dist/$(PKG_NAME)-$(CFG_BUILD).tar.gz
230-
$(Q)mkdir -p tmp/distcheck/tarbininstall
231-
$(Q)sh tmp/distcheck/$(PKG_NAME)-$(CFG_BUILD)/install.sh --prefix=tmp/distcheck/tarbininstall
232-
$(Q)tmp/distcheck/tarbininstall/bin/rustc --version
233-
$(Q)rm -Rf tmp/distcheck/$(PKG_NAME)-$(CFG_BUILD)
234-
$(Q)rm -Rf tmp/distcheck/tarbininstall
235-
236-
######################################################################
237-
# Docs
238-
######################################################################
239-
240-
# Just copy the docs to a folder under dist with the appropriate name
241-
# for uploading to S3
242-
dist-docs: docs compiler-docs
243-
$(Q) rm -Rf dist/doc
244-
$(Q) mkdir -p dist/doc/
245-
$(Q) cp -r doc dist/doc/$(CFG_PACKAGE_VERS)
246-
247-
distcheck-docs: dist-docs
248-
249-
######################################################################
250-
# Primary targets (dist, distcheck)
251-
######################################################################
252-
253-
ifdef CFG_WINDOWSY_$(CFG_BUILD)
254-
255-
dist: dist-win
256-
257-
distcheck: distcheck-win
258-
$(Q)rm -Rf tmp/distcheck
259-
@echo
260-
@echo -----------------------------------------------
261-
@echo "Rust ready for distribution (see ./dist)"
262-
@echo -----------------------------------------------
263-
264-
else
265-
266-
dist: dist-tar-src dist-osx dist-tar-bins dist-docs
267-
268-
distcheck: distcheck-tar-src distcheck-osx distcheck-tar-bins distcheck-docs
269-
$(Q)rm -Rf tmp/distcheck
270-
@echo
271-
@echo -----------------------------------------------
272-
@echo "Rust ready for distribution (see ./dist)"
273-
@echo -----------------------------------------------
274-
275-
endif
276-
277-
.PHONY: dist distcheck

branches/auto/mk/install.mk

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
# The stage we install from
1616
ISTAGE = $(PREPARE_STAGE)
1717

18-
$(eval $(call DEF_PREPARE,mkfile-install))
19-
2018
install: PREPARE_HOST=$(CFG_BUILD)
2119
install: PREPARE_TARGETS=$(CFG_TARGET)
2220
install: PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
@@ -30,7 +28,7 @@ install: PREPARE_SOURCE_MAN_DIR=$(S)/man
3028
install: PREPARE_DEST_BIN_DIR=$(DESTDIR)$(CFG_PREFIX)/bin
3129
install: PREPARE_DEST_LIB_DIR=$(DESTDIR)$(CFG_LIBDIR)
3230
install: PREPARE_DEST_MAN_DIR=$(DESTDIR)$(CFG_MANDIR)/man1
33-
install: prepare-everything-mkfile-install
31+
install: prepare-everything
3432

3533

3634
# Uninstall code

0 commit comments

Comments
 (0)