git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Makefile: abort on shells that do not support ${parameter%word} expansion

From
Brandon Casey <casey@nrlssc.navy.mil>
Date
Sep 6, 2011, 20:20 UTC
Message-ID
<P8L-gIYkRp9VP2hZA6C9Q0Ka-vFda8JLDmCkZvI-HruWKjjPYWAg-PmIrbpKE20ORu1qtoL33A2B9_m2ojl0754hk4q4quHgQXx3-S5StEk@cipher.nrlssc.navy.mil>
In-Reply-To
<7v1uvt8ml6.fsf@alter.siamese.dyndns.org>
On 09/06/2011 03:03 PM, Junio C Hamano wrote:
Show 19 quoted lines
> Brandon Casey <casey@nrlssc.navy.mil> 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
Previous: Junio C Hamano
Message 19 of 19 in “shell portability: Use sed instead of non-portable variable expansion”
  1. shell portability: Use sed instead of non-portable variable expansionNaohiro Aota, Sep 5, 2011
  2. Johannes SixtSep 5, 2011
  3. Junio C HamanoSep 5, 2011
  4. Johannes SixtSep 5, 2011
  5. Junio C HamanoSep 5, 2011
  6. Johannes SixtSep 5, 2011
  7. Johannes SixtSep 5, 2011
  8. Naohiro AotaSep 5, 2011
  9. Junio C HamanoSep 5, 2011
  10. Johannes SixtSep 5, 2011
  11. Junio C HamanoSep 5, 2011
  12. Junio C HamanoSep 5, 2011
  13. Makefile: abort on shells that do not support ${parameter%word} expansionBrandon Casey, Sep 6, 2011
  14. Brandon CaseySep 6, 2011
  15. Brandon CaseySep 6, 2011
  16. Junio C HamanoSep 6, 2011
  17. Brandon CaseySep 6, 2011
  18. Junio C HamanoSep 6, 2011
  19. Brandon CaseySep 6, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.