projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e946a8b
)
Add a $(MAKE_RESTARTS) check to ghc.mk
author
Ian Lynagh
<igloo@earth.li>
Sun, 27 Sep 2009 20:26:03 +0000
(20:26 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Sun, 27 Sep 2009 20:26:03 +0000
(20:26 +0000)
This should catch make going into an infinite loop.
ghc.mk
patch
|
blob
|
history
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
+# 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: