[PATCH] Strip binary on OSX when not configured with --enable-debug

Поиск
Список
Период
Сортировка
Искать

[PATCH] Strip binary on OSX when not configured with --enable-debug

От:
"Florian G. Pflug" <fgp@phlo.org>
Дата:
Вложения:
Hi

And another one ;-)
Since the autotools for some reason refuse to strip the binary (although it should
be stripped, according to "info automake"), I added a strip command to install-exec-hook.
The rename from pgadmin3 to pgAdmin3 is now in two stepts - first to tmp, then to pgAdmin3,
since some Version of OSX don't seem to like "mv a A".

greetings, Florian Pflug
Index: acinclude.m4
===================================================================
RCS file: /projects/pgadmin3/acinclude.m4,v
retrieving revision 1.44
diff -a -u -r1.44 acinclude.m4
--- acinclude.m4	12 Apr 2005 07:36:41 -0000	1.44
+++ acinclude.m4	14 Apr 2005 16:03:10 -0000
@@ -53,6 +53,7 @@
 CXXFLAGS="-Wall -g -O0"],
 [pg_debug_build=no])
 ])
+AC_SUBST(pg_debug_build)
 
 ############################
 # Static build of pgAdmin3 #
     then
         AC_MSG_ERROR([you need to install the ogl package from wxWindows/contrib/src/ogl with wxUSE_DEPRECATED=0])
         wx_wx_h="no"
Index: src/Makefile.am
===================================================================
RCS file: /projects/pgadmin3/src/Makefile.am,v
retrieving revision 1.103
diff -a -u -r1.103 Makefile.am
--- src/Makefile.am	12 Apr 2005 07:36:41 -0000	1.103
+++ src/Makefile.am	14 Apr 2005 16:03:11 -0000
@@ -210,6 +210,10 @@
 AM_CPPFLAGS = -Wall -g -I$(top_srcdir)/src/include -I$(top_srcdir)/src/agent/include -I$(top_srcdir)/src/slony/include
 AM_CFLAGS = -Wall -g -I$(top_srcdir)/src/include -I$(top_srcdir)/src/agent/include -I$(top_srcdir)/src/slony/include
 install-exec-hook:
-	(cd $(bindir); mv pgadmin3 "pgAdmin3")
-
+	cd $(bindir) ;\
+	mv pgadmin3 tmp ;\
+	mv tmp pgAdmin3 ;\
+	if test "$(pg_debug_build)" = "no"; then \
+		strip pgAdmin3 ;\
+	fi
 endif

Re: [PATCH] Strip binary on OSX when not configured with --enable-debug

От:
"Dave Page" <dpage@vale-housing.co.uk>
Дата:
Thanks, applied. And with that, I'm going home for a curry...

/D 

> -----Original Message-----
> From: pgadmin-hackers-owner@postgresql.org 
> [mailto:pgadmin-hackers-owner@postgresql.org] On Behalf Of 
> Florian G. Pflug
> Sent: 14 April 2005 17:09
> To: pgadmin-hackers
> Subject: [pgadmin-hackers] [PATCH] Strip binary on OSX when 
> not configured with --enable-debug
> 
> Hi
> 
> And another one ;-)
> Since the autotools for some reason refuse to strip the 
> binary (although it should
> be stripped, according to "info automake"), I added a strip 
> command to install-exec-hook.
> The rename from pgadmin3 to pgAdmin3 is now in two stepts - 
> first to tmp, then to pgAdmin3,
> since some Version of OSX don't seem to like "mv a A".
> 
> greetings, Florian Pflug
> 
FAQ