autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

shell or M4sugar?


From: Julien ÉLIE
Subject: shell or M4sugar?
Date: Fri, 8 Jan 2021 12:17:32 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

Hi all,

I have a question about the portability of "very simple" shell commands. Should M4sugar be used whenever it has the functionality?

For instance, what I call a simple shell command is a mere replacement done via echo piped to sed:

AS_CASE([$host],
    [*-openbsd*],
        [CC_WARNINGS=`echo "$CC_WARNINGS" | sed 's/-Wredundant-decls //'`])

This example just removes -Wredundant-decls from the list of gcc warnings to use for an OpenBSB build. Is it fine to write it like that? (Are there systems on which it wouldn't work?)


Would this mere change to AS_ECHO be better and enough?
  CC_WARNINGS=`AS_ECHO("$CC_WARNINGS") | sed 's/-Wredundant-decls //'`

Or the CC_WARNINGS be m4_define'd and then manipulated through m4_append & like, and use m4_bpatsubst for doing what sed does?



P.-S.: I really like the new modern display of the Autoconf manual (https://www.gnu.org/software/autoconf/manual/autoconf-2.70/autoconf.html) compared with the equivalent for 2.69.

--
Julien ÉLIE

« Ce vieux forban d'Asthmatix, il ne manquait pas d'air ! » (Astérix)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]