Commit 0db5e352 authored by Bruno Haible's avatar Bruno Haible

New module description field 'Link'.

parent 01bffc03
2007-01-31 Bruno Haible <bruno@clisp.org>
New module description field 'Link'.
* gnulib-tool (func_usage): Document --extract-link-directive.
(sed_extract_prog): Recognize 'Link' directive.
(func_get_link_directive): New function.
(func_import): Show summary of link directives.
Handle --extract-link-directive option.
* modules/acl (Link): New section.
* modules/clock-time (Link): New section.
* modules/euidaccess (Link): New section.
* modules/gettext (Link): New section.
* modules/iconv (Link): New section.
* modules/lock (Link): New section.
* modules/nanosleep (Link): New section.
* modules/readline (Link): New section.
2007-01-27 Bruno Haible <bruno@clisp.org>
Enforce the use of gnulib modules for unportable <string.h> functions.
......
......@@ -22,7 +22,7 @@
progname=$0
package=gnulib
cvsdatestamp='$Date: 2007-01-28 13:58:02 $'
cvsdatestamp='$Date: 2007-02-01 01:52:34 $'
last_checkin_date=`echo "$cvsdatestamp" | sed -e 's,^\$[D]ate: ,,'`
version=`echo "$last_checkin_date" | sed -e 's/ .*$//' -e 's,/,-,g'`
nl='
......@@ -93,6 +93,7 @@ Usage: gnulib-tool --list
gnulib-tool --extract-autoconf-snippet module
gnulib-tool --extract-automake-snippet module
gnulib-tool --extract-include-directive module
gnulib-tool --extract-link-directive module
gnulib-tool --extract-license module
gnulib-tool --extract-maintainer module
gnulib-tool --extract-tests-module module
......@@ -117,6 +118,7 @@ Operation modes:
--extract-autoconf-snippet extract the snippet for configure.ac
--extract-automake-snippet extract the snippet for library makefile
--extract-include-directive extract the #include directive
--extract-link-directive extract the linker directive
--extract-license report the license terms of the source files
under lib/
--extract-maintainer report the maintainer(s) inside gnulib
......@@ -891,6 +893,7 @@ sed_extract_prog=':[ ]*$/ {
s/^configure\.ac:[ ]*$//
s/^Makefile\.am:[ ]*$//
s/^Include:[ ]*$//
s/^Link:[ ]*$//
s/^License:[ ]*$//
s/^Maintainer:[ ]*$//
tb
......@@ -1015,6 +1018,15 @@ func_get_include_directive ()
sed -e 's/^\(["<]\)/#include \1/'
}
# func_get_link_directive module
# Input:
# - local_gnulib_dir from --local-dir
func_get_link_directive ()
{
func_lookup_file "modules/$1"
sed -n -e "/^Link$sed_extract_prog" < "$lookedup_file"
}
# func_get_license module
# Input:
# - local_gnulib_dir from --local-dir
......@@ -2252,6 +2264,19 @@ func_import ()
) | sed -e '/^$/d' -e 's/^/ /'
rm -f "$tmp"/include-angles "$tmp"/include-quotes "$tmp"/include-if
for module in $modules; do
func_get_link_directive "$module"
done \
| LC_ALL=C sort -u | sed -e '/^$/d' -e 's/^/ /' > "$tmp"/link
if test `wc -l < "$tmp"/link` != 0; then
echo
echo "You may need to use the following Makefile variables when linking."
echo "Use them in <program>_LDADD when linking a program, or"
echo "in <library>_a_LDFLAGS or <library>_la_LDFLAGS when linking a library."
cat "$tmp"/link
fi
rm -f "$tmp"/link
echo
echo "Don't forget to"
if test "$makefile_am" = Makefile.am; then
......@@ -3056,6 +3081,16 @@ case $mode in
done
;;
extract-link-directive )
for module
do
func_verify_module
if test -n "$module"; then
func_get_link_directive "$module"
fi
done
;;
extract-license )
for module
do
......
......@@ -18,6 +18,9 @@ Makefile.am:
Include:
"acl.h"
Link:
$(LIB_ACL)
License:
GPL
......
......@@ -14,6 +14,9 @@ Makefile.am:
Include:
Link:
$(LIB_CLOCK_GETTIME)
License:
GPL
......
......@@ -18,6 +18,9 @@ Makefile.am:
Include:
"euidaccess.h"
Link:
$(LIB_EACCESS)
License:
LGPL
......
......@@ -53,6 +53,9 @@ AM_CPPFLAGS += -I$(top_builddir)/intl
Include:
"gettext.h"
Link:
$(LTLIBINTL) when linking with libtool, $(LIBINTL) otherwise
License:
LGPL
......
......@@ -17,6 +17,9 @@ Include:
# include <iconv.h>
#endif
Link:
$(LTLIBICONV) when linking with libtool, $(LIBICONV) otherwise
License:
LGPL
......
......@@ -19,6 +19,9 @@ lib_SOURCES += lock.h lock.c
Include:
"lock.h"
Link:
$(LTLIBTHREAD) when linking with libtool, $(LIBTHREAD) otherwise
License:
LGPL
......
......@@ -20,6 +20,9 @@ Makefile.am:
Include:
"timespec.h"
Link:
$(LIB_NANOSLEEP)
License:
GPL
......
......@@ -18,6 +18,9 @@ Makefile.am:
Include:
"readline.h"
Link:
$(LTLIBREADLINE) when linking with libtool, $(LIBREADLINE) otherwise
License:
GPL
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment