Skip to content

Commit da72323

Browse files
committed
---
yaml --- r: 150252 b: refs/heads/try2 c: 44842db h: refs/heads/master v: v3
1 parent bac52db commit da72323

File tree

4 files changed

+48
-30
lines changed

4 files changed

+48
-30
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 669a0554da0c8c9837fba613369d32cc3b945ab0
8+
refs/heads/try2: 44842db533134fcaca1f95fc8de4f6659a28778b
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/mk/dist.mk

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@
2121
# * dist-osx - OS X .pkg installers
2222
# * dist-tar-bins - Ad-hoc Unix binary installers
2323

24-
PKG_NAME := rust
25-
PKG_DIR = $(PKG_NAME)-$(CFG_RELEASE)
26-
PKG_TAR = dist/$(PKG_DIR).tar.gz
24+
PKG_NAME = $(CFG_PACKAGE_NAME)
2725

2826
PKG_GITMODULES := $(S)src/libuv $(S)src/llvm $(S)src/gyp $(S)src/compiler-rt
2927

@@ -62,10 +60,12 @@ LICENSE.txt: $(S)COPYRIGHT $(S)LICENSE-APACHE $(S)LICENSE-MIT
6260
# Source tarball
6361
######################################################################
6462

63+
PKG_TAR = dist/$(PKG_NAME).tar.gz
64+
6565
$(PKG_TAR): $(PKG_FILES)
6666
@$(call E, making dist dir)
67-
$(Q)rm -Rf tmp/dist/$(PKG_DIR)
68-
$(Q)mkdir -p tmp/dist/$(PKG_DIR)
67+
$(Q)rm -Rf tmp/dist/$(PKG_NAME)
68+
$(Q)mkdir -p tmp/dist/$(PKG_NAME)
6969
$(Q)tar \
7070
-C $(S) \
7171
--exclude-vcs \
@@ -76,9 +76,9 @@ $(PKG_TAR): $(PKG_FILES)
7676
--exclude=*/llvm/test/*/*/*.ll \
7777
--exclude=*/llvm/test/*/*/*.td \
7878
--exclude=*/llvm/test/*/*/*.s \
79-
-c $(UNROOTED_PKG_FILES) | tar -x -C tmp/dist/$(PKG_DIR)
80-
$(Q)tar -czf $(PKG_TAR) -C tmp/dist $(PKG_DIR)
81-
$(Q)rm -Rf tmp/dist/$(PKG_DIR)
79+
-c $(UNROOTED_PKG_FILES) | tar -x -C tmp/dist/$(PKG_NAME)
80+
$(Q)tar -czf $(PKG_TAR) -C tmp/dist $(PKG_NAME)
81+
$(Q)rm -Rf tmp/dist/$(PKG_NAME)
8282

8383
dist-tar-src: $(PKG_TAR)
8484

@@ -88,7 +88,7 @@ dist-tar-src: $(PKG_TAR)
8888

8989
ifdef CFG_ISCC
9090

91-
PKG_EXE = dist/$(PKG_DIR)-install.exe
91+
PKG_EXE = dist/$(PKG_NAME)-install.exe
9292

9393
%.iss: $(S)src/etc/pkg/%.iss
9494
cp $< $@
@@ -134,17 +134,17 @@ dist-prepare-osx-$(1): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
134134
dist-prepare-osx-$(1): PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
135135
dist-prepare-osx-$(1): prepare-base
136136

137-
dist/$(PKG_DIR)-$(1).pkg: $(S)src/etc/pkg/Distribution.xml LICENSE.txt dist-prepare-osx-$(1)
137+
dist/$(PKG_NAME)-$(1).pkg: $(S)src/etc/pkg/Distribution.xml LICENSE.txt dist-prepare-osx-$(1)
138138
@$$(call E, making OS X pkg)
139139
$(Q)pkgbuild --identifier org.rust-lang.rust --root tmp/dist/pkgroot-$(1) rust.pkg
140-
$(Q)productbuild --distribution $(S)src/etc/pkg/Distribution.xml --resources . dist/$(PKG_DIR)-$(1).pkg
140+
$(Q)productbuild --distribution $(S)src/etc/pkg/Distribution.xml --resources . dist/$(PKG_NAME)-$(1).pkg
141141
$(Q)rm -rf tmp rust.pkg
142142

