Modules now have a 'status' attribute.
authorBruno Haible <bruno@clisp.org>
Sun, 2 Nov 2008 14:41:14 +0000 (15:41 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 2 Nov 2008 14:41:14 +0000 (15:41 +0100)
ChangeLog
gnulib-tool
modules/TEMPLATE-EXTENDED

index 17f20d5..f98ad31 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-11-02  Bruno Haible  <bruno@clisp.org>
+
+       * modules/TEMPLATE-EXTENDED: New field 'Status'.
+       * gnulib-tool: New option --extract-status.
+       (func_usage): Document it.
+       (sed_extract_prog): Recognize it.
+       (func_get_status): New function.
+
 2008-10-30  Simon Josefsson  <simon@josefsson.org>
 
        * modules/sockets (License): Change from LGPL to LGPLv2+.
index b0f4c18..1b8f269 100755 (executable)
@@ -100,6 +100,7 @@ Usage: gnulib-tool --list
        gnulib-tool --test --dir=directory module1 ... moduleN
        gnulib-tool --megatest --dir=directory [module1 ... moduleN]
        gnulib-tool --extract-description module
+       gnulib-tool --extract-status module
        gnulib-tool --extract-notice module
        gnulib-tool --extract-filelist module
        gnulib-tool --extract-dependencies module
@@ -126,6 +127,7 @@ Operation modes:
       --megatest            test the given modules one by one and all together
                             (recommended to use CC=\"gcc -Wall\" here)
       --extract-description        extract the description
+      --extract-status             extract the status (obsolete or not)
       --extract-notice             extract the notice or banner
       --extract-filelist           extract the list of files
       --extract-dependencies       extract the dependencies
@@ -1256,6 +1258,7 @@ sed_extract_prog=':[       ]*$/ {
   :a
     n
     s/^Description:[    ]*$//
+    s/^Status:[         ]*$//
     s/^Notice:[         ]*$//
     s/^Files:[  ]*$//
     s/^Depends-on:[     ]*$//
@@ -1281,6 +1284,15 @@ func_get_description ()
   sed -n -e "/^Description$sed_extract_prog" < "$lookedup_file"
 }
 
+# func_get_status module
+# Input:
+# - local_gnulib_dir  from --local-dir
+func_get_status ()
+{
+  func_lookup_file "modules/$1"
+  sed -n -e "/^Status$sed_extract_prog" < "$lookedup_file"
+}
+
 # func_get_notice module
 # Input:
 # - local_gnulib_dir  from --local-dir
@@ -4356,6 +4368,16 @@ case $mode in
     done
     ;;
 
+  extract-status )
+    for module
+    do
+      func_verify_module
+      if test -n "$module"; then
+        func_get_status "$module"
+      fi
+    done
+    ;;
+
   extract-notice )
     for module
     do
index e0fe9bf..d765e20 100644 (file)
@@ -1,5 +1,7 @@
 Description:
 
+Status:
+
 Notice:
 
 Files: