21
21
# * dist-osx - OS X .pkg installers
22
22
# * dist-tar-bins - Ad-hoc Unix binary installers
23
23
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 )
27
25
28
26
PKG_GITMODULES := $(S ) src/libuv $(S ) src/llvm $(S ) src/gyp $(S ) src/compiler-rt
29
27
@@ -62,10 +60,12 @@ LICENSE.txt: $(S)COPYRIGHT $(S)LICENSE-APACHE $(S)LICENSE-MIT
62
60
# Source tarball
63
61
# #####################################################################
64
62
63
+ PKG_TAR = dist/$(PKG_NAME ) .tar.gz
64
+
65
65
$(PKG_TAR ) : $(PKG_FILES )
66
66
@$(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 )
69
69
$(Q ) tar \
70
70
-C $(S) \
71
71
--exclude-vcs \
@@ -76,9 +76,9 @@ $(PKG_TAR): $(PKG_FILES)
76
76
--exclude=*/llvm/test/*/*/*.ll \
77
77
--exclude=*/llvm/test/*/*/*.td \
78
78
--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 )
82
82
83
83
dist-tar-src : $(PKG_TAR )
84
84
@@ -88,7 +88,7 @@ dist-tar-src: $(PKG_TAR)
88
88
89
89
ifdef CFG_ISCC
90
90
91
- PKG_EXE = dist/$(PKG_DIR ) -install.exe
91
+ PKG_EXE = dist/$(PKG_NAME ) -install.exe
92
92
93
93
% .iss : $(S ) src/etc/pkg/% .iss
94
94
cp $< $@
@@ -134,17 +134,17 @@ dist-prepare-osx-$(1): PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
134
134
dist-prepare-osx-$(1 ) : PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD )
135
135
dist-prepare-osx-$(1 ) : prepare-base
136
136
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 )
138
138
@$$(call E, making OS X pkg)
139
139
$(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
141
141
$(Q ) rm -rf tmp rust.pkg
142
142
143
143
endef
144
144
145
145
$(foreach host,$(CFG_HOST),$(eval $(call DEF_OSX_PKG,$(host))))
146
146
147
- dist-osx : $(foreach host,$(CFG_HOST ) ,dist/$(PKG_DIR ) -$(host ) .pkg)
147
+ dist-osx : $(foreach host,$(CFG_HOST ) ,dist/$(PKG_NAME ) -$(host ) .pkg)
148
148
149
149
endif
150
150
@@ -155,12 +155,12 @@ endif
155
155
156
156
dist-install-dirs : $(foreach host,$(CFG_HOST ) ,dist-install-dir-$(host ) )
157
157
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)
159
159
160
160
define DEF_INSTALLER
161
161
dist-install-dir-$(1 ) : PREPARE_HOST=$(1 )
162
162
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 )
164
164
dist-install-dir-$(1 ) : PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD )
165
165
dist-install-dir-$(1 ) : PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD )
166
166
dist-install-dir-$(1 ) : PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD )
@@ -175,9 +175,9 @@ dist-install-dir-$(1): prepare-base
175
175
$$(Q )$$(PREPARE_MAN_CMD ) $$(S ) README.md $$(PREPARE_DEST_DIR )
176
176
$$(Q )$$(PREPARE_BIN_CMD ) $$(S ) src/etc/install.sh $$(PREPARE_DEST_DIR )
177
177
178
- dist/$$(PKG_DIR ) -$(1 ) .tar.gz: dist-install-dir-$(1 )
178
+ dist/$$(PKG_NAME ) -$(1 ) .tar.gz: dist-install-dir-$(1 )
179
179
@$(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 )
181
181
182
182
endef
183
183
@@ -206,15 +206,15 @@ dist: dist-tar-src
206
206
distcheck : $(PKG_TAR )
207
207
$(Q ) rm -Rf dist
208
208
$(Q ) mkdir -p dist
209
- @$(call E, unpacking $(PKG_TAR ) in dist/$(PKG_DIR ) )
209
+ @$(call E, unpacking $(PKG_TAR ) in dist/$(PKG_NAME ) )
210
210
$(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
218
218
$(Q ) rm -Rf dist
219
219
@echo
220
220
@echo -----------------------------------------------
0 commit comments