summaryrefslogtreecommitdiff
path: root/wrapper/runcmd.mk
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-07-01 23:22:00 -0600
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-07-01 23:22:00 -0600
commit504d11ded8c1e9a0757332f2a10ed7d86dd5fc70 (patch)
treea3bba73ac491feaaecddca3345d8a54c5673bf72 /wrapper/runcmd.mk
parent04b12bbea2be03a988e773afcd014a74d37ddca5 (diff)
A whole bunch of stuff
Diffstat (limited to 'wrapper/runcmd.mk')
-rw-r--r--wrapper/runcmd.mk15
1 files changed, 15 insertions, 0 deletions
diff --git a/wrapper/runcmd.mk b/wrapper/runcmd.mk
new file mode 100644
index 0000000..7cadb43
--- /dev/null
+++ b/wrapper/runcmd.mk
@@ -0,0 +1,15 @@
+#!/usr/bin/make -f
+
+# Environment/command line variables:
+# - ARGS
+# - EXEC_DIR
+# - CWD
+
+SHELL = bash -o pipefail
+
+export OUTPUT_DIR := $(realpath .)
+
+% : $(EXEC_PATH)/modules/%
+ cd $(CWD) && '$<' $(ARGS) | tee -- '$@'
+
+include $(wildcard $(EXEC_PATH)/modules/*.mk)