[project @ 2005-04-15 14:26:39 by simonpj]
[ghc-hetmet.git] / mk / target.mk
index 73ef01f..6a0b5aa 100644 (file)
@@ -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.
@@ -1163,7 +1168,7 @@ endif
 # the --no-print-directory flag which is passed to recursive
 # invocations of make.
 #
-#ifeq "$(way)" ""
+ifeq "$(way)" ""
 ifneq "$(SUBDIRS)" ""
 
 # we override the 'boot', 'all' and 'install' targets in the top
@@ -1210,7 +1215,7 @@ $(ALL_TARGET) docs runtests $(BOOT_TARGET) TAGS clean distclean mostlyclean main
        @echo "------------------------------------------------------------------------"
 
 endif
-#endif
+endif
 
 #
 # Selectively building subdirectories.