getaddrinfo: Doc fix.
[gnulib.git] / gnulib-tool
index 0be26f5..9461027 100755 (executable)
@@ -123,24 +123,12 @@ fi
 # outputs to stdout the --help usage message.
 func_usage ()
 {
-  # This use of bold display can be removed on 2011-01-01.
-  if case "$TERM" in
-       xterm*) test -t 1;;
-       *) false;;
-     esac; then
-    # Assume xterm compatible escape sequences.
-    bold_on=`printf '\x1b[1m'`
-    bold_off=`printf '\x1b[0m'`
-  else
-    bold_on=
-    bold_off=
-  fi
   echo "\
 Usage: gnulib-tool --list
-       gnulib-tool --find filename${bold_on}
+       gnulib-tool --find filename
        gnulib-tool --import [module1 ... moduleN]
        gnulib-tool --add-import [module1 ... moduleN]
-       gnulib-tool --remove-import [module1 ... moduleN]${bold_off}
+       gnulib-tool --remove-import [module1 ... moduleN]
        gnulib-tool --update
        gnulib-tool --create-testdir --dir=directory [module1 ... moduleN]
        gnulib-tool --create-megatestdir --dir=directory [module1 ... moduleN]
@@ -165,14 +153,14 @@ Usage: gnulib-tool --list
 Operation modes:
 
       --list                print the available module names
-      --find                find the modules which contain the specified file${bold_on}
+      --find                find the modules which contain the specified file
       --import              import the given modules into the current package
       --add-import          augment the list of imports from gnulib into the
                             current package, by adding the given modules;
                             if no modules are specified, update the current
                             package from the current gnulib
       --remove-import       reduce the list of imports from gnulib into the
-                            current package, by removing the given modules${bold_off}
+                            current package, by removing the given modules
       --update              update the current package, restore files omitted
                             from version control
       --create-testdir      create a scratch package with the given modules
@@ -2815,11 +2803,6 @@ func_emit_lib_Makefile_am ()
   echo
   uses_subdirs=
   {
-    if test false = "$libtool"; then
-      sed_transform_libgnu_a="s, libgnu\\.a, $libname.a,g"
-    else
-      sed_transform_libgnu_a="s, libgnu\\.a, $libname.la,g"
-    fi
     for module in $modules; do
       func_verify_nontests_module
       if test -n "$module"; then
@@ -2832,7 +2815,6 @@ func_emit_lib_Makefile_am ()
                 -e 's,lib_\([A-Z][A-Z]*\),'"${libname}_${libext}"'_\1,g' \
                 -e 's,lib%_LIBRARIES,lib_LIBRARIES,g' \
                 -e 's,lib%_LTLIBRARIES,lib_LTLIBRARIES,g' \
-               -e "$sed_transform_libgnu_a" \
                 -e "$sed_transform_check_PROGRAMS"
           if test "$module" = 'alloca'; then
             echo "${libname}_${libext}_LIBADD += @${perhapsLT}ALLOCA@"
@@ -2872,8 +2854,6 @@ func_emit_lib_Makefile_am ()
   echo
   if test -z "$makefile_name"; then
     echo "SUBDIRS ="
-    echo "nodist_pkginclude_HEADERS ="
-    echo "nobase_nodist_pkginclude_HEADERS ="
     echo "noinst_HEADERS ="
     echo "noinst_LIBRARIES ="
     echo "noinst_LTLIBRARIES ="
@@ -2883,7 +2863,6 @@ func_emit_lib_Makefile_am ()
       echo "pkgdata_DATA ="
     fi
     echo "EXTRA_DIST ="
-    echo "EXTRA_HEADERS ="
     echo "BUILT_SOURCES ="
     echo "SUFFIXES ="
   fi
@@ -2923,18 +2902,11 @@ func_emit_lib_Makefile_am ()
           && test -f "$sourcebase/Makefile.am" \
           && LC_ALL=C grep "^[a-zA-Z0-9_]*_${perhapsLT}LIBRARIES *+\{0,1\}= *$libname\\.$libext\$" "$sourcebase/Makefile.am" > /dev/null; \
         }; then
-    # Install associated header files, per module Makefile.am snippets.
-    sed_transform_HEADERS_primaries="$sed_noop"
     # One of the snippets or the user's Makefile.am already specifies an
     # installation location for the library. Don't confuse automake by saying
     # it should not be installed.
     :
   else
-    # Don't install header files when generated library is not installed.
-    sed_transform_HEADERS_primaries="\
-        /^\(nobase_\)\{0,1\}nodist_pkginclude_HEADERS *=.*$/d
-        /^EXTRA_HEADERS *=.*$/d
-    "
     # By default, the generated library should not be installed.
     echo "noinst_${perhapsLT}LIBRARIES += $libname.$libext"
   fi
