[gnome-documents] debug: fold gnome-documents-debug script into main script
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] debug: fold gnome-documents-debug script into main script
- Date: Mon, 17 Dec 2012 16:23:55 +0000 (UTC)
commit 48dc876d33e444be84b04b4a17ba977a38a728ae
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Mon Dec 17 17:07:16 2012 +0100
debug: fold gnome-documents-debug script into main script
Just use DOCUMENTS_RUN_DEBUG=1 if you want to run it under gdb.
src/Makefile.am | 10 ++--------
src/gnome-documents-debug.in | 29 -----------------------------
src/gnome-documents.in | 7 ++++++-
3 files changed, 8 insertions(+), 38 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 204fa88..b015e5a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -60,21 +60,15 @@ typelib_DATA += $(gir_DATA:.gir=.typelib)
CLEANFILES += $(gir_DATA) $(typelib_DATA)
bin_SCRIPTS = gnome-documents
-noinst_SCRIPTS = gnome-documents-debug
gnome-documents: gnome-documents.in
$(AM_V_GEN) $(do_subst) $< > $@
chmod +x $@
-gnome-documents-debug: gnome-documents-debug.in
- $(AM_V_GEN) $(do_subst) $< > $@
- chmod +x $@
CLEANFILES += \
- gnome-documents \
- gnome-documents-debug
+ gnome-documents
EXTRA_DIST += \
- gnome-documents.in \
- gnome-documents-debug.in
+ gnome-documents.in
service_in_files = org.gnome.Documents.SearchProvider.service.in
diff --git a/src/gnome-documents.in b/src/gnome-documents.in
index 9115aae..ace43af 100644
--- a/src/gnome-documents.in
+++ b/src/gnome-documents.in
@@ -12,4 +12,9 @@ if test x"$GJS_DEBUG_TOPICS" = x ; then
export GJS_DEBUG_TOPICS="JS ERROR;JS LOG"
fi
-exec @GJS_CONSOLE@ -I @pkgdatadir@/js -c "const Main = imports.main; Main.start();" "$@"
+DEBUG_COMMAND=""
+if test x"$DOCUMENTS_RUN_DEBUG" != x; then
+ DEBUG_COMMAND="gdb --args"
+fi
+
+exec $DEBUG_COMMAND @GJS_CONSOLE@ -I @pkgdatadir@/js -c "const Main = imports.main; Main.start();" "$@"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]