From ace3d5f898ff05a60641afc12c8c5b6c50cc092b Mon Sep 17 00:00:00 2001 From: John Toman Date: Sat, 15 Aug 2009 19:56:41 +0000 Subject: [PATCH] adds the --debug config option to compile in debugging messages, adds better support for install paths git-svn-id: svn://svn.code.sf.net/p/qjoypad/code/trunk@103 c05e91a0-76c8-4ec0-b377-ef19ce7cc080 --- src/config | 14 +++++++++----- src/qjoypad.pro | 6 +++--- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/src/config b/src/config index 33d4876..759ae64 100755 --- a/src/config +++ b/src/config @@ -5,7 +5,7 @@ devdir="/dev/input" prefix="/usr/local" installdir=""; plain_keys="" - +debug_option=""; for arg in $* do case $arg in @@ -28,6 +28,9 @@ Options: --install-dir=DIR Sets an optional installation path that will be prepended to prefix during installation. + --debug Causes Qjoypad to spit out debugging messages (debug messages + will be compiled in; to get rid of the messages you'll have + to recompile). --help Show this message. "; exit 0;; --devdir=*) devdir=${arg##*=} @@ -49,17 +52,18 @@ Options: exit 1 fi;; --plain_keys) plain_keys="PLAIN_KEYS";; + --debug) + debug_option+="_DEBUG";; *) echo "Unrecognized argument: \"$arg\". Try ./config --help for help." esac done arg1="DEVDIR=$devdir" arg2="PREFIX=$prefix" -arg3="DEFINES += $plain_keys" -arg4="DESTDIR=${installdir}/${prefix}/bin" -arg5="INSTALL=$installdir" +arg3="DEFINES += $plain_keys $debug_option" +arg4="INSTALL_PREFIX=${installdir}/${prefix}/" -qmake -makefile "$arg1" "$arg2" "$arg3" "$arg4" "$arg5" qjoypad.pro +qmake -makefile "$arg1" "$arg2" "$arg3" "$arg4" qjoypad.pro echo " Configuring QJoyPad installation... diff --git a/src/qjoypad.pro b/src/qjoypad.pro index 4b8ec99..6a3c37a 100644 --- a/src/qjoypad.pro +++ b/src/qjoypad.pro @@ -11,13 +11,13 @@ ##### Setup Targets ##### -icons.path = $$INSTALL/$$PREFIX/share/pixmaps/qjoypad +icons.path = $$INSTALL_PREFIX/share/pixmaps/qjoypad icons.conf_path = $$PREFIX/share/pixmaps/qjoypad icons.extra = cp ../icons/* $${icons.path}; cd $${icons.path}; ln -sf gamepad4-24x24.png icon24.png; ln -sf gamepad3-64x64.png icon64.png; chmod -R a+r $${icons.path} -doc.path = $$INSTALL/$$PREFIX/share/doc/qjoypad3 +doc.path = $$INSTALL_PREFIX/share/doc/qjoypad3 doc.extra = cp ../README.txt ../LICENSE.txt $${doc.path} - +target.path = $$INSTALL_PREFIX/bin