summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorsimonmar <unknown>2005-04-06 15:24:28 +0000
committersimonmar <unknown>2005-04-06 15:24:28 +0000
commit4bcd03a67e66e584da936d38ac91e3d72bf9cf78 (patch)
tree8de58410b8cc5849703efc502ca37766e0807fbc /mk
parent8dbb5f0f254ca3d899d9d28be33703eac988f345 (diff)
downloadhaskell-4bcd03a67e66e584da936d38ac91e3d72bf9cf78.tar.gz
[project @ 2005-04-06 15:24:28 by simonmar]
complain if $(way) is not a member of $(WAYS). This will help stop me shooting myself in the foot by building things for nonexistent ways.
Diffstat (limited to 'mk')
-rw-r--r--mk/target.mk5
1 files changed, 5 insertions, 0 deletions
diff --git a/mk/target.mk b/mk/target.mk
index 73ef01fca6..cc5aec7b33 100644
--- a/mk/target.mk
+++ b/mk/target.mk
@@ -1034,6 +1034,11 @@ maintainer-clean:: extraclean
# Expects: $(WAYS) the possible "way" strings to one of
# which $(way) will be set
+ifneq "$(way)" ""
+ifeq "$(findstring $(way), $(WAYS))" ""
+$(error Unknown way $(way))
+endif
+endif
# So how does $(way) ever get set to anything? Answer, we recursively
# invoke make, setting $(way) on the command line.