Corinna Vinschen writes:
> On Nov  2 16:29, Achim Gratz wrote:
>> 
>> As discussed on the main Cygwin list:
>> http://repo.or.cz/w/cygwin-setup.git/patch/2acb43b4f0d251b1f22513e63b6ade7063f3f3e1
>
> Please, send the patch with a short description and a ChangeLog entry
> to the mailing list, as usual.

* setup/Makefile.am: Provide new targets "strip" and "upx" to remove
  debugging symbols and compress the executable using UPX,
  respectively.  Check for an executable "upx" in path and bail with a
  warning message if not found.

* setup/README: Change the description of how to produce stripped and
  compressed binaries to use the new make targets.
---
 Makefile.am |   11 +++++++++++
 README      |    9 +++++----
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 5b19714..fc5cc95 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -298,3 +298,14 @@ setup-src:
        sort | tar -T - -cjf ${CURDIR}/$$ver-src.tar.bz2;\
        echo $$ver-src.tar.bz2; exec rm -f $$ver
 
+# optional: strip and compress executable
+.PHONY:        strip upx
+
+strip: all
+       $(STRIP) -s setup$(EXEEXT)
+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
diff --git a/README b/README
index 05a6c18..b1586de 100644
--- a/README
+++ b/README
@@ -31,10 +31,11 @@ Build commands:
 2) $ make
 
 3) Wondering why your binary is so much bigger than the official releases?
-   Remove debugging symbols:
-   $ strip -s setup.exe
-   Compress using UPX:
-   $ upx -9 setup.exe
+   This removes debugging symbols:
+   $ make strip
+   This additionally compresses it using UPX
+   (requires package upx to be installed):
+   $ make upx
 
 CODING GUIDELINES:
 ------------------



Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

Wavetables for the Terratec KOMPLEXER:
http://Synth.Stromeko.net/Downloads.html#KomplexerWaves

Reply via email to