aboutsummaryrefslogtreecommitdiff
path: root/mach
diff options
context:
space:
mode:
Diffstat (limited to 'mach')
-rwxr-xr-xmach21
1 files changed, 21 insertions, 0 deletions
diff --git a/mach b/mach
new file mode 100755
index 0000000..76d73ea
--- /dev/null
+++ b/mach
@@ -0,0 +1,21 @@
+#!/bin/sh
+# =====================================================================
+# filename: mach
+# description: make wrapper used to run build.mk
+# To use, add the relative path to this script as a
+# shebang in build.mk and make it executable.
+# spdx-license-identifier: ISC
+# =====================================================================
+
+if [[ $1 != "./build.mk" ]]
+then
+ echo "Run from subdir"
+ exit 1
+fi
+
+# remove ./build.mk from args
+ARGS=${@:2}
+# root.mk should be next to this script
+ROOT=`dirname $0`
+
+make --silent -f ${ROOT}/root.mk -C ${PWD} ${ARGS}