]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* HACKING (Editing `.m4sh' Files): Document preferred function
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 1 Feb 2005 07:35:05 +0000 (07:35 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 1 Feb 2005 07:35:05 +0000 (07:35 +0000)
header layout.
* config/ltmain.m4sh (func_win32_libid, func_infer_tag)
(func_generate_dlsyms, func_extract_an_archive, func_extract_archives):
adjust to fit.

ChangeLog
HACKING
config/ltmain.m4sh

index 2146b1085d3785b8a5a3a775e77085a2aee24d77..3bef82b8ee5fe6c5795ab58ffc154e6c828ae751 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2005-02-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * HACKING (Editing `.m4sh' Files): Document preferred function
+       header layout.
+       * config/ltmain.m4sh (func_win32_libid, func_infer_tag)
+       (func_generate_dlsyms, func_extract_an_archive, func_extract_archives):
+       adjust to fit.
+
 2005-01-31  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): Unicos 9 sed rejects
diff --git a/HACKING b/HACKING
index 6543febc3dc3de4ee1ac078b3cc152aa787690c1..07b0deeb3c874dcc5fadcf5181c37148f576c2bd 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -200,7 +200,19 @@ yyyy-mm-dd  Name of Author  <email@address>  (tiny change)
   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_'.
+* Function names should be prefixed `func_', the function header should
+  look like this:
+
+  # func_foo [ OPTIONS ]
+  # Description of what func_foo does and returns.
+  func_foo ()
+  {
+      $opt_debug
+      # contents of func_foo ...
+  }
+
+  The `$opt_debug' is used to enable shell tracing (Korn shells reset
+  this on function entry).
 
 * For functions that are called frequently, if you need to return a
   value, don't cause unneccessary forking of the shell using echo as
index 26519b26e2d77de185980acf8423082a7b41601d..e4c239fa89931d2fc697a9c870617c4a5d809d0c 100644 (file)
@@ -592,7 +592,8 @@ _LT_EOF
 # Need a lot of goo to handle *both* DLLs and import libs
 # Has to be a shell function in order to 'eat' the argument
 # that is supplied when $file_magic_command is called.
-func_win32_libid () {
+func_win32_libid ()
+{
   $opt_debug
   win32_libid_type="unknown"
   win32_fileres=`file -L $1 2>/dev/null`
@@ -634,7 +635,8 @@ func_win32_libid () {
 # Only attempt this if the compiler in the base compile
 # command doesn't match the default compiler.
 # arg is usually of the form 'gcc ...'
-func_infer_tag () {
+func_infer_tag ()
+{
     $opt_debug
     if test -n "$available_tags" && test -z "$tagname"; then
       CC_quoted=
@@ -689,7 +691,8 @@ func_infer_tag () {
 # func_generate_dlsyms outputname originator pic_p
 # Extract symbols from dlprefiles and create ${outputname}S.o with
 # a dlpreopen symbol table.
-func_generate_dlsyms () {
+func_generate_dlsyms ()
+{
     $opt_debug
     my_outputname="$1"
     my_originator="$2"
@@ -923,7 +926,8 @@ static const void *lt_preloaded_setup() {
 }
 
 # func_extract_an_archive dir oldlib
-func_extract_an_archive () {
+func_extract_an_archive ()
+{
     $opt_debug
     f_ex_an_ar_dir="$1"; shift
     f_ex_an_ar_oldlib="$1"
@@ -963,7 +967,8 @@ func_extract_an_archive () {
 
 
 # func_extract_archives gentop oldlib ...
-func_extract_archives () {
+func_extract_archives ()
+{
     $opt_debug
     my_gentop="$1"; shift
     my_oldlibs=${1+"$@"}