Index: automake.in =================================================================== RCS file: /cvs/automake/automake/automake.in,v retrieving revision 1.1173 diff -c -c -r1.1173 automake.in *** automake.in 2001/08/28 03:53:10 1.1173 --- automake.in 2001/09/20 02:12:22 *************** *** 6860,6875 **** } else { ! # This isn't an error; it is probably a continued rule. ! # In fact, this is what we assume. ! $was_rule = 1; ! $output_trailer .= $comment . $spacing; ! $output_trailer .= &make_condition (@cond_stack); ! $output_trailer .= $_; ! $comment = $spacing = ''; ! &am_line_error ($., "`#' comment at start of rule is unportable") ! if $_ =~ /^\t\s*\#/; ! } $saw_bk = $new_saw_bk; $_ = $am_file->getline; --- 6860,6901 ---- } else { ! # This line didn't match any patterns, so: ! ! # See if this is a continued Makefile rule ! if ($was_rule) { ! if (!/^\t/) { ! &am_line_error ($., ! "Expected a continued rule but no leading tab found"); ! } else { ! # Note if we saw a comment (starting in column 0) or a ! # blank line in the line preceding, then it will be omitted ! # from the output, as this doesn't work in BSD make ! ! # In addition, we ignore lines containing comments ! # immediately after a tab in a rule. This is because the ! # Tru64 Unix V5.1 system make will pass these to the ! # shell, which in turn can't find `#' as a command. ! if (!/^\t\s*\#/) { ! $output_trailer .= &make_condition (@cond_stack); ! $output_trailer .= $_; ! } ! } ! } elsif (/address@hidden@/) { ! # First token could be sustituted with something sensible lets ! # hope the user got it right ! $output_trailer .= $comment . $spacing; ! $output_trailer .= &make_condition (@cond_stack); ! $output_trailer .= $_; ! } else { ! #Can't think what else it should be ! chop $_ if (substr ($_, -1, 1) eq "\n"); ! &am_line_error ($., ! "Syntax error `$_' unexpected"); ! } ! ! $comment = $spacing = ''; ! } $saw_bk = $new_saw_bk; $_ = $am_file->getline; Index: tests/comment3.test =================================================================== RCS file: /cvs/automake/automake/tests/comment3.test,v retrieving revision 1.1 diff -c -c -r1.1 comment3.test *** comment3.test 2001/05/17 05:31:05 1.1 --- comment3.test 2001/09/20 02:12:24 *************** *** 1,6 **** #! /bin/sh ! # Make sure that `#' after a tab is a failure. # The Tru64 Unix V5.1 system make will pass these to the # shell, which in turn can't find `#' as a command. # Sigh. Some vendors must be destroyed. --- 1,7 ---- #! /bin/sh ! # Make sure that `#' after a tab succeeds, and the comment is stripped ! # from the resulting Makefile.in # The Tru64 Unix V5.1 system make will pass these to the # shell, which in turn can't find `#' as a command. # Sigh. Some vendors must be destroyed. *************** *** 10,16 **** cat > Makefile.am << 'END' install-data-local: # Tru64 Unix must die END ! $AUTOMAKE && exit 1 ! exit 0 --- 11,19 ---- cat > Makefile.am << 'END' install-data-local: # Tru64 Unix must die + @echo But putting a comment at the end # should be okay + # Tru64 Unix must die END ! $AUTOMAKE && test x"`grep '# Tru64 Unix must die' Makefile.in`" = x && exit 0 ! exit 1 Index: tests/dejagnu2.test =================================================================== RCS file: /cvs/automake/automake/tests/dejagnu2.test,v retrieving revision 1.1 diff -c -c -r1.1 dejagnu2.test *** dejagnu2.test 2001/08/05 22:02:33 1.1 --- dejagnu2.test 2001/09/20 02:12:24 *************** *** 8,14 **** AUTOMAKE_OPTIONS = dejagnu site.exp: ! echo foo END $AUTOMAKE || exit 1 --- 8,14 ---- AUTOMAKE_OPTIONS = dejagnu site.exp: ! echo foo END $AUTOMAKE || exit 1 Index: tests/else.test =================================================================== RCS file: /cvs/automake/automake/tests/else.test,v retrieving revision 1.1 diff -c -c -r1.1 else.test *** else.test 1998/09/27 21:29:44 1.1 --- else.test 2001/09/20 02:12:24 *************** *** 19,22 **** END $AUTOMAKE > out 2>&1 && exit 1 ! grep :7: out --- 19,22 ---- END $AUTOMAKE > out 2>&1 && exit 1 ! grep :5: out