shell or M4sugar?

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

 



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)




[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux