On Fri, Oct 19, 2001 at 06:00:38PM +0200, Akim Demaille wrote:
: >>>>> "Gary" == Gary V Vaughan <[EMAIL PROTECTED]> writes:
: Gary> As far as shell functions are concerned, it seems to me that
: Gary> m4sh could provide shell function wrapper macros which expand to
: Gary> a function/function call if that is supported by the shell, or
: Gary> else an inline function if not... 
: 
: Something which creates satellites executables (small sh scripts
: instead of functions) when functions are not supported?  I often
: thought about that.

I've had this idea too, but haven't investigated how exactly it should
be done.  Would you put the function implementation into a string
variable and then either dump the variable to a script file or if
functions are supported envelope it and do 'eval' to get it registered
in the shell?  Can here-docs be used to get around string variable
quoting inconveniences?

All the small sattelite script would have to be quite a slow-down on
systems without functions - but we won't really know before we've tried
though.  Maybe my projects' configure scripts can shrink from 500K
down to, say 100K :)  Nah, I'm dreaming ;)

  Lars J

Reply via email to