Skip to content

Commit 4176cf4

Browse files
committed
mk: Cleanup
1 parent df141e6 commit 4176cf4

File tree

1 file changed

+30
-17
lines changed

1 file changed

+30
-17
lines changed

mk/dist.mk

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,30 @@
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
######################################################################
212
# Distribution
313
######################################################################
414

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+
524
PKG_NAME := rust
625
PKG_DIR = $(PKG_NAME)-$(CFG_RELEASE)
726
PKG_TAR = dist/$(PKG_DIR).tar.gz
827

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
14-
1528
ifeq ($(CFG_OSTYPE), apple-darwin)
1629
PKG_OSX = dist/$(PKG_DIR).pkg
1730
endif
@@ -71,12 +84,16 @@ $(PKG_TAR): $(PKG_FILES)
7184
$(Q)tar -czf $(PKG_TAR) -C tmp/dist $(PKG_DIR)
7285
$(Q)rm -Rf tmp/dist/$(PKG_DIR)
7386

87+
dist-tar-src: $(PKG_TAR)
7488

7589
######################################################################
7690
# Windows .exe installer
7791
######################################################################
7892

7993
ifdef CFG_ISCC
94+
95+
PKG_EXE = dist/$(PKG_DIR)-install.exe
96+
8097
%.iss: $(S)src/etc/pkg/%.iss
8198
cp $< $@
8299

@@ -102,6 +119,8 @@ dist-prepare-win: prepare-base
102119

103120
endif
104121

122+
dist-win: $(PKG_EXE)
123+
105124

106125
######################################################################
107126
# OS X .pkg installer
@@ -126,20 +145,14 @@ $(PKG_OSX): Distribution.xml LICENSE.txt dist-prepare-osx
126145

127146
dist-osx: $(PKG_OSX)
128147

129-
distcheck-osx: $(PKG_OSX)
130-
@echo
131-
@echo -----------------------------------------------
132-
@echo $(PKG_OSX) ready for distribution
133-
@echo -----------------------------------------------
134-
135148
endif
136149

137150

138151
######################################################################
139152
# Unix binary installer tarballs
140153
######################################################################
141154

142-
dist-install-dir: $(foreach host,$(CFG_HOST),dist-install-dir-$(host))
155+
dist-install-dirs: $(foreach host,$(CFG_HOST),dist-install-dir-$(host))
143156

144157
dist-tar-bins: $(foreach host,$(CFG_HOST),dist/$(PKG_DIR)-$(host).tar.gz)
145158

@@ -177,17 +190,17 @@ $(foreach host,$(CFG_HOST),\
177190

178191
ifdef CFG_WINDOWSY_$(CFG_BUILD)
179192

180-
dist: $(PKG_EXE)
193+
dist: dist-win
181194

182195
distcheck: dist
183196
@echo
184197
@echo -----------------------------------------------
185-
@echo $(PKG_EXE) ready for distribution
198+
@echo Rust ready for distribution (see ./dist)
186199
@echo -----------------------------------------------
187200

188201
else
189202

190-
dist: $(PKG_TAR)
203+
dist: dist-tar-src
191204

192205
distcheck: $(PKG_TAR)
193206
$(Q)rm -Rf dist
@@ -204,7 +217,7 @@ distcheck: $(PKG_TAR)
204217
$(Q)rm -Rf dist
205218
@echo
206219
@echo -----------------------------------------------
207-
@echo $(PKG_TAR) ready for distribution
220+
@echo Rust ready for distribution (see ./dist)
208221
@echo -----------------------------------------------
209222

210223
endif

0 commit comments

Comments
 (0)