projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a $(MAKE_RESTARTS) check to ghc.mk
[ghc-hetmet.git]
/
ghc.mk
diff --git
a/ghc.mk
b/ghc.mk
index
719949b
..
ab3351d
100644
(file)
--- a/
ghc.mk
+++ b/
ghc.mk
@@
-85,6
+85,14
@@
default : all
default : all
+# Catch make if it runs away into an infinite loop
+ifeq "$(MAKE_RESTARTS)" ""
+else ifeq "$(MAKE_RESTARTS)" "1"
+else ifeq "$(MAKE_RESTARTS)" "2"
+else
+$(error Make has restarted itself $(MAKE_RESTARTS) times; is there a makefile bug?)
+endif
+
# Just bring makefiles up to date:
.PHONY: just-makefiles
just-makefiles:
# Just bring makefiles up to date:
.PHONY: just-makefiles
just-makefiles: