Restore and fix up the rules for building and uploading snapshots
removed in version 2.81 of Makefile.am

2011-03-30  Jon TURNEY  <[email protected]>

        * Makefile.am (release, snapshot, clean-local): Restore and fix up the
        rules for building and uploading snapshots

Signed-off-by: Jon TURNEY <[email protected]>
---
 Makefile.am |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 5cebab9..bd51002 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -293,6 +293,21 @@ setup_version.c : $(srcdir)/ChangeLog Makefile
 .rc.o:
        $(WINDRES) --include-dir $(srcdir) -o $@ $<
 
+# this target creates:
+#   setup-x.yyy.exe             (UPXed stripped exe)
+#   setup-debug-x.yyy.exe.gz    (gzipped unstripped exe)
+#   setup-x.yyy.tar.bz2         (source)
+release: setup.exe $(srcdir)/ChangeLog Makefile setup-src
+       cp -pf setup.exe setup-debug-${VER}.exe
+       gzip -f9 setup-debug-${VER}.exe
+       cp -pf setup.exe setup-${VER}.exe
+       $(STRIP) setup-${VER}.exe
+       upx --best setup-${VER}.exe
+
+# Create a snapshot and upload it (requires write access)
+snapshot: release
+       scp -C setup-${VER}.exe setup-debug-${VER}.exe.gz 
setup-${VER}-src.tar.bz2 
$${cygwinsite:-cygwin.com:/var/www/sourceware/htdocs/cygwin/setup/snapshots/}
+
 # static const char version_store[] = VERSION_PREFIX " 2.686";
 setup-src:
        @ver=setup-$$(sed -n 's/^static const char version_store.* 
VERSION_PREFIX " \([^"]*\)".*$$/\1/p' setup_version.c);\
@@ -303,3 +318,5 @@ setup-src:
        sort | tar -T - -cjf ${CURDIR}/$$ver-src.tar.bz2;\
        echo $$ver-src.tar.bz2; exec rm -f $$ver
 
+clean-local:
+       rm -f setup-*.exe setup-debug-*.exe.gz setup-*-src.tar.bz2
-- 
1.7.4

Reply via email to