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
+
1
11
# #####################################################################
2
12
# Distribution
3
13
# #####################################################################
4
14
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
+
5
24
PKG_NAME := rust
6
25
PKG_DIR = $(PKG_NAME ) -$(CFG_RELEASE )
7
26
PKG_TAR = dist/$(PKG_DIR ) .tar.gz
8
27
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
-
15
28
ifeq ($(CFG_OSTYPE ) , apple-darwin)
16
29
PKG_OSX = dist/$(PKG_DIR ) .pkg
17
30
endif
@@ -71,12 +84,16 @@ $(PKG_TAR): $(PKG_FILES)
71
84
$(Q)tar -czf $(PKG_TAR) -C tmp/dist $(PKG_DIR)
72
85
$(Q)rm -Rf tmp/dist/$(PKG_DIR)
73
86
87
+ dist-tar-src : $(PKG_TAR )
74
88
75
89
# #####################################################################
76
90
# Windows .exe installer
77
91
# #####################################################################
78
92
79
93
ifdef CFG_ISCC
94
+
95
+ PKG_EXE = dist/$(PKG_DIR ) -install.exe
96
+
80
97
% .iss : $(S ) src/etc/pkg/% .iss
81
98
cp $< $@
82
99
@@ -102,6 +119,8 @@ dist-prepare-win: prepare-base
102
119
103
120
endif
104
121
122
+ dist-win : $(PKG_EXE )
123
+
105
124
106
125
# #####################################################################
107
126
# OS X .pkg installer
@@ -126,20 +145,14 @@ $(PKG_OSX): Distribution.xml LICENSE.txt dist-prepare-osx
126
145
127
146
dist-osx : $(PKG_OSX )
128
147
129
- distcheck-osx : $(PKG_OSX )
130
- @echo
131
- @echo -----------------------------------------------
132
- @echo $(PKG_OSX ) ready for distribution
133
- @echo -----------------------------------------------
134
-
135
148
endif
136
149
137
150
138
151
# #####################################################################
139
152
# Unix binary installer tarballs
140
153
# #####################################################################
141
154
142
- dist-install-dir : $(foreach host,$(CFG_HOST ) ,dist-install-dir-$(host ) )
155
+ dist-install-dirs : $(foreach host,$(CFG_HOST ) ,dist-install-dir-$(host ) )
143
156
144
157
dist-tar-bins : $(foreach host,$(CFG_HOST ) ,dist/$(PKG_DIR ) -$(host ) .tar.gz)
145
158
@@ -177,17 +190,17 @@ $(foreach host,$(CFG_HOST),\
177
190
178
191
ifdef CFG_WINDOWSY_$(CFG_BUILD)
179
192
180
- dist : $( PKG_EXE )
193
+ dist : dist-win
181
194
182
195
distcheck : dist
183
196
@echo
184
197
@echo -----------------------------------------------
185
- @echo $( PKG_EXE ) ready for distribution
198
+ @echo Rust ready for distribution (see ./dist)
186
199
@echo -----------------------------------------------
187
200
188
201
else
189
202
190
- dist : $( PKG_TAR )
203
+ dist : dist-tar-src
191
204
192
205
distcheck : $(PKG_TAR )
193
206
$(Q ) rm -Rf dist
@@ -204,7 +217,7 @@ distcheck: $(PKG_TAR)
204
217
$(Q ) rm -Rf dist
205
218
@echo
206
219
@echo -----------------------------------------------
207
- @echo $( PKG_TAR ) ready for distribution
220
+ @echo Rust ready for distribution (see ./dist)
208
221
@echo -----------------------------------------------
209
222
210
223
endif
0 commit comments