summaryrefslogtreecommitdiff
path: root/GNUmakefile
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2017-01-30 14:46:36 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2017-01-30 18:54:01 -0500
commitdc9339b5699ee3b0d48145a1389f93e9e09d02a6 (patch)
treeed71bd691ea6e0d05d47e2bfd891c333bf5709ab /GNUmakefile
parent4f9203808ef9607ae27eba3cf77079bbe661fd95 (diff)
Update and tidy the build system for autothing v3.
Diffstat (limited to 'GNUmakefile')
-rw-r--r--GNUmakefile13
1 files changed, 13 insertions, 0 deletions
diff --git a/GNUmakefile b/GNUmakefile
new file mode 100644
index 0000000..0cdb67d
--- /dev/null
+++ b/GNUmakefile
@@ -0,0 +1,13 @@
+# This file is a hack to let us pass whatever flags we want to Make,
+# since adjusting MAKEFLAGS at runtime only half-works.
+#
+# Most of the complexity is dancing around to avoid having any
+# possibly conflicting identifiers.
+
+MAKEFLAGS += --no-print-directory
+rest = $(wordlist 2,$(words $1),$1)
+target = $(or $(firstword $(MAKECMDGOALS)),default)
+$(or $(call rest,$(MAKECMDGOALS)),_$(target)): $(target)
+ @:
+$(target):
+ @+$(MAKE) -f Makefile --no-builtin-rules --no-builtin-variables --warn-undefined-variables $(MAKECMDGOALS)