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/, \
46 $(filter-out Makefile config.stamp config.mk, \
49 UNROOTED_PKG_FILES := $(patsubst $(S)%,./%,$(PKG_FILES))
52 LICENSE.txt: $(S)COPYRIGHT $(S)LICENSE-APACHE $(S)LICENSE-MIT
55 %.iss: $(S)src/etc/pkg/%.iss
58 %.ico: $(S)src/etc/pkg/%.ico
61 $(PKG_EXE): rust.iss modpath.iss LICENSE.txt rust-logo.ico \
62 $(PKG_FILES) $(CSREQ3_T_$(CFG_BUILD)_H_$(CFG_BUILD))
63 $(CFG_PYTHON) $(S)src/etc/copy-runtime-deps.py i686-pc-mingw32/stage3/bin
69 $(PKG_TAR): $(PKG_FILES)
70 @$(call E, making dist dir)
72 $(Q)mkdir -p dist/$(PKG_DIR)
77 --exclude=*/llvm/test/*/*.ll \
78 --exclude=*/llvm/test/*/*.td \
79 --exclude=*/llvm/test/*/*.s \
80 --exclude=*/llvm/test/*/*/*.ll \
81 --exclude=*/llvm/test/*/*/*.td \
82 --exclude=*/llvm/test/*/*/*.s \
83 -c $(UNROOTED_PKG_FILES) | tar -x -C dist/$(PKG_DIR)
84 $(Q)tar -czf $(PKG_TAR) -C dist $(PKG_DIR)
87 .PHONY: dist distcheck
89 ifdef CFG_WINDOWSY_$(CFG_BUILD)
95 @echo -----------------------------------------------
96 @echo $(PKG_EXE) ready for distribution
97 @echo -----------------------------------------------
103 distcheck: $(PKG_TAR)
106 @$(call E, unpacking $(PKG_TAR) in dist/$(PKG_DIR))
107 $(Q)cd dist && tar -xzf ../$(PKG_TAR)
108 @$(call E, configuring in dist/$(PKG_DIR)-build)
109 $(Q)mkdir -p dist/$(PKG_DIR)-build
110 $(Q)cd dist/$(PKG_DIR)-build && ../$(PKG_DIR)/configure
111 @$(call E, making 'check' in dist/$(PKG_DIR)-build)
112 $(Q)+make -C dist/$(PKG_DIR)-build check
113 @$(call E, making 'clean' in dist/$(PKG_DIR)-build)
114 $(Q)+make -C dist/$(PKG_DIR)-build clean
117 @echo -----------------------------------------------
118 @echo $(PKG_TAR) ready for distribution
119 @echo -----------------------------------------------