From b9d154a2688cb180004f2122fc85b2e5ea829547 Mon Sep 17 00:00:00 2001 From: Jon Turney Date: Tue, 2 May 2017 15:54:09 +0100 Subject: [PATCH] Add Makefile rule to rename build products to form used when uploading Also clean all .dbg and .exe files --- Makefile.am | 10 ++++++++++ configure.ac | 3 +++ 2 files changed, 13 insertions(+) diff --git a/Makefile.am b/Makefile.am index a947a781..9b119172 100644 --- a/Makefile.am +++ b/Makefile.am @@ -273,6 +273,7 @@ inilint_SOURCES = \ GITVER := $(shell cd $(srcdir) && git describe --match release_\* --abbrev=6 --dirty || "N/A") VER := $(subst release_,,$(GITVER)) +ARCH := @ARCH@ setup_version.c : Makefile @echo "Setup version: " $(VER) @@ -301,9 +302,18 @@ strip: all $(OBJCOPY) --strip-all setup$(EXEEXT) $(OBJCOPY) --add-gnu-debuglink=setup.dbg setup$(EXEEXT) setup$(EXEEXT) +CLEANFILES += setup.dbg + upx: strip @if [ -e `which upx` ]; then\ upx --best --lzma setup$(EXEEXT) ;\ else \ echo "UPX doesn't seem to be installed, cannot compress setup$(EXEEXT)." ;\ fi + +release: upx + cp setup.dbg setup-${VER}.${ARCH}.dbg + cp setup${EXEEXT} setup-${VER}.${ARCH}${EXEEXT} + +clean-local: + rm -f setup*${EXEEXT} setup*.dbg diff --git a/configure.ac b/configure.ac index 42ad3e2d..ab548c09 100644 --- a/configure.ac +++ b/configure.ac @@ -74,15 +74,18 @@ dnl add portability sources to inilint case "$host" in i?86-*-mingw32) SETUP="setup" + ARCH="x86" ;; x86_64-*-mingw32) SETUP="setup" + ARCH="x86_64" ;; *) AC_MSG_ERROR([Cygwin Setup can only be built for Win32 or Win64 hosts]) ;; esac AC_SUBST(SETUP) +AC_SUBST(ARCH) AC_CONFIG_FILES([Makefile tests/Makefile]) AC_OUTPUT -- 2.43.5