From: Gary V. Vaughan Date: Fri, 22 Oct 2004 10:34:38 +0000 (+0000) Subject: * HACKING: Updated: `.in' files are now `.m4sh'; document some X-Git-Tag: release-1-9f~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fdb71cc8b30d3b982f5835d5f69b03cafdc384a9;p=thirdparty%2Flibtool.git * HACKING: Updated: `.in' files are now `.m4sh'; document some more coding standards for these files. --- diff --git a/ChangeLog b/ChangeLog index f8d3824ae..926a98366 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2004-10-22 Gary V. Vaughan + * HACKING: Updated: `.in' files are now `.m4sh'; document some + more coding standards for these files. + * config/general.m4sh (sed_double_backslash): Undo an over-optimisation. diff --git a/HACKING b/HACKING index 14402a008..cf4ddc35c 100644 --- a/HACKING +++ b/HACKING @@ -93,13 +93,27 @@ and is not part of a release distribution. of the loop itself should print each "important" command it runs. -5. Editing libtoolize.in and ltmain.in -====================================== +5. Editing `.m4sh' Files +======================== * Use shell functions, but be careful not to assume local scope for variable names. Don't use `return', instead echo the result of a function and call it from within backquotes. +* Function names should be prefixed `func_'. + +* For functions that are called frequently, if you need to return a + value, don't cause unneccessary forking of the shell using echo as + described above; instead set the return value in a variable named + after the called function with a suffix of `_result'. For example + the function `func_quote_for_eval' stores its return value in the + variable `$func_quote_for_eval_result'. + +* Although sh-indentation is set to 2 (by the `Local Variables:' block + at the end of .m4sh files), the left margin of the body of shell + functions should begin indented by 4 spaces. + + 6. Abstraction layers in libltdl ================================