* tests/comment4.test: New file.
authorAlexandre Duret-Lutz <adl@gnu.org>
Wed, 2 Jan 2002 15:52:31 +0000 (15:52 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Wed, 2 Jan 2002 15:52:31 +0000 (15:52 +0000)
* tests/Makefile.am (TESTS): Add command4.test.

Fix for comment4.test:
* automake.in (read_am_file): Output leading comments only when
encountering white lines.

ChangeLog
Makefile.in
automake.in
lib/Automake/Makefile.in
lib/Makefile.in
lib/am/Makefile.in
m4/Makefile.in
tests/Makefile.am
tests/Makefile.in
tests/comment4.test [new file with mode: 0755]

index fc65a7d..abbcce8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2001-12-29  Alexandre Duret-Lutz  <duret_g@epita.fr>
+
+       * tests/comment4.test: New file.
+       * tests/Makefile.am (TESTS): Add command4.test.
+
+       Fix for comment4.test:
+       * automake.in (read_am_file): Output leading comments only when
+       encountering white lines.
+
 2002-01-01  Tom Tromey  <tromey@redhat.com>
 
        For PR automake/234:
index dcc9a12..335232a 100644 (file)
@@ -13,7 +13,6 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-
 SHELL = @SHELL@
 
 srcdir = @srcdir@
index 00c99f6..b2e0c3e 100755 (executable)
@@ -6802,6 +6802,12 @@ sub read_am_file ($)
            # Stick a single white line before the incoming macro or rule.
            $spacing = "\n";
            $blank = 1;
+           # Flush all comments seen so far.
+           if ($comment ne '')
+           {
+               $output_vars .= $comment;
+               $comment = '';
+           }
        }
        elsif (/$COMMENT_PATTERN/o)
        {
@@ -6818,10 +6824,6 @@ sub read_am_file ($)
        }
     }
 
-    $output_vars .= $comment . "\n";
-    $comment = '';
-    $spacing = "\n";
-
     # We save the conditional stack on entry, and then check to make
     # sure it is the same on exit.  This lets us conditonally include
     # other files.
index 42e7756..8d1f41f 100644 (file)
@@ -13,7 +13,6 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-
 SHELL = @SHELL@
 
 srcdir = @srcdir@
@@ -151,6 +150,7 @@ install-am: all-am
 installcheck: installcheck-am
 install-strip:
        $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         INSTALL_STRIP_FLAG=-s \
          `test -z '$(STRIP)' || \
            echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
 mostlyclean-generic:
index 31596d1..3c1d192 100644 (file)
@@ -13,7 +13,6 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-
 SHELL = @SHELL@
 
 srcdir = @srcdir@
@@ -286,6 +285,7 @@ install-am: all-am
 installcheck: installcheck-recursive
 install-strip:
        $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         INSTALL_STRIP_FLAG=-s \
          `test -z '$(STRIP)' || \
            echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
 mostlyclean-generic:
index 6747875..fd8bbe2 100644 (file)
@@ -13,7 +13,6 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-
 SHELL = @SHELL@
 
 srcdir = @srcdir@
@@ -159,6 +158,7 @@ install-am: all-am
 installcheck: installcheck-am
 install-strip:
        $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         INSTALL_STRIP_FLAG=-s \
          `test -z '$(STRIP)' || \
            echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
 mostlyclean-generic:
index 3b44191..938a8a1 100644 (file)
@@ -13,7 +13,6 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-
 SHELL = @SHELL@
 
 srcdir = @srcdir@
@@ -159,6 +158,7 @@ install-am: all-am
 installcheck: installcheck-am
 install-strip:
        $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+         INSTALL_STRIP_FLAG=-s \
          `test -z '$(STRIP)' || \
            echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
 mostlyclean-generic:
index 6f3d62a..b57a1ef 100644 (file)
@@ -54,6 +54,7 @@ colon7.test \
 comment.test \
 comment2.test \
 comment3.test \
+comment4.test \
 compile_f_c_cxx.test \
 cond.test \
 cond2.test \
index fb04f22..a906d27 100644 (file)
@@ -13,7 +13,6 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-
 SHELL = @SHELL@
 
 srcdir = @srcdir@
@@ -127,6 +126,7 @@ colon7.test \
 comment.test \
 comment2.test \
 comment3.test \
+comment4.test \
 compile_f_c_cxx.test \
 cond.test \
 cond2.test \
diff --git a/tests/comment4.test b/tests/comment4.test
new file mode 100755 (executable)
index 0000000..7f571ef
--- /dev/null
@@ -0,0 +1,25 @@
+#! /bin/sh
+# Make sure commented variables are output near their comments.
+
+. $srcdir/defs || exit 1
+
+cat >> configure.in <<'EOF'
+AC_OUTPUT
+EOF
+
+cat > Makefile.am << 'EOF'
+# UnIqUe_COPYRIGHT_BOILERPLATE
+
+# UnIqUe_MUMBLE_COMMENT
+mumble = UnIqUe_MUMBLE_VALUE
+EOF
+
+set -e
+$ACLOCAL
+$AUTOMAKE
+# UnIqUe_COPYRIGHT_BOILERPLATE should appear near the top of the file
+test `sed -n -e '1,/UnIqUe_COPYRIGHT_BOILERPLATE/p' Makefile.in \
+      | wc -l` -le 30
+# UnIqUe_MUMBLE_COMMENT should appear right before the mumble declaration.
+test `sed -n -e '/UnIqUe_MUMBLE_COMMENT/,/UnIqUe_MUMBLE_VALUE/p' Makefile.in \
+      | wc -l` -eq 2