[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: obsolete modules
From: |
Bruno Haible |
Subject: |
Re: obsolete modules |
Date: |
Sun, 2 Nov 2008 15:40:42 +0100 |
User-agent: |
KMail/1.5.4 |
Jim Meyering wrote:
> Go ahead and declare these modules "obsolescent", but
> rather than ripping out all dependencies on them,
> add an option to gnulib-tool (say, --ignore-obsolescent)
> to tell it to do ignore any dependency on an obsolescent module.
Good idea. For this, it's necessary to formalize the notion of obsolescence
of a module. A new attribute in the module description does it:
2008-11-02 Bruno Haible <address@hidden>
* 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.
*** modules/TEMPLATE-EXTENDED.orig 2008-11-02 15:36:50.000000000 +0100
--- modules/TEMPLATE-EXTENDED 2008-11-02 15:25:34.000000000 +0100
***************
*** 1,5 ****
--- 1,7 ----
Description:
+ Status:
+
Notice:
Files:
*** gnulib-tool.orig 2008-11-02 15:36:49.000000000 +0100
--- gnulib-tool 2008-11-02 15:28:33.000000000 +0100
***************
*** 100,105 ****
--- 100,106 ----
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,131 ****
--- 127,133 ----
--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,1261 ****
--- 1258,1264 ----
:a
n
s/^Description:[ ]*$//
+ s/^Status:[ ]*$//
s/^Notice:[ ]*$//
s/^Files:[ ]*$//
s/^Depends-on:[ ]*$//
***************
*** 1281,1286 ****
--- 1284,1298 ----
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,4361 ****
--- 4368,4383 ----
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
- Re: obsolete modules,
Bruno Haible <=