www.delorie.com/gnu/docs/autoconf/autoconf_104.html   search  
 
Buy the book!


Autoconf

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

8.4 Programming in M4sh

M4sh, pronounced "mash", is aiming at producing portable Bourne shell scripts. This name was coined by Lars J. Aas, who notes that, according to the Webster's Revised Unabridged Dictionary (1913):

Mash \Mash\, n. [Akin to G. meisch, maisch, meische, maische, mash, wash, and prob. to AS. miscian to mix. See "Mix".]

  1. A mass of mixed ingredients reduced to a soft pulpy state by beating or pressure....

  2. A mixture of meal or bran and water fed to animals.

  3. A mess; trouble. [Obs.] --Beau. & Fl.

For the time being, it is not mature enough to be widely used.

M4sh provides portable alternatives for some common shell constructs that unfortunately are not portable in practice.

Macro: AS_DIRNAME (pathname)
Return the directory portion of pathname, using the algorithm required by POSIX. See section 10.9 Limitations of Usual Tools, for more details about what this returns and why it is more portable than the dirname command.

Macro: AS_MKDIR_P (filename)
Make the directory filename, including intervening directories as necessary. This is equivalent to `mkdir -p filename', except that it is portable to older versions of mkdir that lack support for the `-p' option.


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003