@@ -927,13 +927,66 @@ PKG_VER = $(shell date +"%Y-%m-%d")-snap
927
927
PKG_DIR = $(PKG_NAME ) -$(PKG_VER )
928
928
PKG_TAR = $(PKG_DIR ) .tar.gz
929
929
930
+ PKG_3RDPARTY := rt/valgrind.h rt/memcheck.h \
931
+ rt/isaac/rand.h rt/isaac/standard.h \
932
+ rt/uthash/uthash.h rt/uthash/utlist.h \
933
+ rt/bigint/bigint.h rt/bigint/bigint_int.cpp \
934
+ rt/bigint/bigint_ext.cpp rt/bigint/low_primes.h
935
+
936
+ PKG_FILES :=\
937
+ $(wildcard $(S ) src/etc/* .* ) \
938
+ $(S ) LICENSE.txt $(S ) README \
939
+ $(S ) configure $(S ) Makefile.in \
940
+ $(addprefix $(S ) src/, \
941
+ README boot/README comp/README \
942
+ $(filter-out $(GENERATED ) , $(BOOT_MLS ) ) \
943
+ $(RUNTIME_CS ) $(RUNTIME_HDR ) \
944
+ $(LLVMEXT_CS ) $(LLVMEXT_HDR ) \
945
+ $(PKG_3RDPARTY ) ) \
946
+ $(COMPILER_INPUTS ) \
947
+ $(STDLIB_INPUTS ) \
948
+ $(ALL_TEST_INPUTS ) \
949
+ $(GENERATED )
950
+
951
+ dist : $(PKG_TAR )
952
+
953
+ $(PKG_TAR ) :
954
+ @$(call E, making dist dir)
955
+ $(Q ) rm -Rf dist
956
+ $(Q ) mkdir -p dist/$(PKG_DIR )
957
+ $(Q ) tar -c $(PKG_FILES ) | tar -x -C dist/$(PKG_DIR )
958
+ $(Q ) tar -czf $(PKG_TAR ) -C dist $(PKG_DIR )
959
+ $(Q ) rm -Rf dist
960
+
961
+ distcheck : $(PKG_TAR )
962
+ $(Q ) tar -c $(PKG_FILES ) | tar -x -C dist/$(PKG_DIR )
963
+ @$(call E, configuring in dist/$(PKG_DIR ) -build)
964
+ $(Q ) mkdir -p dist/build
965
+ $(Q ) cd dist/$(PKG_DIR ) -build && ../$(PKG_DIR ) /configure
966
+ @$(call E, making 'check' in dist/$(PKG_DIR ) -build)
967
+ $(Q ) make -C dist/$(PKG_DIR ) -build check
968
+ @$(call E, making 'clean' in dist/$(PKG_DIR ) -build)
969
+ $(Q ) make -C dist/$(PKG_DIR ) -build clean
970
+ $(Q ) rm -Rf dist
971
+ @echo
972
+ @echo -----------------------------------------------
973
+ @echo $(PKG_TAR ) ready for distribution
974
+ @echo -----------------------------------------------
975
+
930
976
931
977
# #####################################################################
932
978
# Cleanup
933
979
# #####################################################################
934
980
935
981
.PHONY : clean
936
982
983
+ tidy :
984
+ @$(call E, check: formatting)
985
+ $(Q ) python $(S ) src/etc/tidy.py \
986
+ $(filter-out $(GENERATED) \
987
+ $(addprefix $(S)src/, $(LLVMEXT_CS) $(LLVMEXT_HDR) $(PKG_3RDPARTY)) \
988
+ $(S)src/etc/%, $(PKG_FILES))
989
+
937
990
clean :
938
991
@$(call E, cleaning)
939
992
$(Q ) rm -f $(RUNTIME_OBJS )
0 commit comments