143143
endef
144144

145145
$(foreach host,$(CFG_HOST),$(eval $(call DEF_OSX_PKG,$(host))))
146146

147-
dist-osx: $(foreach host,$(CFG_HOST),dist/$(PKG_DIR)-$(host).pkg)
147+
dist-osx: $(foreach host,$(CFG_HOST),dist/$(PKG_NAME)-$(host).pkg)
148148

149149
endif
150150

@@ -155,12 +155,12 @@ endif
155155

156156
dist-install-dirs: $(foreach host,$(CFG_HOST),dist-install-dir-$(host))
157157

158-
dist-tar-bins: $(foreach host,$(CFG_HOST),dist/$(PKG_DIR)-$(host).tar.gz)
158+
dist-tar-bins: $(foreach host,$(CFG_HOST),dist/$(PKG_NAME)-$(host).tar.gz)
159159

160160
define DEF_INSTALLER
161161
dist-install-dir-$(1): PREPARE_HOST=$(1)
162162
dist-install-dir-$(1): PREPARE_TARGETS=$(1)
163-
dist-install-dir-$(1): PREPARE_DEST_DIR=tmp/dist/$$(PKG_DIR)-$(1)
163+
dist-install-dir-$(1): PREPARE_DEST_DIR=tmp/dist/$$(PKG_NAME)-$(1)
164164
dist-install-dir-$(1): PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
165165
dist-install-dir-$(1): PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
166166
dist-install-dir-$(1): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
@@ -175,9 +175,9 @@ dist-install-dir-$(1): prepare-base
175175
$$(Q)$$(PREPARE_MAN_CMD) $$(S)README.md $$(PREPARE_DEST_DIR)
176176
$$(Q)$$(PREPARE_BIN_CMD) $$(S)src/etc/install.sh $$(PREPARE_DEST_DIR)
177177

178-
dist/$$(PKG_DIR)-$(1).tar.gz: dist-install-dir-$(1)
178+
dist/$$(PKG_NAME)-$(1).tar.gz: dist-install-dir-$(1)
179179
@$(call E, build: $$@)
180-
$$(Q)tar -czf dist/$$(PKG_DIR)-$(1).tar.gz -C tmp/dist $$(PKG_DIR)-$(1)
180+
$$(Q)tar -czf dist/$$(PKG_NAME)-$(1).tar.gz -C tmp/dist $$(PKG_NAME)-$(1)
181181

182182
endef
183183

@@ -206,15 +206,15 @@ dist: dist-tar-src
206206
distcheck: $(PKG_TAR)
207207
$(Q)rm -Rf dist
208208
$(Q)mkdir -p dist
209-
@$(call E, unpacking $(PKG_TAR) in dist/$(PKG_DIR))
209+
@$(call E, unpacking $(PKG_TAR) in dist/$(PKG_NAME))
210210
$(Q)cd dist && tar -xzf ../$(PKG_TAR)
211-
@$(call E, configuring in dist/$(PKG_DIR)-build)
212-
$(Q)mkdir -p dist/$(PKG_DIR)-build
213-
$(Q)cd dist/$(PKG_DIR)-build && ../$(PKG_DIR)/configure
214-
@$(call E, making 'check' in dist/$(PKG_DIR)-build)
215-
$(Q)+make -C dist/$(PKG_DIR)-build check
216-
@$(call E, making 'clean' in dist/$(PKG_DIR)-build)
217-
$(Q)+make -C dist/$(PKG_DIR)-build clean
211+
@$(call E, configuring in dist/$(PKG_NAME)-build)
212+
$(Q)mkdir -p dist/$(PKG_NAME)-build
213+
$(Q)cd dist/$(PKG_NAME)-build && ../$(PKG_NAME)/configure
214+
@$(call E, making 'check' in dist/$(PKG_NAME)-build)
215+
$(Q)+make -C dist/$(PKG_NAME)-build check
216+
@$(call E, making 'clean' in dist/$(PKG_NAME)-build)
217+
$(Q)+make -C dist/$(PKG_NAME)-build clean
218218
$(Q)rm -Rf dist
219219
@echo
220220
@echo -----------------------------------------------