@@ -2966,8 +2938,7 @@ func_emit_lib_Makefile_am ()
     echo
   fi
   cat "$tmp"/allsnippets \
-    | sed -e 's|\$(top_srcdir)/build-aux/|$(top_srcdir)/'"$auxdir"'/|g' \
-          -e "$sed_transform_HEADERS_primaries"
+    | sed -e 's|\$(top_srcdir)/build-aux/|$(top_srcdir)/'"$auxdir"'/|g'
   echo
   echo "mostlyclean-local: mostlyclean-generic"
   echo "       @for dir in '' \$(MOSTLYCLEANDIRS); do \\"
@@ -3181,8 +3152,6 @@ func_emit_tests_Makefile_am ()
   if ! $for_test; then
     echo "check_PROGRAMS ="
   fi
-  echo "nodist_pkginclude_HEADERS ="
-  echo "nobase_nodist_pkginclude_HEADERS ="
   echo "noinst_HEADERS ="
   echo "noinst_LIBRARIES ="
   if $use_libtests; then
@@ -3198,7 +3167,6 @@ func_emit_tests_Makefile_am ()
     echo "pkgdata_DATA ="
   fi
   echo "EXTRA_DIST ="
-  echo "EXTRA_HEADERS ="
   echo "BUILT_SOURCES ="
   echo "SUFFIXES ="
   echo "MOSTLYCLEANFILES = core *.stackdump"
@@ -3867,9 +3835,6 @@ s,^\(.................................................[^ ]*\) *,
       break
     fi
   done
-  test -n "${macro_prefix}" && sed_transform_lib_file=$sed_transform_lib_file"
-    s/_GL_\(.*\)_H/_${macro_prefix}_GL_\1_H/g
-  "
   sed_transform_main_lib_file="$sed_transform_lib_file"
   if test -n "$do_copyrights"; then
     if test -n "$lgpl"; then
@@ -3878,11 +3843,16 @@ s,^\(.................................................[^ ]*\) *,
         yes | 3)
           sed_transform_main_lib_file=$sed_transform_main_lib_file'
             s/GNU General/GNU Lesser General/g
+            s/General Public License/Lesser General Public License/g
+            s/Lesser Lesser General Public License/Lesser General Public License/g
           '
           ;;
         2)
           sed_transform_main_lib_file=$sed_transform_main_lib_file'
             s/GNU General/GNU Lesser General/g
+            s/General Public License/Lesser General Public License/g
+            s/Lesser Lesser General Public License/Lesser General Public License/g
+
             s/version [23]\([ ,]\)/version 2.1\1/g
           '
           ;;
@@ -3892,7 +3862,11 @@ s,^\(.................................................[^ ]*\) *,
       # Update license.
       sed_transform_main_lib_file=$sed_transform_main_lib_file'
         s/GNU Lesser General/GNU General/g
+        s/Lesser General Public License/General Public License/g
+
         s/GNU Library General/GNU General/g
+        s/Library General Public License/General Public License/g
+
         s/version 2\(.1\)\{0,1\}\([ ,]\)/version 3\2/g
       '
     fi
@@ -3904,14 +3878,14 @@ s,^\(.................................................[^ ]*\) *,
     # Update license.
     sed_transform_build_aux_file=$sed_transform_build_aux_file'
       s/GNU Lesser General/GNU General/g
+      s/Lesser General Public License/General Public License/g
+
       s/GNU Library General/GNU General/g
+      s/Library General Public License/General Public License/g
+
       s/version 2\(.1\)\{0,1\}\([ ,]\)/version 3\2/g
     '
   fi
-  test -n "${macro_prefix}" \
-    && sed_transform_build_aux_file=$sed_transform_build_aux_file"
-         s/_GL_\(.*\)_H/_${macro_prefix}_GL_\1_H/g
-       "
 
   # Determine script to apply to library files that go into $testsbase/.
   sed_transform_testsrelated_lib_file="$sed_transform_lib_file"
@@ -3919,7 +3893,11 @@ s,^\(.................................................[^ ]*\) *,
     # Update license.
     sed_transform_testsrelated_lib_file=$sed_transform_testsrelated_lib_file'
       s/GNU Lesser General/GNU General/g
+      s/Lesser General Public License/General Public License/g
+
       s/GNU Library General/GNU General/g
+      s/Library General Public License/General Public License/g
+
       s/version 2\(.1\)\{0,1\}\([ ,]\)/version 3\2/g
     '
   fi