From: Bruno Haible Date: Sun, 2 Nov 2008 14:41:14 +0000 (+0100) Subject: Modules now have a 'status' attribute. X-Git-Tag: v0.1~6742 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=d91aeb8a6e445e1cbffaaa927ef5aaa77d9b58eb;p=gnulib.git Modules now have a 'status' attribute. --- diff --git a/ChangeLog b/ChangeLog index 17f20d515..f98ad315e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-11-02 Bruno Haible + + * 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 * modules/sockets (License): Change from LGPL to LGPLv2+. diff --git a/gnulib-tool b/gnulib-tool index b0f4c1884..1b8f269da 100755 --- a/gnulib-tool +++ b/gnulib-tool @@ -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 diff --git a/modules/TEMPLATE-EXTENDED b/modules/TEMPLATE-EXTENDED index e0fe9bf2b..d765e201f 100644 --- a/modules/TEMPLATE-EXTENDED +++ b/modules/TEMPLATE-EXTENDED @@ -1,5 +1,7 @@ Description: +Status: + Notice: Files: