path: root/
diff options
authorYann E. MORIN" <>2011-06-04 15:43:49 (GMT)
committerYann E. MORIN" <>2011-06-04 15:43:49 (GMT)
commit929fda76b857547a577abeed255bd33eceed5cf8 (patch)
tree10a85c821833c931e1c84f27338751a91ad6e31f /
parent39dedfbcb65c93e5e111fba93f75507a56239076 (diff)
Makefile: make it work for auto-completion
The latest autocompletion calls 'make -qp' to get all the possible targets. This currently fails, as our makefile is calling itself again and again ad-libitum. Fix it by detecting that the recursion level is not 0, and bail out if so. It works so well that it has the side effect of showing only the 'public' target, and hide our internal ones! :-) Signed-off-by: "Yann E. MORIN" <>
Diffstat (limited to '')
1 files changed, 11 insertions, 0 deletions
diff --git a/ b/
index a211fd6..616ce99 100644
--- a/
+++ b/
@@ -88,6 +88,17 @@ endif
# See top of file for an explanation of why this is needed...
ifneq ($(strip $(CT_MAKEFLAGS)),)
+# Somehow, the new auto-completion for make in the recent distributions
+# trigger a behavior where our Makefile calls itself recursively, in a
+# never-ending loop (except on lack of ressources, swap, PIDs...)
+# Avoid this situation by cutting the recursion short at the first
+# level.
+# This has the side effect of only showing the real targets, and hiding our
+# internal ones. :-)
+ifneq ($(MAKELEVEL),0)
+$(error Recursion detected, bailing out...)
build install clean distclean uninstall:
@$(MAKE) $@