From f64aa9d0edcd66915d2530bbc2434b24e2ac41a3 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 2 Jun 1998 19:30:38 +0000 Subject: [PATCH] detect a syntax error --- ChangeLog | 6 ++++++ TODO | 8 -------- automake.in | 8 ++++++++ 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2f811f9f..fc844c51 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Tue Jun 2 13:27:34 1998 Tom Tromey + + * automake.in (read_am_file): Error if blank line or comment + follows trailing backslash. Test syntax.test. + (file_contents_with_transform): Likewise. + Thu May 28 18:49:47 1998 Ian Lance Taylor * automake.in (handle_configure): Always use $(SHELL) when running diff --git a/TODO b/TODO index e79c4c92..9c5142df 100644 --- a/TODO +++ b/TODO @@ -8,14 +8,6 @@ LL_info_TEXINFOS = ... will put info files for language LL into $(infodir)/LL. -* something like this fails: - - foo = q \ - - lib_LTLIBRARIES = foo.la - - this should give an error. - * dependency tracking doesn't work well when a file is removed the new code to track header dependencies exacerbates this what is the fix? diff --git a/automake.in b/automake.in index 46385d63..a91bf463 100755 --- a/automake.in +++ b/automake.in @@ -5217,12 +5217,16 @@ sub read_am_file { # Stick a single white line before the incoming macro or rule. $spacing = "\n"; + &am_line_error ($., "blank line following trailing backslash") + if $saw_bk; } elsif (/$COMMENT_PATTERN/o) { # Stick comments before the incoming macro or rule. $comment .= $spacing . $_; $spacing = ''; + &am_line_error ($., "comment following trailing backslash") + if $saw_bk; } elsif ($saw_bk) { @@ -5734,12 +5738,16 @@ sub file_contents_with_transform { # Stick a single white line before the incoming macro or rule. $spacing = "\n"; + &am_line_error ($., "blank line following trailing backslash") + if $saw_bk; } elsif (/$COMMENT_PATTERN/o) { # Stick comments before the incoming macro or rule. $comment .= $spacing . $_; $spacing = ''; + &am_line_error ($., "comment following trailing backslash") + if $saw_bk; } elsif ($saw_bk) { -- 2.43.5