From 4055100734ee28f599880f41b9ea09267605ccbf Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Sat, 14 Jan 2012 18:46:49 +0000 Subject: [PATCH] Implement 'make dist' Originally committed to SVN as r6299. --- aegisub/Makefile.inc.in | 3 +++ aegisub/Makefile.target | 6 +++++- aegisub/configure.in | 9 +++++---- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/aegisub/Makefile.inc.in b/aegisub/Makefile.inc.in index 825d643ff..bfc8ec3ce 100644 --- a/aegisub/Makefile.inc.in +++ b/aegisub/Makefile.inc.in @@ -41,6 +41,7 @@ LIB_SHARED_LINK_OSX = -dynamiclib -Wl,-undefined -Wl,dynamic_lookup -compatibili AEGISUB_COMMAND = @AEGISUB_COMMAND@ AEGISUB_VERSION_DATA = @AEGISUB_VERSION_DATA@ BUILD_DATE = @BUILD_DATE@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_DEBUG = @PACKAGE_DEBUG@ SVN_REVISION = @SVN_REVISION@ # OS X @@ -151,3 +152,5 @@ BIN_MKDIR = mkdir BIN_MKDIR_P = mkdir -p BIN_ECHO = echo BIN_TOUCH = touch +BIN_TAR = tar +BIN_GZIP = gzip diff --git a/aegisub/Makefile.target b/aegisub/Makefile.target index 4b465adae..7c7866e51 100644 --- a/aegisub/Makefile.target +++ b/aegisub/Makefile.target @@ -108,12 +108,16 @@ endif ############## # DISTRIBUTION ############## +dist: distdir + @$(BIN_TAR) chf - --posix "$(PACKAGE_TARNAME)" | $(BIN_GZIP) -c > "$(PACKAGE_TARNAME).tar.gz" + @rm -rf $(PACKAGE_TARNAME) + distdir: @if ! test -f packages/distfile/distfile.sh; then \ echo "Please run this from the parent directory."; \ exit 1; \ fi - ${SHELL} packages/distfile/distfile.sh $(MAKE) aegisub-pkg + @${SHELL} packages/distfile/distfile.sh $(MAKE) $(PACKAGE_TARNAME) distfiles: $(SUBDIRS) @for i in $(SRC) $(HEADER) $(PO) $(EXTRA_DIST); do \ diff --git a/aegisub/configure.in b/aegisub/configure.in index 257422a88..0bc7d5bde 100644 --- a/aegisub/configure.in +++ b/aegisub/configure.in @@ -177,16 +177,17 @@ AC_DEFINE_UNQUOTED([BUILD_SVN_REVISION], [$SVN_REVISION], [SVN Revision number, # Release information. AS_IF([test "aegisub_FINAL_RELEASE" = "1"], [ AC_DEFINE([FINAL_RELEASE], [aegisub_FINAL_RELEASE], [This is only set to 1 for a RELEASE VERSION.]) - BUNDLE_STRING="Aegisub" - DMG_STRING="Aegisub-${PACKAGE_VERSION}-${arch_bundle}" + BUNDLE_STRING="${PACKAGE_NAME}" + DMG_STRING="${PACKAGE_NAME}-${PACKAGE_VERSION}-${arch_bundle}" ], [ PACKAGE_STRING="${PACKAGE_STRING}-dev-r${SVN_REVISION}" PACKAGE_VERSION="${PACKAGE_VERSION}-dev-r${SVN_REVISION}" VERSION="${VERSION}-dev-r${SVN_REVISION}" - BUNDLE_STRING="Aegisub-${PACKAGE_VERSION}" - DMG_STRING="Aegisub-${PACKAGE_VERSION}-${arch_bundle}" + BUNDLE_STRING="${PACKAGE_NAME}-${PACKAGE_VERSION}" + DMG_STRING="${PACKAGE_NAME}-${PACKAGE_VERSION}-${arch_bundle}" ]) +PACKAGE_TARNAME="${PACKAGE_TARNAME}-${PACKAGE_VERSION}" # Used in version.cpp AC_MSG_CHECKING([for build date])