]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* HACKING: Updated: `.in' files are now `.m4sh'; document some
authorGary V. Vaughan <gary@gnu.org>
Fri, 22 Oct 2004 10:34:38 +0000 (10:34 +0000)
committerGary V. Vaughan <gary@gnu.org>
Fri, 22 Oct 2004 10:34:38 +0000 (10:34 +0000)
more coding standards for these files.

ChangeLog
HACKING

index f8d3824ae7f6b6884d5f1649e0f1df343669109c..926a98366922c255ae011c26923c478de455d1be 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2004-10-22  Gary V. Vaughan  <gary@gnu.org>
 
+       * 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 14402a0084d3801fd0c1963b39ca598a4a245e47..cf4ddc35c8a8b77af4a37248cfebdd8646a5e6e0 100644 (file)
--- 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
 ================================