automake-patches
[Top][All Lists]
Advanced

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

[PATCH] Strip trailing whitespace from Makefile.in


From: William Pursell
Subject: [PATCH] Strip trailing whitespace from Makefile.in
Date: Sat, 01 Nov 2008 13:50:16 +0000
User-agent: Thunderbird 2.0.0.17 (Macintosh/20080914)

I noticed a few lines in Makefile.in with trailing
white space.  Not a big deal, but easy enough
to fix.

commit 9546dd24bcab678a703fe9e10c06158845eb1a5f
Author: William Pursell <address@hidden>
Date:   Sat Nov 1 10:24:11 2008 +0000


diff --git a/automake.in b/automake.in
index 0815773..b03a6ee 100755
--- a/automake.in
+++ b/automake.in
@@ -6681,6 +6681,7 @@ sub make_paragraphs ($%)
   while (defined ($_ = shift @lines))
     {
       my $paragraph = $_;
+      $paragraph =~ s/[ \t]*$//gm;
       # If we are a rule, eat as long as we start with a tab.
       if (/$RULE_PATTERN/smo)
        {
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 2526acf..2091c63 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -526,6 +526,7 @@ sinclude.test \
 srcsub.test \
 srcsub2.test \
 space.test \
+space2.test \
 specflg.test \
 specflg2.test  \
 specflg3.test  \
diff --git a/tests/space2.test b/tests/space2.test
new file mode 100755
index 0000000..87e6e67
--- /dev/null
+++ b/tests/space2.test
@@ -0,0 +1,33 @@
+#! /bin/sh
+# Copyright (C) 2008  Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Ensure that Makefile.in does not contain trailing whitespace.
+
+. ./defs || Exit 1
+
+cat >> configure.in << EOF
+AC_PROG_CC
+AC_CONFIG_HEADERS([config.h])
+EOF
+
+echo "bin_PROGRAMS = foo" >> Makefile.am
+
+$ACLOCAL || Exit 1
+$AUTOHEADER || Exit 1
+$AUTOMAKE || Exit 1
+
+grep '[        ]$' Makefile.in && Exit 1
+Exit 0

--
William Pursell




reply via email to

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