summaryrefslogtreecommitdiffstats
path: root/plugins/externaltools/data/build.tool.in
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/externaltools/data/build.tool.in')
-rwxr-xr-xplugins/externaltools/data/build.tool.in15
1 files changed, 15 insertions, 0 deletions
diff --git a/plugins/externaltools/data/build.tool.in b/plugins/externaltools/data/build.tool.in
new file mode 100755
index 0000000..0b81d5b
--- /dev/null
+++ b/plugins/externaltools/data/build.tool.in
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+EHOME=`echo $HOME | sed "s/#/\#/"`
+DIR=$GEDIT_CURRENT_DOCUMENT_DIR
+while test "$DIR" != "/"; do
+ for m in GNUmakefile makefile Makefile; do
+ if [ -f "${DIR}/${m}" ]; then
+ echo "Using ${m} from ${DIR}" | sed "s#$EHOME#~#" > /dev/stderr
+ make -C "${DIR}"
+ exit
+ fi
+ done
+ DIR=`dirname "${DIR}"`
+done
+echo "No Makefile found!" > /dev/stderr