bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] bootstrap: reformat for readability


From: Paul Eggert
Subject: [PATCH] bootstrap: reformat for readability
Date: Fri, 08 Oct 2010 10:04:59 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8

I thought I'd try out reformatting lines to make them more readable on
other projects first, before doing further changes to gnulib along
these lines, as there seems to be some controversy about it and it's
better to get some experience with it.  However, some files are
shared, and the gnulib versions need reformatting so that they can be
more easily synchronized.  bootstrap is one of these files, so here's
a patch to shorten its too-long lines.  In the process I shortened a
diagnostic but the shortened version is clearer and easier to read so
that should be OK.

* build-aux/bootstrap: Rewrite to avoid lines longer than 80 columns.
---
 ChangeLog           |    5 +++++
 build-aux/bootstrap |   19 ++++++++++++++-----
 2 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index f83934b..8c33530 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-10-08  Paul Eggert  <address@hidden>
+
+       bootstrap: reformat for readability
+       * build-aux/bootstrap: Rewrite to avoid lines longer than 80 columns.
+
 2010-10-08  Eric Blake  <address@hidden>
 
        docs: update cygwin progress
diff --git a/build-aux/bootstrap b/build-aux/bootstrap
index 49b1e55..1da5b1e 100755
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Print a version string.
-scriptversion=2010-10-05.15; # UTC
+scriptversion=2010-10-08.16; # UTC
 
 # Bootstrap this package from checked-out sources.
 
@@ -394,7 +394,7 @@ fi
 if ! printf "$buildreq" | check_versions; then
   echo >&2
   if test -f README-prereq; then
-    echo "See README-prereq for notes on obtaining the prerequisite programs" 
>&2
+    echo "See README-prereq for how to get the prerequisite programs" >&2
   else
     echo "Please install the prerequisite programs" >&2
   fi
@@ -678,7 +678,8 @@ slurp() {
     for file in `ls -a $1/$dir`; do
       case $file in
       .|..) continue;;
-      .*) continue;; # FIXME: should all file names starting with "." be 
ignored?
+      # FIXME: should all file names starting with "." be ignored?
+      .*) continue;;
       esac
       test -d $1/$dir/$file && continue
       for excluded_file in $excluded_files; do
@@ -687,7 +688,8 @@ slurp() {
       if test $file = Makefile.am && test "X$gnulib_mk" != XMakefile.am; then
         copied=$copied${sep}$gnulib_mk; sep=$nl
         remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
-        sed "$remove_intl" $1/$dir/$file | cmp - $dir/$gnulib_mk > /dev/null 
|| {
+        sed "$remove_intl" $1/$dir/$file |
+        cmp - $dir/$gnulib_mk > /dev/null || {
           echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
           rm -f $dir/$gnulib_mk &&
           sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk
@@ -723,7 +725,14 @@ slurp() {
         # the name with just ".h".  Many gnulib headers are generated,
         # e.g., stdint.in.h -> stdint.h, dirent.in.h ->..., etc.
         # Likewise for .gperf -> .h, .y -> .c, and .sin -> .sed
-        f=`echo "$copied"|sed 
's/\.in\.h$/.h/;s/\.sin$/.sed/;s/\.y$/.c/;s/\.gperf$/.h/'`
+        f=`echo "$copied" |
+          sed '
+            s/\.in\.h$/.h/
+            s/\.sin$/.sed/
+            s/\.y$/.c/
+            s/\.gperf$/.h/
+          '
+        `
         insert_sorted_if_absent $ig "$f"
 
         # For files like sys_stat.in.h and sys_time.in.h, record as
-- 
1.7.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]