From b844012b0cc1bafbe67ef0e34d052fcc161d8990 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Wed, 24 Sep 1997 23:01:20 +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 45c97da..27a21e5 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 ff68787..05e9e80 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.7.4