2011-05-01 15:18:52 -05:00
|
|
|
######################################################################
|
|
|
|
# Distribution
|
|
|
|
######################################################################
|
|
|
|
|
2011-07-23 14:26:47 -05:00
|
|
|
|
2011-05-01 15:18:52 -05:00
|
|
|
PKG_NAME := rust
|
|
|
|
PKG_VER = $(shell date +"%Y-%m-%d")-snap
|
|
|
|
PKG_DIR = $(PKG_NAME)-$(PKG_VER)
|
|
|
|
PKG_TAR = $(PKG_DIR).tar.gz
|
|
|
|
|
2011-07-23 14:26:47 -05:00
|
|
|
ifdef CFG_MAKENSIS
|
|
|
|
PKG_NSI = $(S)src/etc/pkg/rust.nsi
|
|
|
|
PKG_EXE = $(PKG_DIR)-install.exe
|
|
|
|
endif
|
|
|
|
|
2011-05-01 15:18:52 -05:00
|
|
|
PKG_3RDPARTY := rt/valgrind.h rt/memcheck.h \
|
|
|
|
rt/isaac/rand.h rt/isaac/standard.h \
|
|
|
|
rt/uthash/uthash.h rt/uthash/utlist.h \
|
|
|
|
rt/bigint/bigint.h rt/bigint/bigint_int.cpp \
|
|
|
|
rt/bigint/bigint_ext.cpp rt/bigint/low_primes.h
|
|
|
|
|
2011-10-05 19:41:01 -05:00
|
|
|
PKG_UV := \
|
2011-11-08 16:36:19 -06:00
|
|
|
$(wildcard $(S)src/libuv/*) \
|
|
|
|
$(wildcard $(S)src/libuv/include/*) \
|
|
|
|
$(wildcard $(S)src/libuv/include/*/*) \
|
|
|
|
$(wildcard $(S)src/libuv/src/*) \
|
|
|
|
$(wildcard $(S)src/libuv/src/*/*) \
|
|
|
|
$(wildcard $(S)src/libuv/src/*/*/*)
|
2011-10-05 19:41:01 -05:00
|
|
|
|
|
|
|
PKG_PP_EXAMPLES = $(wildcard $(S)src/test/pretty/*.pp)
|
|
|
|
|
2011-05-01 15:18:52 -05:00
|
|
|
PKG_FILES = \
|
|
|
|
$(wildcard $(S)src/etc/*.*) \
|
|
|
|
$(S)LICENSE.txt $(S)README \
|
|
|
|
$(S)configure $(S)Makefile.in \
|
2011-10-05 19:41:01 -05:00
|
|
|
$(S)src/snapshots.txt \
|
2011-05-01 15:18:52 -05:00
|
|
|
$(addprefix $(S)src/, \
|
2011-05-03 17:51:21 -05:00
|
|
|
README comp/README \
|
2011-05-01 15:18:52 -05:00
|
|
|
$(RUNTIME_CS) $(RUNTIME_HDR) \
|
2011-10-05 19:41:01 -05:00
|
|
|
$(RUNTIME_S) \
|
|
|
|
rt/rustrt.def.in \
|
|
|
|
rt/intrinsics/intrinsics.ll.in \
|
2011-05-01 15:18:52 -05:00
|
|
|
$(RUSTLLVM_LIB_CS) $(RUSTLLVM_OBJS_CS) \
|
|
|
|
$(RUSTLLVM_HDR) \
|
2011-10-05 19:41:01 -05:00
|
|
|
rustllvm/rustllvm.def.in \
|
2011-05-01 15:18:52 -05:00
|
|
|
$(PKG_3RDPARTY)) \
|
2011-10-05 19:41:01 -05:00
|
|
|
$(PKG_UV) \
|
2011-05-01 15:18:52 -05:00
|
|
|
$(COMPILER_INPUTS) \
|
2011-12-05 18:46:37 -06:00
|
|
|
$(CORELIB_INPUTS) \
|
2011-05-01 15:18:52 -05:00
|
|
|
$(STDLIB_INPUTS) \
|
|
|
|
$(ALL_TEST_INPUTS) \
|
2011-10-05 19:41:01 -05:00
|
|
|
$(FUZZER_CRATE) \
|
|
|
|
$(FUZZER_INPUTS) \
|
|
|
|
$(COMPILETEST_CRATE) \
|
|
|
|
$(COMPILETEST_INPUTS) \
|
2011-12-01 13:31:29 -06:00
|
|
|
$(CARGO_CRATE) \
|
|
|
|
$(CARGO_INPUTS) \
|
2011-10-05 19:41:01 -05:00
|
|
|
$(PKG_PP_EXAMPLES) \
|
2011-11-23 17:20:28 -06:00
|
|
|
$(MKFILE_DEPS)
|
2011-05-01 15:18:52 -05:00
|
|
|
|
2011-07-23 14:26:47 -05:00
|
|
|
dist: $(PKG_TAR) $(PKG_EXE)
|
|
|
|
|
|
|
|
nsis-dist: $(PKG_EXE)
|
|
|
|
|
|
|
|
lic.txt: $(S)LICENSE.txt
|
|
|
|
@$(call E, crlf: $@)
|
2011-10-07 14:06:17 -05:00
|
|
|
@$(Q)perl -pe 's@\r\n|\n@\r\n@go' <$< >$@
|
2011-07-23 14:26:47 -05:00
|
|
|
|
2011-10-07 14:06:17 -05:00
|
|
|
$(PKG_EXE): $(PKG_NSI) $(PKG_FILES) $(DOCS) $(SREQ3$(CFG_HOST_TRIPLE)) lic.txt
|
2011-07-23 14:26:47 -05:00
|
|
|
@$(call E, makensis: $@)
|
|
|
|
$(Q)makensis -NOCD -V1 "-XOutFile $@" "-XLicenseData lic.txt" $<
|
|
|
|
$(Q)rm -f lic.txt
|
2011-05-01 15:18:52 -05: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)
|
|
|
|
$(Q)tar -c $(PKG_FILES) | tar -x -C dist/$(PKG_DIR)
|
|
|
|
$(Q)tar -czf $(PKG_TAR) -C dist $(PKG_DIR)
|
|
|
|
$(Q)rm -Rf dist
|
|
|
|
|
|
|
|
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)
|
|
|
|
$(Q)make -C dist/$(PKG_DIR)-build check
|
|
|
|
@$(call E, making 'clean' in dist/$(PKG_DIR)-build)
|
|
|
|
$(Q)make -C dist/$(PKG_DIR)-build clean
|
|
|
|
$(Q)rm -Rf dist
|
|
|
|
@echo
|
|
|
|
@echo -----------------------------------------------
|
|
|
|
@echo $(PKG_TAR) ready for distribution
|
|
|
|
@echo -----------------------------------------------
|
|
|
|
|
|
|
|
|