"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "bin/automake.in" between
automake-1.16.2.tar.xz and automake-1.16.3.tar.xz

About: GNU Automake is a Makefile generator (input Makefile.am, output Makefile.in; intended for use with autoconf).

automake.in  (automake-1.16.2.tar.xz):automake.in  (automake-1.16.3.tar.xz)
#!@PERL@ -w #!@PERL@
# automake - create Makefile.in from Makefile.am -*- perl -*- # automake - create Makefile.in from Makefile.am -*- perl -*-
# @configure_input@ # @configure_input@
# Copyright (C) 1994-2020 Free Software Foundation, Inc. # Copyright (C) 1994-2020 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify # This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by # it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option) # the Free Software Foundation; either version 2, or (at your option)
# any later version. # any later version.
# This program is distributed in the hope that it will be useful, # This program is distributed in the hope that it will be useful,
skipping to change at line 25 skipping to change at line 25
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
# Originally written by David Mackenzie <djm@gnu.ai.mit.edu>. # Originally written by David Mackenzie <djm@gnu.ai.mit.edu>.
# Perl reimplementation by Tom Tromey <tromey@redhat.com>, and # Perl reimplementation by Tom Tromey <tromey@redhat.com>, and
# Alexandre Duret-Lutz <adl@gnu.org>. # Alexandre Duret-Lutz <adl@gnu.org>.
package Automake; package Automake;
use 5.006;
use strict; use strict;
use warnings FATAL => 'all';
BEGIN BEGIN
{ {
unshift (@INC, '@datadir@/@PACKAGE@-@APIVERSION@') unshift (@INC, '@datadir@/@PACKAGE@-@APIVERSION@')
unless $ENV{AUTOMAKE_UNINSTALLED}; unless $ENV{AUTOMAKE_UNINSTALLED};
# Override SHELL. This is required on DJGPP so that system() uses # Override SHELL. This is required on DJGPP so that system() uses
# bash, not COMMAND.COM which doesn't quote arguments properly. # bash, not COMMAND.COM which doesn't quote arguments properly.
# Other systems aren't expected to use $SHELL when Automake # Other systems aren't expected to use $SHELL when Automake
# runs, but it should be safe to drop the "if DJGPP" guard if # runs, but it should be safe to drop the "if DJGPP" guard if
# it turns up other systems need the same thing. After all, # it turns up other systems need the same thing. After all,
# if SHELL is used, ./configure's SHELL is always better than # if SHELL is used, ./configure's SHELL is always better than
# the user's SHELL (which may be something like tcsh). # the user's SHELL (which may be something like tcsh).
$ENV{'SHELL'} = '@SHELL@' if exists $ENV{'DJDIR'}; $ENV{'SHELL'} = '@SHELL@' if exists $ENV{'DJDIR'};
} }
use Carp;
use File::Basename;
use File::Spec;
use Automake::Config; use Automake::Config;
BEGIN BEGIN
{ {
if ($perl_threads) if ($perl_threads)
{ {
require threads; require threads;
import threads; import threads;
require Thread::Queue; require Thread::Queue;
import Thread::Queue; import Thread::Queue;
} }
skipping to change at line 69 skipping to change at line 75
use Automake::Location; use Automake::Location;
use Automake::Condition qw/TRUE FALSE/; use Automake::Condition qw/TRUE FALSE/;
use Automake::DisjConditions; use Automake::DisjConditions;
use Automake::Options; use Automake::Options;
use Automake::Variable; use Automake::Variable;
use Automake::VarDef; use Automake::VarDef;
use Automake::Rule; use Automake::Rule;
use Automake::RuleDef; use Automake::RuleDef;
use Automake::Wrap 'makefile_wrap'; use Automake::Wrap 'makefile_wrap';
use Automake::Language; use Automake::Language;
use File::Basename;
use File::Spec;
use Carp;
## ----------------------- ## ## ----------------------- ##
## Subroutine prototypes. ## ## Subroutine prototypes. ##
## ----------------------- ## ## ----------------------- ##
sub append_exeext (&$); sub append_exeext (&$);
sub check_gnits_standards (); sub check_gnits_standards ();
sub check_gnu_standards (); sub check_gnu_standards ();
sub check_trailing_slash ($\$); sub check_trailing_slash ($\$);
sub check_typos (); sub check_typos ();
skipping to change at line 4226 skipping to change at line 4229
# by --force-missing. # by --force-missing.
require_conf_file ($mkidpath, FOREIGN, 'mkinstalldirs'); require_conf_file ($mkidpath, FOREIGN, 'mkinstalldirs');
define_variable ('mkinstalldirs', define_variable ('mkinstalldirs',
"\$(SHELL) $am_config_aux_dir/mkinstalldirs", INTERNAL); "\$(SHELL) $am_config_aux_dir/mkinstalldirs", INTERNAL);
} }
else else
{ {
# Use $(install_sh), not $(MKDIR_P) because the latter requires # Use $(install_sh), not $(MKDIR_P) because the latter requires
# at least one argument, and $(mkinstalldirs) used to work # at least one argument, and $(mkinstalldirs) used to work
# even without arguments (e.g. $(mkinstalldirs) $(conditional_dir)). # even without arguments (e.g. $(mkinstalldirs) $(conditional_dir)).
# Also, $(MKDIR_P) uses the umask for any intermediate directories
# created, whereas we want them to be created with umask 022
# so that they are mode 755.
define_variable ('mkinstalldirs', '$(install_sh) -d', INTERNAL); define_variable ('mkinstalldirs', '$(install_sh) -d', INTERNAL);
} }
reject_var ('CONFIG_HEADER', reject_var ('CONFIG_HEADER',
"'CONFIG_HEADER' is an anachronism; now determined " "'CONFIG_HEADER' is an anachronism; now determined "
. "automatically\nfrom '$configure_ac'"); . "automatically\nfrom '$configure_ac'");
my @config_h; my @config_h;
foreach my $spec (@config_headers) foreach my $spec (@config_headers)
{ {
skipping to change at line 4914 skipping to change at line 4920
if ((my @invalid_test_suffixes = if ((my @invalid_test_suffixes =
grep { !is_valid_test_extension $_ } @test_suffixes) > 0) grep { !is_valid_test_extension $_ } @test_suffixes) > 0)
{ {
error $var->rdef (TRUE)->location, error $var->rdef (TRUE)->location,
"invalid test extensions: @invalid_test_suffixes"; "invalid test extensions: @invalid_test_suffixes";
} }
@test_suffixes = grep { is_valid_test_extension $_ } @test_suffixes; @test_suffixes = grep { is_valid_test_extension $_ } @test_suffixes;
if ($handle_exeext) if ($handle_exeext)
{ {
unshift (@test_suffixes, $at_exeext) unshift (@test_suffixes, $at_exeext)
unless $test_suffixes[0] eq $at_exeext; unless @test_suffixes && $test_suffixes[0] eq $at_exeext;
} }
unshift (@test_suffixes, ''); unshift (@test_suffixes, '');
transform_variable_recursively transform_variable_recursively
('TESTS', 'TEST_LOGS', 'am__testlogs', 1, INTERNAL, ('TESTS', 'TEST_LOGS', 'am__testlogs', 1, INTERNAL,
sub { sub {
my ($subvar, $val, $cond, $full_cond) = @_; my ($subvar, $val, $cond, $full_cond) = @_;
my $obj = $val; my $obj = $val;
return $obj return $obj
if $val =~ /^\@.*\@$/; if $val =~ /^\@.*\@$/;
skipping to change at line 5204 skipping to change at line 5210
_AM_COND_IF => 1, _AM_COND_IF => 1,
_AM_COND_ELSE => 1, _AM_COND_ELSE => 1,
_AM_COND_ENDIF => 1, _AM_COND_ENDIF => 1,
LT_SUPPORTED_TAG => 1, LT_SUPPORTED_TAG => 1,
_LT_AC_TAGCONFIG => 0, _LT_AC_TAGCONFIG => 0,
m4_include => 1, m4_include => 1,
m4_sinclude => 1, m4_sinclude => 1,
sinclude => 1, sinclude => 1,
); );
# Suppress all warnings from this invocation of autoconf.
# The user is presumably about to run autoconf themselves
# and will see its warnings then.
local $ENV{WARNINGS} = 'none';
my $traces = ($ENV{AUTOCONF} || '@am_AUTOCONF@') . " "; my $traces = ($ENV{AUTOCONF} || '@am_AUTOCONF@') . " ";
# Use a separator unlikely to be used, not ':', the default, which # Use a separator unlikely to be used, not ':', the default, which
# has a precise meaning for AC_CONFIG_FILES and so on. # has a precise meaning for AC_CONFIG_FILES and so on.
$traces .= join (' ', $traces .= join (' ',
map { "--trace=$_" . ':\$f:\$l::\$d::\$n::\${::}%' } map { "--trace=$_" . ':\$f:\$l::\$d::\$n::\${::}%' }
(keys %traced)); (keys %traced));
verb "running WARNINGS=$ENV{WARNINGS} $traces";
my $tracefh = new Automake::XFile ("$traces $filename |"); my $tracefh = new Automake::XFile ("$traces $filename |");
verb "reading $traces";
@cond_stack = (); @cond_stack = ();
my $where; my $where;
while ($_ = $tracefh->getline) while ($_ = $tracefh->getline)
{ {
chomp; chomp;
my ($here, $depth, @args) = split (/::/); my ($here, $depth, @args) = split (/::/);
$where = new Automake::Location $here; $where = new Automake::Location $here;
my $macro = $args[0]; my $macro = $args[0];
skipping to change at line 5678 skipping to change at line 5689
my @vala_sources = grep { /\.(vala|vapi)$/ } ($var->value_as_list_recursive); my @vala_sources = grep { /\.(vala|vapi)$/ } ($var->value_as_list_recursive);
# For automake bug#11229. # For automake bug#11229.
return unless @vala_sources; return unless @vala_sources;
foreach my $vala_file (@vala_sources) foreach my $vala_file (@vala_sources)
{ {
my $c_file = $vala_file; my $c_file = $vala_file;
if ($c_file =~ s/(.*)\.vala$/$1.c/) if ($c_file =~ s/(.*)\.vala$/$1.c/)
{ {
$c_file = "\$(srcdir)/$c_file"; my $built_c_file = "\$(builddir)/$c_file";
$output_rules .= "$c_file: \$(srcdir)/${derived}_vala.stamp\n" my $built_dir = dirname $built_c_file;
. "\t\@if test -f \$@; then :; else rm -f \$(srcdir)/${derived}_vala my $base_c_file = basename $c_file;
.stamp; fi\n" $output_rules .= "$built_c_file: \$(builddir)/${derived}_vala.stamp\n"
. "\t\@if test ! -f \$@ && test \$(srcdir) != \$(builddir) && test -
n \"\$\$(find -L \$(srcdir)/$c_file -prune -newer \$(srcdir)/$vala_file)\"; then
cp -p \$(srcdir)/$c_file $built_c_file; fi\n"
. "\t\@if test -f \$@; then :; else rm -f \$(builddir)/${derived}_va
la.stamp; fi\n"
. "\t\@if test -f \$@; then :; else \\\n" . "\t\@if test -f \$@; then :; else \\\n"
. "\t \$(MAKE) \$(AM_MAKEFLAGS) \$(srcdir)/${derived}_vala.stamp; \ . "\t \$(MAKE) \$(AM_MAKEFLAGS) \$(builddir)/${derived}_vala.stamp;
\\n" \\\n"
. "\t if test $built_dir != .; then mv $base_c_file $built_dir/; fi
\\\n"
. "\tfi\n"; . "\tfi\n";
$clean_files{$c_file} = MAINTAINER_CLEAN; $clean_files{$built_c_file} = DIST_CLEAN;
$clean_files{"\$(srcdir)/$c_file"} = MAINTAINER_CLEAN;
} }
} }
# Add rebuild rules for generated header and vapi files # Add rebuild rules for generated header and vapi files
my $flags = var ($derived . '_VALAFLAGS'); my $flags = var ($derived . '_VALAFLAGS');
if ($flags) if ($flags)
{ {
my $lastflag = ''; my $lastflag = '';
foreach my $flag ($flags->value_as_list_recursive) foreach my $flag ($flags->value_as_list_recursive)
{ {
if (grep (/$lastflag/, ('-H', '-h', '--header', '--internal-header', if (grep (/^$lastflag$/, ('-H', '-h', '--header', '--internal-header',
'--vapi', '--internal-vapi', '--gir'))) '--vapi', '--internal-vapi', '--gir')))
{ {
my $headerfile = "\$(srcdir)/$flag"; my $headerfile = "\$(builddir)/$flag";
$output_rules .= "$headerfile: \$(srcdir)/${derived}_vala.stamp\n" $output_rules .= "$headerfile: \$(builddir)/${derived}_vala.stamp\n
. "\t\@if test -f \$@; then :; else rm -f \$(srcdir)/${derived}_v "
ala.stamp; fi\n" . "\t\@if test -f \$@; then :; else rm -f \$(builddir)/${derived}
_vala.stamp; fi\n"
. "\t\@if test -f \$@; then :; else \\\n" . "\t\@if test -f \$@; then :; else \\\n"
. "\t \$(MAKE) \$(AM_MAKEFLAGS) \$(srcdir)/${derived}_vala.stamp ; \\\n" . "\t \$(MAKE) \$(AM_MAKEFLAGS) \$(builddir)/${derived}_vala.sta mp; \\\n"
. "\tfi\n"; . "\tfi\n";
# valac is not used when building from dist tarballs # valac is not used when building from dist tarballs
# distribute the generated files # distribute the generated files
push_dist_common ($headerfile); push_dist_common ($headerfile);
$clean_files{$headerfile} = MAINTAINER_CLEAN; $clean_files{$headerfile} = MAINTAINER_CLEAN;
} }
if (grep (/$lastflag/, ('--library')))
{
my $headerfile = "\$(builddir)/$flag";
$output_rules .= "$headerfile.vapi: \$(builddir)/${derived}_vala.st
amp\n"
. "\t\@if test -f \$@; then :; else rm -f \$(builddir)/${derived}
_vala.stamp; fi\n"
. "\t\@if test -f \$@; then :; else \\\n"
. "\t \$(MAKE) \$(AM_MAKEFLAGS) \$(builddir)/${derived}_vala.sta
mp; \\\n"
. "\tfi\n";
# valac is not used when building from dist tarballs
# distribute the generated files
my $vapi = "$headerfile.vapi";
push_dist_common ($vapi);
$clean_files{$headerfile.'.vapi'} = MAINTAINER_CLEAN;
}
$lastflag = $flag; $lastflag = $flag;
} }
} }
my $compile = $self->compile; my $compile = $self->compile;
# Rewrite each occurrence of 'AM_VALAFLAGS' in the compile # Rewrite each occurrence of 'AM_VALAFLAGS' in the compile
# rule into '${derived}_VALAFLAGS' if it exists. # rule into '${derived}_VALAFLAGS' if it exists.
my $val = "${derived}_VALAFLAGS"; my $val = "${derived}_VALAFLAGS";
$compile =~ s/\(AM_VALAFLAGS\)/\($val\)/ $compile =~ s/\(AM_VALAFLAGS\)/\($val\)/
skipping to change at line 5733 skipping to change at line 5764
# it should not be overridden in the Makefile... # it should not be overridden in the Makefile...
check_user_variables 'VALAFLAGS'; check_user_variables 'VALAFLAGS';
my $dirname = dirname ($name); my $dirname = dirname ($name);
# Only generate C code, do not run C compiler # Only generate C code, do not run C compiler
$compile .= " -C"; $compile .= " -C";
my $verbose = verbose_flag ('VALAC'); my $verbose = verbose_flag ('VALAC');
my $silent = silent_flag (); my $silent = silent_flag ();
my $stampfile = "\$(srcdir)/${derived}_vala.stamp"; my $stampfile = "\$(builddir)/${derived}_vala.stamp";
$output_rules .= $output_rules .=
"\$(srcdir)/${derived}_vala.stamp: @vala_sources\n". "\$(builddir)/${derived}_vala.stamp: @vala_sources\n".
# Since the C files generated from the vala sources depend on the # Since the C files generated from the vala sources depend on the
# ${derived}_vala.stamp file, we must ensure its timestamp is older than # ${derived}_vala.stamp file, we must ensure its timestamp is older than
# those of the C files generated by the valac invocation below (this is # those of the C files generated by the valac invocation below (this is
# especially important on systems with sub-second timestamp resolution). # especially important on systems with sub-second timestamp resolution).
# Thus we need to create the stamp file *before* invoking valac, and to # Thus we need to create the stamp file *before* invoking valac, and to
# move it to its final location only after valac has been invoked. # move it to its final location only after valac has been invoked.
"\t${silent}rm -f \$\@ && echo stamp > \$\@-t\n". "\t${silent}rm -f \$\@ && echo stamp > \$\@-t\n".
"\t${verbose}\$(am__cd) \$(srcdir) && $compile @vala_sources\n". "\t${verbose}$compile \$^\n".
"\t${silent}mv -f \$\@-t \$\@\n"; "\t${silent}mv -f \$\@-t \$\@\n";
push_dist_common ($stampfile); push_dist_common ($stampfile);
$clean_files{$stampfile} = MAINTAINER_CLEAN; $clean_files{$stampfile} = MAINTAINER_CLEAN;
} }
# Add output rules to invoke valac and create stamp file as a witness # Add output rules to invoke valac and create stamp file as a witness
# to handle multiple outputs. This function is called after all source # to handle multiple outputs. This function is called after all source
# file processing is done. # file processing is done.
skipping to change at line 8025 skipping to change at line 8056
--gnu set strictness to gnu --gnu set strictness to gnu
Library files: Library files:
-a, --add-missing add missing standard files to package -a, --add-missing add missing standard files to package
--libdir=DIR set directory storing library files --libdir=DIR set directory storing library files
--print-libdir print directory storing library files --print-libdir print directory storing library files
-c, --copy with -a, copy missing files (default is symlink) -c, --copy with -a, copy missing files (default is symlink)
-f, --force-missing force update of standard files -f, --force-missing force update of standard files
"; ";
Automake::ChannelDefs::usage; print Automake::ChannelDefs::usage (), "\n";
print "\nFiles automatically distributed if found " . print "\nFiles automatically distributed if found " .
"(always):\n"; "(always):\n";
print_autodist_files @common_files; print_autodist_files @common_files;
print "\nFiles automatically distributed if found " . print "\nFiles automatically distributed if found " .
"(under certain conditions):\n"; "(under certain conditions):\n";
print_autodist_files @common_sometimes; print_autodist_files @common_sometimes;
print ' print '
Report bugs to <@PACKAGE_BUGREPORT@>. Report bugs to <@PACKAGE_BUGREPORT@>.
skipping to change at line 8094 skipping to change at line 8125
'v|verbose' => sub { setup_channel 'verb', silent => 0; }, 'v|verbose' => sub { setup_channel 'verb', silent => 0; },
'W|warnings=s' => \@warnings, 'W|warnings=s' => \@warnings,
); );
use Automake::Getopt (); use Automake::Getopt ();
Automake::Getopt::parse_options %cli_options; Automake::Getopt::parse_options %cli_options;
set_strictness ($strict); set_strictness ($strict);
my $cli_where = new Automake::Location; my $cli_where = new Automake::Location;
set_global_option ('no-dependencies', $cli_where) if $ignore_deps; set_global_option ('no-dependencies', $cli_where) if $ignore_deps;
for my $warning (@warnings) parse_warnings @warnings;
{
parse_warnings ('-W', $warning);
}
return unless @ARGV; return unless @ARGV;
my $errspec = 0; my $errspec = 0;
foreach my $arg (@ARGV) foreach my $arg (@ARGV)
{ {
fatal ("empty argument\nTry '$0 --help' for more information") fatal ("empty argument\nTry '$0 --help' for more information")
if ($arg eq ''); if ($arg eq '');
# Handle $local:$input syntax. # Handle $local:$input syntax.
 End of changes. 22 change blocks. 
28 lines changed or deleted 63 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)