Wed Sep 24 16:10:37 1997 Tom Tromey <tromey@cygnus.com>
+ * 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.
{
# 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;
}
}
}
- 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;
}
}