2011-05-01 15:18:52 -05:00
|
|
|
######################################################################
|
|
|
|
# Distribution
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
PKG_NAME := rust
|
2012-01-17 18:49:44 -06:00
|
|
|
PKG_DIR = $(PKG_NAME)-$(CFG_RELEASE)
|
2011-05-01 15:18:52 -05:00
|
|
|
PKG_TAR = $(PKG_DIR).tar.gz
|
|
|
|
|
2012-01-25 18:02:53 -06:00
|
|
|
ifdef CFG_ISCC
|
|
|
|
PKG_ISS = $(wildcard $(S)src/etc/pkg/*.iss)
|
|
|
|
PKG_ICO = $(S)src/etc/pkg/rust-logo.ico
|
2011-07-23 14:26:47 -05:00
|
|
|
PKG_EXE = $(PKG_DIR)-install.exe
|
|
|
|
endif
|
|
|
|
|
2013-08-18 19:11:45 -05:00
|
|
|
PKG_GITMODULES := $(S)src/libuv $(S)src/llvm $(S)src/gyp
|
2011-10-05 19:41:01 -05:00
|
|
|
|
2012-01-18 19:25:54 -06:00
|
|
|
PKG_FILES := \
|
2012-12-07 16:39:40 -06:00
|
|
|
$(S)COPYRIGHT \
|
2012-12-07 16:37:01 -06:00
|
|
|
$(S)LICENSE-APACHE \
|
|
|
|
$(S)LICENSE-MIT \
|
2013-04-08 03:15:12 -05:00
|
|
|
$(S)AUTHORS.txt \
|
2013-07-13 08:57:01 -05:00
|
|
|
$(S)CONTRIBUTING.md \
|
2012-12-07 16:37:01 -06:00
|
|
|
$(S)README.md \
|
2013-07-13 08:57:01 -05:00
|
|
|
$(S)RELEASES.txt \
|
2011-05-01 15:18:52 -05:00
|
|
|
$(S)configure $(S)Makefile.in \
|
2012-01-20 14:06:14 -06:00
|
|
|
$(S)man \
|
2012-01-18 19:25:54 -06:00
|
|
|
$(S)doc \
|
2011-05-01 15:18:52 -05:00
|
|
|
$(addprefix $(S)src/, \
|
2012-01-17 18:49:44 -06:00
|
|
|
README.txt \
|
2012-12-06 14:08:58 -06:00
|
|
|
driver \
|
2013-01-14 04:55:47 -06:00
|
|
|
librustpkg \
|
2012-12-06 13:55:56 -06:00
|
|
|
librusti \
|
2013-02-18 13:18:34 -06:00
|
|
|
librust \
|
2012-12-06 13:55:56 -06:00
|
|
|
librustc \
|
2012-01-10 16:34:53 -06:00
|
|
|
compiletest \
|
|
|
|
etc \
|
2013-05-17 12:45:09 -05:00
|
|
|
libextra \
|
2012-01-10 16:34:53 -06:00
|
|
|
libstd \
|
2013-05-17 12:45:09 -05:00
|
|
|
libsyntax \
|
2012-01-10 16:34:53 -06:00
|
|
|
rt \
|
2012-12-06 13:55:56 -06:00
|
|
|
librustdoc \
|
2013-09-16 18:31:04 -05:00
|
|
|
rustdoc_ng \
|
2012-01-10 16:34:53 -06:00
|
|
|
rustllvm \
|
|
|
|
snapshots.txt \
|
|
|
|
test) \
|
|
|
|
$(PKG_GITMODULES) \
|
2012-03-28 13:29:38 -05:00
|
|
|
$(filter-out Makefile config.stamp config.mk, \
|
|
|
|
$(MKFILE_DEPS))
|
2011-05-01 15:18:52 -05:00
|
|
|
|
2012-01-18 19:25:54 -06:00
|
|
|
UNROOTED_PKG_FILES := $(patsubst $(S)%,./%,$(PKG_FILES))
|
2011-07-23 14:26:47 -05:00
|
|
|
|
2012-01-25 18:02:53 -06:00
|
|
|
ifdef CFG_ISCC
|
2012-12-07 20:45:27 -06:00
|
|
|
LICENSE.txt: $(S)COPYRIGHT $(S)LICENSE-APACHE $(S)LICENSE-MIT
|
|
|
|
cat $^ > $@
|
2011-07-23 14:26:47 -05:00
|
|
|
|
2012-01-25 18:02:53 -06:00
|
|
|
%.iss: $(S)src/etc/pkg/%.iss
|
|
|
|
cp $< $@
|
|
|
|
|
|
|
|
%.ico: $(S)src/etc/pkg/%.ico
|
|
|
|
cp $< $@
|
|
|
|
|
|
|
|
$(PKG_EXE): rust.iss modpath.iss LICENSE.txt rust-logo.ico \
|
2013-06-27 20:57:38 -05:00
|
|
|
$(PKG_FILES) $(CSREQ3_T_$(CFG_BUILD_TRIPLE)_H_$(CFG_BUILD_TRIPLE))
|
2012-01-25 18:02:53 -06:00
|
|
|
@$(call E, ISCC: $@)
|
|
|
|
$(Q)"$(CFG_ISCC)" $<
|
2012-01-19 23:27:14 -06:00
|
|
|
endif
|
2011-05-01 15:18:52 -05:00
|
|
|
|
2012-01-25 18:02:53 -06:00
|
|
|
|
2011-07-23 14:26:47 -05:00
|
|
|
$(PKG_TAR): $(PKG_FILES)
|
2011-05-01 15:18:52 -05:00
|
|
|
@$(call E, making dist dir)
|
|
|
|
$(Q)rm -Rf dist
|
|
|
|
$(Q)mkdir -p dist/$(PKG_DIR)
|
2012-01-19 12:52:04 -06:00
|
|
|
$(Q)tar \
|
|
|
|
-C $(S) \
|
|
|
|
--exclude-vcs \
|
|
|
|
--exclude=*~ \
|
|
|
|
--exclude=*/llvm/test/*/*.ll \
|
|
|
|
--exclude=*/llvm/test/*/*.td \
|
|
|
|
--exclude=*/llvm/test/*/*.s \
|
|
|
|
--exclude=*/llvm/test/*/*/*.ll \
|
|
|
|
--exclude=*/llvm/test/*/*/*.td \
|
|
|
|
--exclude=*/llvm/test/*/*/*.s \
|
|
|
|
-c $(UNROOTED_PKG_FILES) | tar -x -C dist/$(PKG_DIR)
|
2011-05-01 15:18:52 -05:00
|
|
|
$(Q)tar -czf $(PKG_TAR) -C dist $(PKG_DIR)
|
|
|
|
$(Q)rm -Rf dist
|
|
|
|
|
2012-01-25 18:02:53 -06:00
|
|
|
.PHONY: dist distcheck
|
2012-01-17 18:49:44 -06:00
|
|
|
|
2013-03-07 00:36:20 -06:00
|
|
|
ifdef CFG_WINDOWSY_$(CFG_BUILD_TRIPLE)
|
2012-01-19 20:29:48 -06:00
|
|
|
|
|
|
|
dist: $(PKG_EXE)
|
|
|
|
|
|
|
|
distcheck: dist
|
|
|
|
@echo
|
|
|
|
@echo -----------------------------------------------
|
|
|
|
@echo $(PKG_EXE) ready for distribution
|
|
|
|
@echo -----------------------------------------------
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
dist: $(PKG_TAR)
|
2012-01-17 18:49:44 -06:00
|
|
|
|
2011-05-01 15:18:52 -05:00
|
|
|
distcheck: $(PKG_TAR)
|
|
|
|
$(Q)rm -Rf dist
|
|
|
|
$(Q)mkdir -p dist
|
|
|
|
@$(call E, unpacking $(PKG_TAR) in dist/$(PKG_DIR))
|
|
|
|
$(Q)cd dist && tar -xzf ../$(PKG_TAR)
|
|
|
|
@$(call E, configuring in dist/$(PKG_DIR)-build)
|
|
|
|
$(Q)mkdir -p dist/$(PKG_DIR)-build
|
|
|
|
$(Q)cd dist/$(PKG_DIR)-build && ../$(PKG_DIR)/configure
|
|
|
|
@$(call E, making 'check' in dist/$(PKG_DIR)-build)
|
2012-01-10 16:34:53 -06:00
|
|
|
$(Q)+make -C dist/$(PKG_DIR)-build check
|
2011-05-01 15:18:52 -05:00
|
|
|
@$(call E, making 'clean' in dist/$(PKG_DIR)-build)
|
2012-01-10 16:34:53 -06:00
|
|
|
$(Q)+make -C dist/$(PKG_DIR)-build clean
|
2011-05-01 15:18:52 -05:00
|
|
|
$(Q)rm -Rf dist
|
|
|
|
@echo
|
|
|
|
@echo -----------------------------------------------
|
|
|
|
@echo $(PKG_TAR) ready for distribution
|
|
|
|
@echo -----------------------------------------------
|
|
|
|
|
2012-01-19 20:29:48 -06:00
|
|
|
endif
|