From d733c05e9b8cb54b75c6989a3845925e650a9eca Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 24 Sep 1997 23:01:19 +0000 Subject: [PATCH] de-ansi patch change to fix bug in earlier AC_OUTPUT fix --- ChangeLog | 3 +++ automake.in | 17 ++++++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 45c97dac..27a21e5a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ Wed Sep 24 16:10:37 1997 Tom Tromey + * automake.in (handle_yacc_lex_cxx): Handle de-ansi-fied sources + in srcdir as well as build dir. + * automake.in (scan_one_configure_file): Detect AC_OUTPUT(). (handle_single_transform_list): Don't apply length() to a list. diff --git a/automake.in b/automake.in index ff687872..05e9e80e 100755 --- a/automake.in +++ b/automake.in @@ -923,8 +923,16 @@ sub handle_yacc_lex_cxx { # Each _.c file must depend on ansi2knr; otherwise it # might be used in a parallel build before it is built. - $output_rules .= $base . "_.c: $base.c \$(ANSI2KNR)\n\t" - . '$(ANSI2KNR) ' . $base . '.c ' . $base . "_.c\n"; + # We need to support files in the srcdir and in the build + # dir (because these files might be auto-generated. But + # we can't use $< -- some makes only define $< during a + # suffix rule. + $output_rules .= ($base . "_.c: $base.c \$(ANSI2KNR)\n\t" + . '$(ANSI2KNR) ' + . '`if test -f $(srcdir)/' . $base . '.c' + . '; then echo $(srcdir)/' . $base . '.c' + . '; else echo ' . $base . '.c; fi` ' + . $base . "_.c\n"); push (@objects, $base . '_.o'); push (@objects, $base . '_.lo') if $seen_libtool; } @@ -3952,11 +3960,10 @@ sub scan_one_configure_file } } - if ($closing) + if ($closing && @make_input_list == 0 && @other_input_files == 0) { &am_conf_line_error ($filename, $ac_output_line, - "No files mentioned in \`AC_OUTPUT'") - if @make_input_list == 0 && @other_input_files == 0; + "No files mentioned in \`AC_OUTPUT'"); exit 1; } } -- 2.43.5