# Files found by scanning configure.ac for LIBOBJS.
my %libsources = ();
-# Names used in AC_CONFIG_HEADER call.
+# Names used in AC_CONFIG_HEADERS call.
my @config_headers = ();
# Names used in AC_CONFIG_LINKS call.
# List of files in AC_CONFIG_FILES/AC_OUTPUT without Makefile.am's,
# and their outputs.
my @other_input_files = ();
-# Where each AC_CONFIG_FILES/AC_OUTPUT/AC_CONFIG_LINK/AC_CONFIG_HEADER appears.
-# The keys are the files created by these macros.
+# Where each AC_CONFIG_FILES/AC_OUTPUT/AC_CONFIG_LINK/AC_CONFIG_HEADERS
+# appears. The keys are the files created by these macros.
my %ac_config_files_location = ();
# The condition under which AC_CONFIG_FOOS appears.
my %ac_config_files_condition = ();
'linker' => 'LINK',
'link' => '$(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@',
'compile_flag' => '-c',
+ 'output_flag' => '-o',
'libtool_tag' => 'CC',
'extensions' => ['.c']);
################################################################
-# Handle AUTOMAKE_OPTIONS variable. Return 1 on error, 0 otherwise.
+# Handle AUTOMAKE_OPTIONS variable. Return 0 on error, 1 otherwise.
sub handle_options ()
{
my $var = var ('AUTOMAKE_OPTIONS');
my @options = map { { option => $_->[1], where => $_->[0] } }
$var->value_as_list_recursive (cond_filter => TRUE,
location => 1);
- return 1 if process_option_list (@options);
+ return 0 unless process_option_list (@options);
}
if ($strictness == GNITS)
set_option ('check-news', INTERNAL);
}
- return 0;
+ return 1;
}
# shadow_unconditionally ($varname, $where)
if (((! option 'no-dependencies') && $lang->autodep ne 'no')
|| defined $lang->compile)
{
- # Some C compilers don't support -c -o. Use it only if really
- # needed.
- my $output_flag = $lang->output_flag || '';
- $output_flag = '-o'
- if (! $output_flag
- && $lang->name eq 'c'
- && option 'subdir-objects');
-
# Compute a possible derived extension.
# This is not used by depend2.am.
my $der_ext = ($lang->output_extensions->($ext))[0];
COMPILE => '$(' . $lang->compiler . ')',
LTCOMPILE => '$(LT' . $lang->compiler . ')',
- -o => $output_flag,
+ -o => $lang->output_flag,
SUBDIROBJ => !! option 'subdir-objects');
}
# was once done when the (now removed) 'cygnus' option was
# given. See automake bug#11034 for more discussion.
my $insrc = 1;
+ my $soutdir = '$(srcdir)/' . $outdir;
if (option 'info-in-builddir')
{
EOF
}
- $outdir = '$(srcdir)/' . $outdir if $insrc;
+ $outdir = $soutdir if $insrc;
# If user specified file_TEXINFOS, then use that as explicit
# dependency list.
@texi_deps = ();
- push (@texi_deps, "$outdir$vtexi") if $vtexi;
+ push (@texi_deps, "${soutdir}${vtexi}") if $vtexi;
my $canonical = canonicalize ($infobase);
if (var ($canonical . "_TEXINFOS"))
new Automake::Location,
TEXI => $texi,
VTI => $vti,
- STAMPVTI => "${outdir}stamp-$vti",
- VTEXI => "$outdir$vtexi",
+ STAMPVTI => "${soutdir}stamp-$vti",
+ VTEXI => "$soutdir$vtexi",
MDDIR => $conf_dir,
DIRSTAMP => $dirstamp);
}
}
elsif ($macro eq 'AM_PROG_MKDIR_P')
{
- # FIXME: we are no longer going to remove this! adjust warning
- # FIXME: message accordingly.
msg 'obsolete', $where, <<'EOF';
-The 'AM_PROG_MKDIR_P' macro is deprecated, and will soon be removed.
+The 'AM_PROG_MKDIR_P' macro is deprecated, and its use is discouraged.
You should use the Autoconf-provided 'AC_PROG_MKDIR_P' macro instead,
and use '$(MKDIR_P)' instead of '$(mkdir_p)'in your Makefile.am files.
EOF
{
my @opts = split (' ', $args[1]);
@opts = map { { option => $_, where => $where } } @opts;
- exit $exit_code if process_global_option_list (@opts);
+ exit $exit_code unless process_global_option_list (@opts);
}
}
elsif ($macro eq 'AM_MAINTAINER_MODE')
# Update the pattern of known extensions.
accept_extensions (@{$lang->extensions});
- # Update the $suffix_rule map.
+ # Update the suffix rules map.
foreach my $suffix (@{$lang->extensions})
{
foreach my $dest ($lang->output_extensions->($suffix))
{
my ($source_ext, $obj) = @_;
- while (! $extension_map{$source_ext}
- && $source_ext ne $obj
- && exists $suffix_rules->{$source_ext}
- && exists $suffix_rules->{$source_ext}{$obj})
+ while (!$extension_map{$source_ext} && $source_ext ne $obj)
{
- $source_ext = $suffix_rules->{$source_ext}{$obj}[0];
+ my $new_source_ext = next_in_suffix_chain ($source_ext, $obj);
+ last if not defined $new_source_ext;
+ $source_ext = $new_source_ext;
}
return $source_ext;
$relative_dir = dirname ($makefile);
read_main_am_file ($makefile_am, $makefile_in);
- if (handle_options)
+ if (not handle_options)
{
# Process buffered warnings.
flush_messages;