[mousetrap/gnome3-wip: 201/240] Simplify the mt-* interface.
- From: Heidi Ellis <heidiellis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mousetrap/gnome3-wip: 201/240] Simplify the mt-* interface.
- Date: Mon, 8 Sep 2014 15:29:28 +0000 (UTC)
commit 74d841c222f2098124bdf355deebc6792e688741
Author: Stoney Jackson <dr stoney gmail com>
Date: Sat Jun 28 21:55:00 2014 -0400
Simplify the mt-* interface.
If a developer wants to use mt-*, there are only three command
s/he has to deal with. Now `mt-make` is just a pass-through
interface for make. The advantage of mt-* is that once it is
in your path, you can run it from anywhere.
* `mt-setup` - Source this to add bin/ to your path and define PREFIX.
* `mt-configure` - Runs autogen.sh
* `mt-make` - Runs make passing through command-line arguments.
Here is a typical work-flow.
$ cd mousetrap
$ source bin/mt-setup
$ mt-configure # make the Makefile
$ cd src/mousetrap
$ vim something # do some work
$ mt-make check # see if it passes unit-tests
$ mt-make run # try running it
$ mt-make lint # see how messy your code is
$ mt-make clean # clean up files generated by make
$ git add ...
$ git commit ...
$ mt-make pristine # clean up all files git is ignoring
# or not tracking
bin/mt-configure | 9 +++++++++
bin/mt-make | 7 +++++++
2 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/bin/mt-configure b/bin/mt-configure
index 12acebd..dc9ade5 100755
--- a/bin/mt-configure
+++ b/bin/mt-configure
@@ -1,8 +1,17 @@
#!/usr/bin/env bash
+
source "$(dirname "$0")/mt-define-mousetrap-home"
+
+if [ ! -f "$MOUSETRAP_HOME/configure.ac" ] ; then
+ echo "Could not find configure.ac"
+ exit 1
+fi
+
(
if [ -z "$PREFIX" ] ; then
PREFIX="$("$MOUSETRAP_HOME/bin/mt-guess-prefix")"
+ echo "PREFIX is not defined... guessing $PREFIX"
+ echo "If this is not right, manually define PREFIX and re-run."
fi
cd "$MOUSETRAP_HOME"
./autogen.sh --prefix="$PREFIX"
diff --git a/bin/mt-make b/bin/mt-make
new file mode 100755
index 0000000..e23e4cf
--- /dev/null
+++ b/bin/mt-make
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+source "$(dirname "$0")/mt-define-mousetrap-home"
+
+(
+ cd "$MOUSETRAP_HOME"
+ make "$@"
+)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]