[Gnucash-changes] r12281 - gnucash/trunk - Add a script to invoke the new gnucash.bin executable via valgrind.

David Hampton hampton at cvs.gnucash.org
Sat Jan 7 01:18:14 EST 2006


Author: hampton
Date: 2006-01-07 01:18:14 -0500 (Sat, 07 Jan 2006)
New Revision: 12281
Trac: http://svn.gnucash.org/trac/changeset/12281

Added:
   gnucash/trunk/src/bin/gnucash-valgrind.in
Modified:
   gnucash/trunk/ChangeLog
   gnucash/trunk/src/bin/
   gnucash/trunk/src/bin/Makefile.am
Log:
Add a script to invoke the new gnucash.bin executable via valgrind.


Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2006-01-07 06:00:05 UTC (rev 12280)
+++ gnucash/trunk/ChangeLog	2006-01-07 06:18:14 UTC (rev 12281)
@@ -1,5 +1,9 @@
 2006-01-07  David Hampton  <hampton at employees.org>
 
+	* src/bin/gnucash-valgrind.in:
+	* src/bin/Makefile.am: Add a script to invoke the new gnucash.bin
+	executable via valgrind.
+
 	* src/gnome/window-main-summarybar.c: Performance enhancements.
 	Remove the model from the combo box before clearing and
 	repopulating it.


Property changes on: gnucash/trunk/src/bin
___________________________________________________________________
Name: svn:ignore
   - .deps
.libs
*.diff
*.diffs
*.patch
*.log
*.xac.*.xac
Makefile
Makefile.in
gnucash
gnucash-env
gnucash-make-guids
gnucash-run-script
strsub
update-gnucash-gconf
semantic.cache

   + .deps
.libs
*.diff
*.diffs
*.patch
*.log
*.xac.*.xac
Makefile
Makefile.in
gnucash
gnucash-bin
gnucash-env
gnucash-make-guids
gnucash-run-script
gnucash-valgrind
strsub
update-gnucash-gconf
semantic.cache


Modified: gnucash/trunk/src/bin/Makefile.am
===================================================================
--- gnucash/trunk/src/bin/Makefile.am	2006-01-07 06:00:05 UTC (rev 12280)
+++ gnucash/trunk/src/bin/Makefile.am	2006-01-07 06:18:14 UTC (rev 12281)
@@ -20,8 +20,23 @@
 	    -e 's:@-GNC_MODULE_DIR-@:${GNC_MODULE_DIR}:g'
 	mv $@.tmp $@
 	chmod u+x $@
-CLEANFILES = gnucash
 
+gnucash-valgrind: gnucash-valgrind.in ${top_builddir}/config.status
+	rm -f $@.tmp
+	sed < $< > $@.tmp \
+	    -e 's:@-BIN_DIR-@:${bindir}:g' \
+	    -e 's:@-G_WRAP_MODULE_DIR-@:${G_WRAP_MODULE_DIR}:g' \
+	    -e 's:@-G_WRAP_LIB_DIR-@:${G_WRAP_LIB_DIR}:g' \
+	    -e 's:@-GNC_GUILE_MODULE_DIR-@:${GNC_SHAREDIR}/guile-modules:g' \
+	    -e 's:@-GNC_SCM_INSTALL_DIR-@:${GNC_SCM_INSTALL_DIR}:g' \
+            -e 's:@-GNC_LIB_INSTALLDIR-@:${libdir}:' \
+            -e 's:@-GNC_PKGLIB_INSTALLDIR-@:${pkglibdir}:g' \
+	    -e 's:@-GNC_MODULE_DIR-@:${GNC_MODULE_DIR}:g'
+	mv $@.tmp $@
+	chmod u+x $@
+
+CLEANFILES = gnucash gnucash-valgrind
+
 # We handle gnucash scripts in a somewhat unexpected way, but we do
 # this so that a user who doesn't necessarily have the right
 # directories in their path can still invoke these commands via their
@@ -39,7 +54,7 @@
 # by these top-level "common" scripts.
 gnc_common_scripts = gnucash-env gnucash-run-script gnucash-make-guids
 
-bin_SCRIPTS = ${gnc_common_scripts} update-gnucash-gconf gnucash
+bin_SCRIPTS = ${gnc_common_scripts} update-gnucash-gconf gnucash gnucash-valgrind
 
 # if you change gncoverridedir, make sure you change ./overrides/Makefile.am too.
 gncoverridesdir = ${GNC_LIBEXECDIR}/overrides

Added: gnucash/trunk/src/bin/gnucash-valgrind.in
===================================================================
--- gnucash/trunk/src/bin/gnucash-valgrind.in	2006-01-07 06:00:05 UTC (rev 12280)
+++ gnucash/trunk/src/bin/gnucash-valgrind.in	2006-01-07 06:18:14 UTC (rev 12281)
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+PATH="@-BIN_DIR-@:${PATH}"
+export PATH
+
+GUILE_WARN_DEPRECATED="no"
+export GUILE_WARN_DEPRECATED
+
+GNC_MODULE_PATH="@-GNC_PKGLIB_INSTALLDIR-@:${GNC_MODULE_PATH}"
+
+EXTRA_PATH="@-G_WRAP_MODULE_DIR-@"
+EXTRA_PATH="${EXTRA_PATH}:@-GNC_GUILE_MODULE_DIR-@"
+EXTRA_PATH="${EXTRA_PATH}:@-GNC_SCM_INSTALL_DIR-@"
+GUILE_LOAD_PATH="${EXTRA_PATH}:${GUILE_LOAD_PATH}"
+
+EXTRA_LIBS="${GNC_MODULE_PATH}"
+EXTRA_LIBS="${EXTRA_LIBS}:@-GNC_LIB_INSTALLDIR-@"
+EXTRA_LIBS="${EXTRA_LIBS}:@-GNC_MODULE_DIR-@"
+EXTRA_LIBS="${EXTRA_LIBS}:@-G_WRAP_LIB_DIR-@"
+
+LD_LIBRARY_PATH="${EXTRA_LIBS}:${LD_LIBRARY_PATH}"
+LTDL_LIBRARY_PATH="${EXTRA_LIBS}:${LTDL_LIBRARY_PATH}"
+
+export GNC_MODULE_PATH
+export GUILE_LOAD_PATH
+export LD_LIBRARY_PATH
+export LTDL_LIBRARY_PATH
+
+exec valgrind -v \
+    --suppressions=./src/valgrind-gnucash.supp  \
+    --error-limit=no \
+    --tool=callgrind \
+    --instr-atstart=no \
+    --collect-atstart=no \
+    gnucash-bin "$@"



More information about the gnucash-changes mailing list