aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2011-03-21 13:42:14 -0700
committerGraydon Hoare <[email protected]>2011-03-21 13:42:37 -0700
commit5e0ef2a0f2593e48f47be60f44f2e3c9c6bfd3aa (patch)
treedcdb82fc71300e8a624c1c46000d8af67e93c1c9
parentPort testing variables. (diff)
downloadrust-5e0ef2a0f2593e48f47be60f44f2e3c9c6bfd3aa.tar.xz
rust-5e0ef2a0f2593e48f47be60f44f2e3c9c6bfd3aa.zip
Port tidy and remainder of pkg/dist rules.
-rw-r--r--Makefile.in53
1 files changed, 53 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in
index e2f15f67..0f4bb816 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -927,6 +927,52 @@ PKG_VER = $(shell date +"%Y-%m-%d")-snap
PKG_DIR = $(PKG_NAME)-$(PKG_VER)
PKG_TAR = $(PKG_DIR).tar.gz
+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
+
+PKG_FILES :=\
+ $(wildcard $(S)src/etc/*.*) \
+ $(S)LICENSE.txt $(S)README \
+ $(S)configure $(S)Makefile.in \
+ $(addprefix $(S)src/, \
+ README boot/README comp/README \
+ $(filter-out $(GENERATED), $(BOOT_MLS)) \
+ $(RUNTIME_CS) $(RUNTIME_HDR) \
+ $(LLVMEXT_CS) $(LLVMEXT_HDR) \
+ $(PKG_3RDPARTY)) \
+ $(COMPILER_INPUTS) \
+ $(STDLIB_INPUTS) \
+ $(ALL_TEST_INPUTS) \
+ $(GENERATED)
+
+dist: $(PKG_TAR)
+
+$(PKG_TAR):
+ @$(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)tar -c $(PKG_FILES) | tar -x -C dist/$(PKG_DIR)
+ @$(call E, configuring in dist/$(PKG_DIR)-build)
+ $(Q)mkdir -p dist/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 -----------------------------------------------
+
######################################################################
# Cleanup
@@ -934,6 +980,13 @@ PKG_TAR = $(PKG_DIR).tar.gz
.PHONY: clean
+tidy:
+ @$(call E, check: formatting)
+ $(Q)python $(S)src/etc/tidy.py \
+ $(filter-out $(GENERATED) \
+ $(addprefix $(S)src/, $(LLVMEXT_CS) $(LLVMEXT_HDR) $(PKG_3RDPARTY)) \
+ $(S)src/etc/%, $(PKG_FILES))
+
clean:
@$(call E, cleaning)
$(Q)rm -f $(RUNTIME_OBJS)