r18572 - gnucash/trunk/src/bin - Bug #606077: Fix uncommon configure option --program-suffix.

Christian Stimming cstim at code.gnucash.org
Fri Jan 15 15:43:00 EST 2010


Author: cstim
Date: 2010-01-15 15:43:00 -0500 (Fri, 15 Jan 2010)
New Revision: 18572
Trac: http://svn.gnucash.org/trac/changeset/18572

Modified:
   gnucash/trunk/src/bin/Makefile.am
   gnucash/trunk/src/bin/gnucash-gdb.in
   gnucash/trunk/src/bin/gnucash-valgrind.in
   gnucash/trunk/src/bin/gnucash.in
Log:
Bug #606077: Fix uncommon configure option --program-suffix.

Patch by Peter Selinger:

OK, the attached patch fixes part of this problem. Specifically, it applies the
specified transform (from ./configure option --program-suffix,
--program-prefix, or --program-transform-name) to the files

src/bin/gnucash-valgrind
src/bin/gnucash-gdb
src/bin/gnucash

This is done in the Makefile at compile time.

In the end, I am not sure why the GnuCash configure.in provides the
--program-suffix mechanism at all, since apparently it hasn't been used in 10
years. According to info autoconf, these are supposed to be enabled by the
macro AC_ARG_PROGRAM, but I don't see this in configure.in. So perhaps it has
been enabled by accident and shouldn't really be there.

Modified: gnucash/trunk/src/bin/Makefile.am
===================================================================
--- gnucash/trunk/src/bin/Makefile.am	2010-01-15 20:38:33 UTC (rev 18571)
+++ gnucash/trunk/src/bin/Makefile.am	2010-01-15 20:43:00 UTC (rev 18572)
@@ -32,17 +32,24 @@
   ${top_builddir}/src/core-utils/libgnc-core-utils.la \
   ${top_builddir}/src/gnc-module/libgnc-module.la
 
+GNUCASH_BIN_INSTALL_NAME=`echo gnucash-bin | sed -e '$(transform)'`
+GNUCASH_SETUP_ENV_INSTALL_NAME=`echo gnucash-setup-env | sed -e '$(transform)'`
+
 gnucash: gnucash.in gnucash-setup-env ${top_builddir}/config.status Makefile
 	rm -f $@.tmp
 	sed < $< > $@.tmp \
-	    -e 's#@-BIN_DIR-@#${bindir}#g'
+	    -e 's#@-BIN_DIR-@#${bindir}#g' \
+	    -e "s#@-GNUCASH_SETUP_ENV_INSTALL_NAME-@#${GNUCASH_SETUP_ENV_INSTALL_NAME}#g" \
+	    -e "s#@-GNUCASH_BIN_INSTALL_NAME-@#${GNUCASH_BIN_INSTALL_NAME}#g"
 	mv $@.tmp $@
 	chmod u+x $@
 
 gnucash-gdb: gnucash-gdb.in gnucash-setup-env ${top_builddir}/config.status Makefile
 	rm -f $@.tmp
 	sed < $< > $@.tmp \
-	    -e 's#@-BIN_DIR-@#${bindir}#g'
+	    -e 's#@-BIN_DIR-@#${bindir}#g' \
+	    -e "s#@-GNUCASH_SETUP_ENV_INSTALL_NAME-@#${GNUCASH_SETUP_ENV_INSTALL_NAME}#g" \
+	    -e "s#@-GNUCASH_BIN_INSTALL_NAME-@#${GNUCASH_BIN_INSTALL_NAME}#g"
 	mv $@.tmp $@
 	chmod u+x $@
 
@@ -50,7 +57,9 @@
 	rm -f $@.tmp
 	sed < $< > $@.tmp \
 	    -e 's#@-BIN_DIR-@#${bindir}#g' \
-	    -e "s#@-TOP_SRC_DIR-@#`pwd`/${top_srcdir}#g"
+	    -e "s#@-TOP_SRC_DIR-@#`pwd`/${top_srcdir}#g" \
+	    -e "s#@-GNUCASH_SETUP_ENV_INSTALL_NAME-@#${GNUCASH_SETUP_ENV_INSTALL_NAME}#g" \
+	    -e "s#@-GNUCASH_BIN_INSTALL_NAME-@#${GNUCASH_BIN_INSTALL_NAME}#g"
 	mv $@.tmp $@
 	chmod u+x $@
 

Modified: gnucash/trunk/src/bin/gnucash-gdb.in
===================================================================
--- gnucash/trunk/src/bin/gnucash-gdb.in	2010-01-15 20:38:33 UTC (rev 18571)
+++ gnucash/trunk/src/bin/gnucash-gdb.in	2010-01-15 20:43:00 UTC (rev 18572)
@@ -1,5 +1,5 @@
 #!/bin/sh
 
-. @-BIN_DIR-@/gnucash-setup-env
+. @-BIN_DIR-@/@-GNUCASH_SETUP_ENV_INSTALL_NAME-@
 
-exec gdb gnucash-bin "$@"
+exec gdb @-GNUCASH_BIN_INSTALL_NAME-@ "$@"

Modified: gnucash/trunk/src/bin/gnucash-valgrind.in
===================================================================
--- gnucash/trunk/src/bin/gnucash-valgrind.in	2010-01-15 20:38:33 UTC (rev 18571)
+++ gnucash/trunk/src/bin/gnucash-valgrind.in	2010-01-15 20:43:00 UTC (rev 18572)
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-. @-BIN_DIR-@/gnucash-setup-env
+. @-BIN_DIR-@/@-GNUCASH_SETUP_ENV_INSTALL_NAME-@
 
 TOP_SRC_DIR="@-TOP_SRC_DIR-@"
 #
@@ -19,4 +19,4 @@
     --error-limit=no \
     --tool=memcheck \
 	--leak-check=full \
-    gnucash-bin "$@"
+    @-GNUCASH_BIN_INSTALL_NAME-@ "$@"

Modified: gnucash/trunk/src/bin/gnucash.in
===================================================================
--- gnucash/trunk/src/bin/gnucash.in	2010-01-15 20:38:33 UTC (rev 18571)
+++ gnucash/trunk/src/bin/gnucash.in	2010-01-15 20:43:00 UTC (rev 18572)
@@ -1,5 +1,5 @@
 #!/bin/sh
 
-. @-BIN_DIR-@/gnucash-setup-env
+. @-BIN_DIR-@/@-GNUCASH_SETUP_ENV_INSTALL_NAME-@
 
-exec gnucash-bin "$@"
+exec @-GNUCASH_BIN_INSTALL_NAME-@ "$@"



More information about the gnucash-changes mailing list