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
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_TRIPLE)_H_$(CFG_BUILD_TRIPLE))
68 $(PKG_TAR): $(PKG_FILES)
69 @$(call E, making dist dir)
71 $(Q)mkdir -p dist/$(PKG_DIR)
76 --exclude=*/llvm/test/*/*.ll \
77 --exclude=*/llvm/test/*/*.td \
78 --exclude=*/llvm/test/*/*.s \
79 --exclude=*/llvm/test/*/*/*.ll \
80 --exclude=*/llvm/test/*/*/*.td \
81 --exclude=*/llvm/test/*/*/*.s \
82 -c $(UNROOTED_PKG_FILES) | tar -x -C dist/$(PKG_DIR)
83 $(Q)tar -czf $(PKG_TAR) -C dist $(PKG_DIR)
86 .PHONY: dist distcheck
88 ifdef CFG_WINDOWSY_$(CFG_BUILD_TRIPLE)
94 @echo -----------------------------------------------
95 @echo $(PKG_EXE) ready for distribution
96 @echo -----------------------------------------------
102 distcheck: $(PKG_TAR)
105 @$(call E, unpacking $(PKG_TAR) in dist/$(PKG_DIR))
106 $(Q)cd dist && tar -xzf ../$(PKG_TAR)
107 @$(call E, configuring in dist/$(PKG_DIR)-build)
108 $(Q)mkdir -p dist/$(PKG_DIR)-build
109 $(Q)cd dist/$(PKG_DIR)-build && ../$(PKG_DIR)/configure
110 @$(call E, making 'check' in dist/$(PKG_DIR)-build)
111 $(Q)+make -C dist/$(PKG_DIR)-build check
112 @$(call E, making 'clean' in dist/$(PKG_DIR)-build)
113 $(Q)+make -C dist/$(PKG_DIR)-build clean
116 @echo -----------------------------------------------
117 @echo $(PKG_TAR) ready for distribution
118 @echo -----------------------------------------------