@@ -25,10 +25,6 @@ PKG_NAME := rust
25
25
PKG_DIR = $(PKG_NAME ) -$(CFG_RELEASE )
26
26
PKG_TAR = dist/$(PKG_DIR ) .tar.gz
27
27
28
- ifeq ($(CFG_OSTYPE ) , apple-darwin)
29
- PKG_OSX = dist/$(PKG_DIR ) .pkg
30
- endif
31
-
32
28
PKG_GITMODULES := $(S ) src/libuv $(S ) src/llvm $(S ) src/gyp $(S ) src/compiler-rt
33
29
34
30
PKG_FILES := \
@@ -128,22 +124,27 @@ dist-win: $(PKG_EXE)
128
124
129
125
ifeq ($(CFG_OSTYPE ) , apple-darwin)
130
126
131
- dist-prepare-osx : PREPARE_HOST=$(CFG_BUILD )
132
- dist-prepare-osx : PREPARE_TARGETS=$(CFG_BUILD )
133
- dist-prepare-osx : PREPARE_DEST_DIR=tmp/dist/pkgroot
134
- dist-prepare-osx : PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD )
135
- dist-prepare-osx : PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD )
136
- dist-prepare-osx : PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD )
137
- dist-prepare-osx : PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD )
138
- dist-prepare-osx : prepare-base
139
-
140
- $(PKG_OSX ) : Distribution.xml LICENSE.txt dist-prepare-osx
141
- @$(call E, making OS X pkg)
142
- $(Q ) pkgbuild --identifier org.rust-lang.rust --root tmp/dist/pkgroot rust.pkg
143
- $(Q ) productbuild --distribution Distribution.xml --resources . $(PKG_OSX )
127
+ define DEF_OSX_PKG
128
+ dist-prepare-osx-$(1 ) : PREPARE_HOST=$(1 )
129
+ dist-prepare-osx-$(1 ) : PREPARE_TARGETS=$(1 )
130
+ dist-prepare-osx-$(1 ) : PREPARE_DEST_DIR=tmp/dist/pkgroot-$(1 )
131
+ dist-prepare-osx-$(1 ) : PREPARE_DIR_CMD=$(DEFAULT_PREPARE_DIR_CMD )
132
+ dist-prepare-osx-$(1 ) : PREPARE_BIN_CMD=$(DEFAULT_PREPARE_BIN_CMD )
133
+ dist-prepare-osx-$(1 ) : PREPARE_LIB_CMD=$(DEFAULT_PREPARE_LIB_CMD )
134
+ dist-prepare-osx-$(1 ) : PREPARE_MAN_CMD=$(DEFAULT_PREPARE_MAN_CMD )
135
+ dist-prepare-osx-$(1 ) : prepare-base
136
+
137
+ dist/$(PKG_DIR ) -$(1 ) .pkg: $(S ) src/etc/pkg/Distribution.xml LICENSE.txt dist-prepare-osx-$(1 )
138
+ @$$(call E, making OS X pkg)
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
144
141
$(Q ) rm -rf tmp rust.pkg
145
142
146
- dist-osx : $(PKG_OSX )
143
+ endef
144
+
145
+ $(foreach host,$(CFG_HOST),$(eval $(call DEF_OSX_PKG,$(host))))
146
+
147
+ dist-osx : $(foreach host,$(CFG_HOST ) ,dist/$(PKG_DIR ) -$(host ) .pkg)
147
148
148
149
endif
149
150
0 commit comments