maint: prevent accidental future use of the old shell function name
authorJim Meyering <meyering@redhat.com>
Mon, 8 Aug 2011 06:54:52 +0000 (08:54 +0200)
committerJim Meyering <meyering@redhat.com>
Mon, 8 Aug 2011 08:11:48 +0000 (10:11 +0200)
This is especially important for an error-handling shell function
like this that is actually called only rarely.
* cfg.mk (sc_prohibit_framework_failure): New rule, to prevent
use of the old name.

cfg.mk

diff --git a/cfg.mk b/cfg.mk
index 2111956..5f8a680 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -270,6 +270,12 @@ sc_prohibit_verbose_version:
        halt='use the print_ver_ function instead...'                   \
          $(_sc_search_regexp)
 
+# Use framework_failure_, not the old name without the trailing underscore.
+sc_prohibit_framework_failure:
+       @prohibit='\<framework_''failure\>'                             \
+       halt='use framework_failure_ instead'                           \
+         $(_sc_search_regexp)
+
 ###########################################################
 _p0 = \([^"'/]\|"\([^\"]\|[\].\)*"\|'\([^\']\|[\].\)*'
 _pre = $(_p0)\|[/][^"'/*]\|[/]"\([^\"]\|[\].\)*"\|[/]'\([^\']\|[\].\)*'\)*