]> Savannah Git Hosting - gnulib.git/commitdiff
New strip-trailing-space option for srclist-update
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 21 Aug 2019 18:30:10 +0000 (11:30 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 21 Aug 2019 18:37:41 +0000 (11:37 -0700)
* config/srclist-update (fixfile): Support new option.
* config/srclist.txt (texinfo.tex, maintain.texi, standards.texi):
Use it.

ChangeLog
config/srclist-update
config/srclist.txt

index f5eda2fa3d128c46d6a4e8d54085c82192169326..d76da745b49627d3548d421bed9c9ae788a452a3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2019-08-21  Paul Eggert  <eggert@cs.ucla.edu>
+
+       New strip-trailing-space option for srclist-update
+       * config/srclist-update (fixfile): Support new option.
+       * config/srclist.txt (texinfo.tex, maintain.texi, standards.texi):
+       Use it.
+
 2019-08-20  Eric Blake  <eblake@redhat.com>
 
        accept4: Support SOCK_NONBLOCK, if defined
index b90ef154448d3944d34db72c87b592e531dbeb48..e57ba4eafbd6e3a600d4cdaff42fa6c30b9bc929 100755 (executable)
@@ -14,6 +14,7 @@
 #   options.
 # The possible options are "gpl" (to replace the license with the GPL)
 #   and "doclicense" (to replace @include doclicense.texi with fdl.texi)
+#   and "strip-trailing-space" (to strip trailing white space from lines)
 #   and "release" (to use the release version instead of the
 #   development version).
 #   Unrecognized options are ignored.
@@ -91,8 +92,8 @@ fixlicense='
 # Quote the $ so that CVS does not expand it in this script.
 remove_id_lines='/[$]Id:.*[$]/d'
 
-# $1 is the root directory of input file, $2 is input file, $3 is
-# output.  Remove $Id lines, since they'll differ between source
+# $1 is input file, $2 is output.
+# Remove $Id lines, since they'll differ between source
 # locations.  If $options contains "gpl", change the license to be the
 # standard GPL.  We use this for libc files, et al.
 #
@@ -100,6 +101,11 @@ fixfile() \
 {
   sed_command="$remove_id_lines"
 
+  case " $options " in
+  *' strip-trailing-space '*)
+    sed_command="$sed_command; s/[[:space:]]*\$//";;
+  esac
+
   case " $options " in
   *' gpl '*)
     sed_command="$sed_command; $fixlicense";;
index bb6ad87abd426d8008b34c99ea32d5b4e9de23e3..6d37729cefe571a410269d10a0e8cc7ab698fe33 100644 (file)
@@ -12,13 +12,13 @@ $AUTOMAKE lib/install-sh    build-aux
 $AUTOMAKE lib/mdate-sh         build-aux
 $AUTOMAKE lib/mkinstalldirs    build-aux
 
-$TEXINFOTEX texinfo.tex                build-aux
+$TEXINFOTEX texinfo.tex                build-aux strip-trailing-space
 
 # we generate INSTALL from this via a rule in doc/Makefile.
 $AUTOCONF doc/install.texi     doc
 
-$GNUSTANDARDS maintain.texi    doc
-$GNUSTANDARDS standards.texi   doc
+$GNUSTANDARDS maintain.texi    doc strip-trailing-space
+$GNUSTANDARDS standards.texi   doc strip-trailing-space
 $GNUSTANDARDS make-stds.texi   doc
 $GNUSTANDARDS gnu-oids.texi    doc
 $GNUSTANDARDS fdl.texi         doc