]> sourceware.org Git - automake.git/commitdiff
* tests/comment4.test: New file.
authorAlexandre Duret-Lutz <adl@gnu.org>
Wed, 2 Jan 2002 15:52:25 +0000 (15:52 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Wed, 2 Jan 2002 15:52:25 +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 fc65a7d48cb9b98916ca5688e7d5c6a9bb3e2c75..abbcce833eabf11601c56f286a026cf232ee0a8d 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 dcc9a126456bb44f0f4b2aef5f21de0ecfe41b8e..335232aeaf9591bbef2383a483f0979631df3da9 100644 (file)
@@ -13,7 +13,6 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
-
 SHELL = @SHELL@
 
 srcdir = @srcdir@
index 00c99f6bf741723cdfdda4653aa6f08cb8c44087..b2e0c3e25f0a2ac580a1921022a9464ee8b2b3e2 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 42e7756779fb6480ec50292c38c3d4abbd74b103..8d1f41f51899cd8ad35ac57a4f4f06977809c4c9 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 31596d155cbcef73f23e38decd54eebd8f5be6fe..3c1d1925b837e1927210a9cc4ad8115e22b3c20a 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 6747875c7ac9a3a58b088ca63a74626d232967dd..fd8bbe25ba951b34423986a4e3de17f6cd45696c 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 3b441911d3a8e6e88063119ab2944bdf1a39d038..938a8a136c3b1ede238039919e3cc897744d22f4 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 6f3d62ad24ae59614b5540fe1403797f6a4564b4..b57a1ef4b5026e087b7934b70e5bb61d48e68436 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 fb04f2214981e6dba5ae9ac07bca9e82d10a3690..a906d27a73d5e8d80fb898d453bc1f4cc7d1c1aa 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
This page took 0.055085 seconds and 5 git commands to generate.