branches/try2/mk/main.mk

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,25 @@
1313
######################################################################
1414

1515
# The version number
16-
CFG_RELEASE = 0.10-pre
16+
CFG_RELEASE_NUM=0.10
17+
CFG_RELEASE_LABEL=-pre
1718

18-
# The version string plus commit information
19+
ifndef CFG_NIGHTLY
20+
# This is the normal version string
21+
CFG_RELEASE=$(CFG_RELEASE_NUM)$(CFG_RELEASE_LABEL)
22+
CFG_PACKAGE_VERS=$(CFG_RELEASE)
23+
else
24+
# Modify the version label for nightly builds
25+
CFG_RELEASE=$(CFG_RELEASE_NUM)$(CFG_RELEASE_LABEL)-nightly
26+
# When building nightly distributables just reuse the same "rust-nightly" name
27+
# so when we upload we'll always override the previous nighly. This doesn't actually
28+
# impact the version reported by rustc - it's just for file naming.
29+
CFG_PACKAGE_VERS=nightly
30+
endif
31+
# The name of the package to use for creating tarballs, installers etc.
32+
CFG_PACKAGE_NAME=rust-$(CFG_PACKAGE_VERS)
33+
34+
# The version string plus commit information - this is what rustc reports
1935
CFG_VERSION = $(CFG_RELEASE)
2036
CFG_GIT_DIR := $(CFG_SRC_DIR).git
2137
# since $(CFG_GIT) may contain spaces (especially on Windows),
@@ -32,9 +48,9 @@ ifneq ($(wildcard $(subst $(SPACE),\$(SPACE),$(CFG_GIT_DIR))),)
3248
endif
3349
endif
3450

35-
# windows exe's need numeric versions - don't use anything but
51+
# Windows exe's need numeric versions - don't use anything but
3652
# numbers and dots here
37-
CFG_VERSION_WIN = $(subst -pre,,$(CFG_RELEASE))
53+
CFG_VERSION_WIN = $(CFG_RELEASE_NUM)
3854

3955

4056
######################################################################
@@ -259,6 +275,7 @@ export CFG_BUILD_DIR
259275
export CFG_VERSION
260276
export CFG_VERSION_WIN
261277
export CFG_RELEASE
278+
export CFG_PACKAGE_NAME
262279
export CFG_BUILD
263280
export CFG_LLVM_ROOT
264281
export CFG_ENABLE_MINGW_CROSS

branches/try2/src/etc/pkg/rust.iss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#define CFG_VERSION_WIN GetEnv("CFG_VERSION_WIN")
22
#define CFG_RELEASE GetEnv("CFG_RELEASE")
3+
#define CFG_PACKAGE_NAME GetEnv("CFG_PACKAGE_NAME")
34

45
[Setup]
56

@@ -19,7 +20,7 @@ DisableStartupPrompt=true
1920

2021
OutputDir=.\
2122
SourceDir=.\
22-
OutputBaseFilename=rust-{#CFG_RELEASE}-install
23+
OutputBaseFilename={#CFG_PACKAGE_NAME}-install
2324
DefaultDirName={pf32}\Rust
2425

2526
Compression=lzma2/ultra

0 commit comments

Comments
 (0)