2011-05-01 22:18:52 +02:00
|
|
|
######################################################################
|
|
|
|
# Distribution
|
|
|
|
######################################################################
|
|
|
|
|
|
|
|
PKG_NAME := rust
|
2012-01-18 01:49:44 +01:00
|
|
|
PKG_DIR = $(PKG_NAME)-$(CFG_RELEASE)
|
2011-05-01 22:18:52 +02:00
|
|
|
PKG_TAR = $(PKG_DIR).tar.gz
|
|
|
|
|
2012-01-26 01:02:53 +01:00
|
|
|
ifdef CFG_ISCC
|
|
|
|
PKG_ISS = $(wildcard $(S)src/etc/pkg/*.iss)
|
|
|
|
PKG_ICO = $(S)src/etc/pkg/rust-logo.ico
|
2011-07-23 21:26:47 +02:00
|
|
|
PKG_EXE = $(PKG_DIR)-install.exe
|
|
|
|
endif
|
|
|
|
|
2012-01-19 03:19:47 +01:00
|
|
|
PKG_GITMODULES := $(S)src/libuv $(S)src/llvm
|
2011-10-06 02:41:01 +02:00
|
|
|
|
2012-01-19 02:25:54 +01:00
|
|
|
PKG_FILES := \
|
2012-07-10 20:05:53 +02:00
|
|
|
$(S)LICENSE.txt $(S)README.md \
|
2011-05-01 22:18:52 +02:00
|
|
|
$(S)configure $(S)Makefile.in \
|
2012-01-20 21:06:14 +01:00
|
|
|
$(S)man \
|
2012-01-19 02:25:54 +01:00
|
|
|
$(S)doc \
|
2011-05-01 22:18:52 +02:00
|
|
|
$(addprefix $(S)src/, \
|
2012-01-18 01:49:44 +01:00
|
|
|
README.txt \
|
2012-01-10 23:34:53 +01:00
|
|
|
cargo \
|
2012-10-03 03:15:02 +02:00
|
|
|
rusti \
|
2012-02-29 20:46:23 +01:00
|
|
|
rustc \
|
2012-01-10 23:34:53 +01:00
|
|
|
compiletest \
|
|
|
|
etc \
|
|
|
|
fuzzer \
|
|
|
|
libcore \
|
2012-05-30 06:35:12 +02:00
|
|
|
libsyntax \
|
2012-01-10 23:34:53 +01:00
|
|
|
libstd \
|
|
|
|
rt \
|
|
|
|
rustdoc \
|
|
|
|
rustllvm \
|
|
|
|
snapshots.txt \
|
|
|
|
test) \
|
|
|
|
$(PKG_GITMODULES) \
|
2012-03-28 20:29:38 +02:00
|
|
|
$(filter-out Makefile config.stamp config.mk, \
|
|
|
|
$(MKFILE_DEPS))
|
2011-05-01 22:18:52 +02:00
|
|
|
|
2012-01-19 02:25:54 +01:00
|
|
|
UNROOTED_PKG_FILES := $(patsubst $(S)%,./%,$(PKG_FILES))
|
2011-07-23 21:26:47 +02:00
|
|
|
|
2012-01-26 01:02:53 +01:00
|
|
|
ifdef CFG_ISCC
|
|
|
|
LICENSE.txt: $(S)LICENSE.txt
|
|
|
|
cp $< $@
|
2011-07-23 21:26:47 +02:00
|
|
|
|
2012-01-26 01:02:53 +01: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 \
|
|
|
|
$(PKG_FILES) all rustc-stage3
|
|
|
|
@$(call E, ISCC: $@)
|
|
|
|
$(Q)"$(CFG_ISCC)" $<
|
2012-01-20 06:27:14 +01:00
|
|
|
endif
|
2011-05-01 22:18:52 +02:00
|
|
|
|
2012-01-26 01:02:53 +01:00
|
|
|
|
2011-07-23 21:26:47 +02:00
|
|
|
$(PKG_TAR): $(PKG_FILES)
|
2011-05-01 22:18:52 +02:00
|
|
|
@$(call E, making dist dir)
|
|
|
|
$(Q)rm -Rf dist
|
|
|
|
$(Q)mkdir -p dist/$(PKG_DIR)
|
2012-01-19 19:52:04 +01: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 22:18:52 +02:00
|
|
|
$(Q)tar -czf $(PKG_TAR) -C dist $(PKG_DIR)
|
|
|
|
$(Q)rm -Rf dist
|
|
|
|
|
2012-01-26 01:02:53 +01:00
|
|
|
.PHONY: dist distcheck
|
2012-01-18 01:49:44 +01:00
|
|
|
|
2012-01-20 03:29:48 +01:00
|
|
|
ifdef CFG_WINDOWSY
|
|
|
|
|
|
|
|
dist: $(PKG_EXE)
|
|
|
|
|
|
|
|
distcheck: dist
|
|
|
|
@echo
|
|
|
|
@echo -----------------------------------------------
|
|
|
|
@echo $(PKG_EXE) ready for distribution
|
|
|
|
@echo -----------------------------------------------
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
dist: $(PKG_TAR)
|
2012-01-18 01:49:44 +01:00
|
|
|
|
2011-05-01 22:18:52 +02: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 23:34:53 +01:00
|
|
|
$(Q)+make -C dist/$(PKG_DIR)-build check
|
2011-05-01 22:18:52 +02:00
|
|
|
@$(call E, making 'clean' in dist/$(PKG_DIR)-build)
|
2012-01-10 23:34:53 +01:00
|
|
|
$(Q)+make -C dist/$(PKG_DIR)-build clean
|
2011-05-01 22:18:52 +02:00
|
|
|
$(Q)rm -Rf dist
|
|
|
|
@echo
|
|
|
|
@echo -----------------------------------------------
|
|
|
|
@echo $(PKG_TAR) ready for distribution
|
|
|
|
@echo -----------------------------------------------
|
|
|
|
|
2012-01-20 03:29:48 +01:00
|
|
|
endif
|