From: Brandon Casey Date: Tue, 06 Sep 2011 20:20:53 GMT Subject: Re: [PATCH] Makefile: abort on shells that do not support ${parameter%word} expansion Message-ID: In-Reply-To: <7v1uvt8ml6.fsf@alter.siamese.dyndns.org> On 09/06/2011 03:03 PM, Junio C Hamano wrote: > Brandon Casey writes: > >> diff --git a/Makefile b/Makefile >> index 8d6d451..46d9c5d 100644 >> --- a/Makefile >> +++ b/Makefile >> @@ -1738,6 +1738,7 @@ endif >> >> please_set_SHELL_PATH_to_a_more_modern_shell: >> @$$(:) >> + @foo=bar_suffix && test bar = "$${foo%_*}" >> >> shell_compatibility_test: please_set_SHELL_PATH_to_a_more_modern_shell > > Perhaps > > @foo='bar?suffix' && test bar = "$${foo%\?*}" > > instead? Looks right. Naohiro, can you test? Or someone else with FreeBSD? make should produce an error message like this: gmake: *** [please_set_SHELL_PATH_to_a_more_modern_shell] Error 1 -Brandon