Bug : 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.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18572 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2010-01-15 20:43:00 +00:00
parent 53dd0f605a
commit a2b3b35227
4 changed files with 18 additions and 9 deletions

View File

@ -32,17 +32,24 @@ gnucash_bin_LDADD = \
${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 @@ gnucash-valgrind: gnucash-valgrind.in ${top_builddir}/config.status Makefile
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 $@

View File

@ -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-@ "$@"

View File

@ -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 @@ exec valgrind -v \
--error-limit=no \
--tool=memcheck \
--leak-check=full \
gnucash-bin "$@"
@-GNUCASH_BIN_INSTALL_NAME-@ "$@"

View File

@ -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-@ "$@"