1 ######################################################################
3 ######################################################################
6 PKG_DIR = $(PKG_NAME)-$(CFG_RELEASE)
7 PKG_TAR = $(PKG_DIR).tar.gz
10 PKG_ISS = $(wildcard $(S)src/etc/pkg/*.iss)
11 PKG_ICO = $(S)src/etc/pkg/rust-logo.ico
12 PKG_EXE = $(PKG_DIR)-install.exe
15 PKG_GITMODULES := $(S)src/libuv $(S)src/llvm $(S)src/gyp
25 $(S)configure $(S)Makefile.in \
28 $(addprefix $(S)src/, \
47 $(filter-out Makefile config.stamp config.mk, \
50 UNROOTED_PKG_FILES := $(patsubst $(S)%,./%,$(PKG_FILES))
53 LICENSE.txt: $(S)COPYRIGHT $(S)LICENSE-APACHE $(S)LICENSE-MIT
56 %.iss: $(S)src/etc/pkg/%.iss
59 %.ico: $(S)src/etc/pkg/%.ico
62 $(PKG_EXE): rust.iss modpath.iss LICENSE.txt rust-logo.ico \
63 $(PKG_FILES) $(CSREQ3_T_$(CFG_BUILD)_H_$(CFG_BUILD))
64 $(CFG_PYTHON) $(S)src/etc/copy-runtime-deps.py i686-pc-mingw32/stage3/bin
70 $(PKG_TAR): $(PKG_FILES)
71 @$(call E, making dist dir)
73 $(Q)mkdir -p dist/$(PKG_DIR)
78 --exclude=*/llvm/test/*/*.ll \
79 --exclude=*/llvm/test/*/*.td \
80 --exclude=*/llvm/test/*/*.s \
81 --exclude=*/llvm/test/*/*/*.ll \
82 --exclude=*/llvm/test/*/*/*.td \
83 --exclude=*/llvm/test/*/*/*.s \
84 -c $(UNROOTED_PKG_FILES) | tar -x -C dist/$(PKG_DIR)
85 $(Q)tar -czf $(PKG_TAR) -C dist $(PKG_DIR)
88 .PHONY: dist distcheck
90 ifdef CFG_WINDOWSY_$(CFG_BUILD)
96 @echo -----------------------------------------------
97 @echo $(PKG_EXE) ready for distribution
98 @echo -----------------------------------------------
104 distcheck: $(PKG_TAR)
107 @$(call E, unpacking $(PKG_TAR) in dist/$(PKG_DIR))
108 $(Q)cd dist && tar -xzf ../$(PKG_TAR)
109 @$(call E, configuring in dist/$(PKG_DIR)-build)
110 $(Q)mkdir -p dist/$(PKG_DIR)-build
111 $(Q)cd dist/$(PKG_DIR)-build && ../$(PKG_DIR)/configure
112 @$(call E, making 'check' in dist/$(PKG_DIR)-build)
113 $(Q)+make -C dist/$(PKG_DIR)-build check
114 @$(call E, making 'clean' in dist/$(PKG_DIR)-build)
115 $(Q)+make -C dist/$(PKG_DIR)-build clean
118 @echo -----------------------------------------------
119 @echo $(PKG_TAR) ready for distribution
120 @echo -----------------------------------------------