Skip to content

Commit ac150c1

Browse files
committed
---
yaml --- r: 150249 b: refs/heads/try2 c: df141e6 h: refs/heads/master i: 150247: e404b11 v: v3
1 parent 31d2f53 commit ac150c1

File tree

2 files changed

+78
-53
lines changed

2 files changed

+78
-53
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: e30ab71e086746c6db7d49f5b0be5fc8cceda514
8+
refs/heads/try2: df141e624da6d4c2976a4cecd9cb6779e23fedda
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: 77 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -48,31 +48,10 @@ UNROOTED_PKG_FILES := $(patsubst $(S)%,./%,$(PKG_FILES))
4848
LICENSE.txt: $(S)COPYRIGHT $(S)LICENSE-APACHE $(S)LICENSE-MIT
4949
cat $^ > $@
5050

51-
ifdef CFG_ISCC
52-
%.iss: $(S)src/etc/pkg/%.iss
53-
cp $< $@
54-
55-
%.ico: $(S)src/etc/pkg/%.ico
56-
cp $< $@
57-
58-
$(PKG_EXE): rust.iss modpath.iss LICENSE.txt rust-logo.ico \
59-
$(PKG_FILES) $(CSREQ3_T_$(CFG_BUILD)_H_$(CFG_BUILD)) \
60-
dist-prepare-win
61-
$(CFG_PYTHON) $(S)src/etc/copy-runtime-deps.py tmp/dist/win/bin
62-
@$(call E, ISCC: $@)
63-
$(Q)"$(CFG_ISCC)" $<
6451

65-
dist-prepare-win: PREPARE_HOST=$(CFG_BUILD)
66-
dist-prepare-win: PREPARE_TARGETS=$(CFG_BUILD)
67-
dist-prepare-win: PREPARE_DEST_DIR=tmp/dist/win
68-
dist-prepare-win: PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
69-
dist-prepare-win: PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
70-
dist-prepare-win: PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
71-
dist-prepare-win: PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
72-
dist-prepare-win: PREPARE_CLEAN=true
73-
dist-prepare-win: prepare-base
74-
75-
endif
52+
######################################################################
53+
# Source tarball
54+
######################################################################
7655

7756
$(PKG_TAR): $(PKG_FILES)
7857
@$(call E, making dist dir)
@@ -92,42 +71,42 @@ $(PKG_TAR): $(PKG_FILES)
9271
$(Q)tar -czf $(PKG_TAR) -C tmp/dist $(PKG_DIR)
9372
$(Q)rm -Rf tmp/dist/$(PKG_DIR)
9473

95-
.PHONY: dist distcheck
9674

97-
ifdef CFG_WINDOWSY_$(CFG_BUILD)
98-
99-
dist: $(PKG_EXE)
75+
######################################################################
76+
# Windows .exe installer
77+
######################################################################
10078

101-
distcheck: dist
102-
@echo
103-
@echo -----------------------------------------------
104-
@echo $(PKG_EXE) ready for distribution
105-
@echo -----------------------------------------------
79+
ifdef CFG_ISCC
80+
%.iss: $(S)src/etc/pkg/%.iss
81+
cp $< $@
10682

107-
else
83+
%.ico: $(S)src/etc/pkg/%.ico
84+
cp $< $@
10885

109-
dist: $(PKG_TAR)
86+
$(PKG_EXE): rust.iss modpath.iss LICENSE.txt rust-logo.ico \
87+
$(PKG_FILES) $(CSREQ3_T_$(CFG_BUILD)_H_$(CFG_BUILD)) \
88+
dist-prepare-win
89+
$(CFG_PYTHON) $(S)src/etc/copy-runtime-deps.py tmp/dist/win/bin
90+
@$(call E, ISCC: $@)
91+
$(Q)"$(CFG_ISCC)" $<
11092

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 -----------------------------------------------
93+
dist-prepare-win: PREPARE_HOST=$(CFG_BUILD)
94+
dist-prepare-win: PREPARE_TARGETS=$(CFG_BUILD)
95+
dist-prepare-win: PREPARE_DEST_DIR=tmp/dist/win
96+
dist-prepare-win: PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD)
97+
dist-prepare-win: PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD)
98+
dist-prepare-win: PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD)
99+
dist-prepare-win: PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD)
100+
dist-prepare-win: PREPARE_CLEAN=true
101+
dist-prepare-win: prepare-base
128102

129103
endif
130104

105+
106+
######################################################################
107+
# OS X .pkg installer
108+
######################################################################
109+
131110
ifeq ($(CFG_OSTYPE), apple-darwin)
132111

133112
dist-prepare-osx: PREPARE_HOST=$(CFG_BUILD)
@@ -155,6 +134,11 @@ distcheck-osx: $(PKG_OSX)
155134

156135
endif
157136

137+
138+
######################################################################
139+
# Unix binary installer tarballs
140+
######################################################################
141+
158142
dist-install-dir: $(foreach host,$(CFG_HOST),dist-install-dir-$(host))
159143

160144
dist-tar-bins: $(foreach host,$(CFG_HOST),dist/$(PKG_DIR)-$(host).tar.gz)
@@ -185,3 +169,44 @@ endef
185169

186170
$(foreach host,$(CFG_HOST),\
187171
$(eval $(call DEF_INSTALLER,$(host))))
172+
173+
174+
######################################################################
175+
# Primary targets (dist, distcheck)
176+
######################################################################
177+
178+
ifdef CFG_WINDOWSY_$(CFG_BUILD)
179+
180+
dist: $(PKG_EXE)
181+
182+
distcheck: dist
183+
@echo
184+
@echo -----------------------------------------------
185+
@echo $(PKG_EXE) ready for distribution
186+
@echo -----------------------------------------------
187+
188+
else
189+
190+
dist: $(PKG_TAR)
191+
192+
distcheck: $(PKG_TAR)
193+
$(Q)rm -Rf dist
194+
$(Q)mkdir -p dist
195+
@$(call E, unpacking $(PKG_TAR) in dist/$(PKG_DIR))
196+
$(Q)cd dist && tar -xzf ../$(PKG_TAR)
197+
@$(call E, configuring in dist/$(PKG_DIR)-build)
198+
$(Q)mkdir -p dist/$(PKG_DIR)-build
199+
$(Q)cd dist/$(PKG_DIR)-build && ../$(PKG_DIR)/configure
200+
@$(call E, making 'check' in dist/$(PKG_DIR)-build)
201+
$(Q)+make -C dist/$(PKG_DIR)-build check
202+
@$(call E, making 'clean' in dist/$(PKG_DIR)-build)
203+
$(Q)+make -C dist/$(PKG_DIR)-build clean
204+
$(Q)rm -Rf dist
205+
@echo
206+
@echo -----------------------------------------------
207+
@echo $(PKG_TAR) ready for distribution
208+
@echo -----------------------------------------------
209+
210+
endif
211+
212+
.PHONY: dist distcheck

0 commit comments

Comments
 (0)