| Current Path : /home/emeraadmin/www/4d695/ |
| Current File : /home/emeraadmin/www/4d695/automake-1.16.zip |
PK (��\t�* * Automake/ChannelDefs.pmnu �[��� # Copyright (C) 2002-2018 Free Software Foundation, Inc.
# 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
package Automake::ChannelDefs;
use Automake::Config;
BEGIN
{
if ($perl_threads)
{
require threads;
import threads;
}
}
use Automake::Channels;
=head1 NAME
Automake::ChannelDefs - channel definitions for Automake and helper functions
=head1 SYNOPSIS
use Automake::ChannelDefs;
Automake::ChannelDefs::usage ();
prog_error ($MESSAGE, [%OPTIONS]);
error ($WHERE, $MESSAGE, [%OPTIONS]);
error ($MESSAGE);
fatal ($WHERE, $MESSAGE, [%OPTIONS]);
fatal ($MESSAGE);
verb ($MESSAGE, [%OPTIONS]);
switch_warning ($CATEGORY);
parse_WARNINGS ();
parse_warnings ($OPTION, $ARGUMENT);
Automake::ChannelDefs::set_strictness ($STRICTNESS_NAME);
=head1 DESCRIPTION
This packages defines channels that can be used in Automake to
output diagnostics and other messages (via C<msg()>). It also defines
some helper function to enable or disable these channels, and some
shorthand function to output on specific channels.
=cut
use 5.006;
use strict;
use Exporter;
use vars qw (@ISA @EXPORT);
@ISA = qw (Exporter);
@EXPORT = qw (&prog_error &error &fatal &verb
&switch_warning &parse_WARNINGS &parse_warnings);
=head2 CHANNELS
The following channels can be used as the first argument of
C<Automake::Channel::msg>. For some of them we list a shorthand
function that makes the code more readable.
=over 4
=item C<fatal>
Fatal errors. Use C<&fatal> to send messages over this channel.
=item C<error>
Common errors. Use C<&error> to send messages over this channel.
=item C<error-gnu>
Errors related to GNU Standards.
=item C<error-gnu/warn>
Errors related to GNU Standards that should be warnings in 'foreign' mode.
=item C<error-gnits>
Errors related to GNITS Standards (silent by default).
=item C<automake>
Internal errors. Use C<&prog_error> to send messages over this channel.
=item C<gnu>
Warnings related to GNU Coding Standards.
=item C<obsolete>
Warnings about obsolete features (silent by default).
=item C<override>
Warnings about user redefinitions of Automake rules or
variables (silent by default).
=item C<portability>
Warnings about non-portable constructs.
=item C<extra-portability>
Extra warnings about non-portable constructs covering obscure tools.
=item C<syntax>
Warnings about weird syntax, unused variables, typos...
=item C<unsupported>
Warnings about unsupported (or mis-supported) features.
=item C<verb>
Messages output in C<--verbose> mode. Use C<&verb> to send such messages.
=item C<note>
Informative messages.
=back
=cut
# Initialize our list of error/warning channels.
# Do not forget to update &usage and the manual
# if you add or change a warning channel.
register_channel 'fatal', type => 'fatal', uniq_part => UP_NONE, ordered => 0;
register_channel 'error', type => 'error';
register_channel 'error-gnu', type => 'error';
register_channel 'error-gnu/warn', type => 'error';
register_channel 'error-gnits', type => 'error', silent => 1;
register_channel 'automake', type => 'fatal', backtrace => 1,
header => ("####################\n" .
"## Internal Error ##\n" .
"####################\n"),
footer => "\nPlease contact <$PACKAGE_BUGREPORT>.",
uniq_part => UP_NONE, ordered => 0;
register_channel 'extra-portability', type => 'warning', silent => 1;
register_channel 'gnu', type => 'warning';
register_channel 'obsolete', type => 'warning';
register_channel 'override', type => 'warning', silent => 1;
register_channel 'portability', type => 'warning', silent => 1;
register_channel 'portability-recursive', type => 'warning', silent => 1;
register_channel 'syntax', type => 'warning';
register_channel 'unsupported', type => 'warning';
register_channel 'verb', type => 'debug', silent => 1, uniq_part => UP_NONE,
ordered => 0;
register_channel 'note', type => 'debug', silent => 0;
setup_channel_type 'warning', header => 'warning: ';
setup_channel_type 'error', header => 'error: ';
setup_channel_type 'fatal', header => 'error: ';
=head2 FUNCTIONS
=over 4
=item C<usage ()>
Display warning categories.
=cut
sub usage ()
{
print <<EOF;
Warning categories include:
gnu GNU coding standards (default in gnu and gnits modes)
obsolete obsolete features or constructions
override user redefinitions of Automake rules or variables
portability portability issues (default in gnu and gnits modes)
extra-portability extra portability issues related to obscure tools
syntax dubious syntactic constructs (default)
unsupported unsupported or incomplete features (default)
all all the warnings
no-CATEGORY turn off warnings in CATEGORY
none turn off all the warnings
error treat warnings as errors
EOF
}
=item C<prog_error ($MESSAGE, [%OPTIONS])>
Signal a programming error (on channel C<automake>),
display C<$MESSAGE>, and exit 1.
=cut
sub prog_error ($;%)
{
my ($msg, %opts) = @_;
msg 'automake', '', $msg, %opts;
}
=item C<error ($WHERE, $MESSAGE, [%OPTIONS])>
=item C<error ($MESSAGE)>
Uncategorized errors.
=cut
sub error ($;$%)
{
my ($where, $msg, %opts) = @_;
msg ('error', $where, $msg, %opts);
}
=item C<fatal ($WHERE, $MESSAGE, [%OPTIONS])>
=item C<fatal ($MESSAGE)>
Fatal errors.
=cut
sub fatal ($;$%)
{
my ($where, $msg, %opts) = @_;
msg ('fatal', $where, $msg, %opts);
}
=item C<verb ($MESSAGE, [%OPTIONS])>
C<--verbose> messages.
=cut
sub verb ($;%)
{
my ($msg, %opts) = @_;
$msg = "thread " . threads->tid . ": " . $msg
if $perl_threads;
msg 'verb', '', $msg, %opts;
}
=item C<switch_warning ($CATEGORY)>
If C<$CATEGORY> is C<mumble>, turn on channel C<mumble>.
If it's C<no-mumble>, turn C<mumble> off.
Else handle C<all> and C<none> for completeness.
=cut
sub switch_warning ($)
{
my ($cat) = @_;
my $has_no = 0;
if ($cat =~ /^no-(.*)$/)
{
$cat = $1;
$has_no = 1;
}
if ($cat eq 'all')
{
setup_channel_type 'warning', silent => $has_no;
}
elsif ($cat eq 'none')
{
setup_channel_type 'warning', silent => ! $has_no;
}
elsif ($cat eq 'error')
{
$warnings_are_errors = ! $has_no;
# Set exit code if Perl warns about something
# (like uninitialized variables).
$SIG{"__WARN__"} =
$has_no ? 'DEFAULT' : sub { print STDERR @_; $exit_code = 1; };
}
elsif (channel_type ($cat) eq 'warning')
{
setup_channel $cat, silent => $has_no;
#
# Handling of portability warnings is trickier. For relevant tests,
# see 'dollarvar2', 'extra-portability' and 'extra-portability3'.
#
# -Wportability-recursive and -Wno-portability-recursive should not
# have any effect on other 'portability' or 'extra-portability'
# warnings, so there's no need to handle them separately or ad-hoc.
#
if ($cat eq 'extra-portability' && ! $has_no) # -Wextra-portability
{
# -Wextra-portability must enable 'portability' and
# 'portability-recursive' warnings.
setup_channel 'portability', silent => 0;
setup_channel 'portability-recursive', silent => 0;
}
if ($cat eq 'portability') # -Wportability or -Wno-portability
{
if ($has_no) # -Wno-portability
{
# -Wno-portability must disable 'extra-portability' and
# 'portability-recursive' warnings.
setup_channel 'portability-recursive', silent => 1;
setup_channel 'extra-portability', silent => 1;
}
else # -Wportability
{
# -Wportability must enable 'portability-recursive'
# warnings. But it should have no influence over the
# 'extra-portability' warnings.
setup_channel 'portability-recursive', silent => 0;
}
}
}
else
{
return 1;
}
return 0;
}
=item C<parse_WARNINGS ()>
Parse the WARNINGS environment variable.
=cut
sub parse_WARNINGS ()
{
if (exists $ENV{'WARNINGS'})
{
# Ignore unknown categories. This is required because WARNINGS
# should be honored by many tools.
switch_warning $_ foreach (split (',', $ENV{'WARNINGS'}));
}
}
=item C<parse_warnings ($OPTION, $ARGUMENT)>
Parse the argument of C<--warning=CATEGORY> or C<-WCATEGORY>.
C<$OPTIONS> is C<"--warning"> or C<"-W">, C<$ARGUMENT> is C<CATEGORY>.
This is meant to be used as an argument to C<Getopt>.
=cut
sub parse_warnings ($$)
{
my ($opt, $categories) = @_;
foreach my $cat (split (',', $categories))
{
msg 'unsupported', "unknown warning category '$cat'"
if switch_warning $cat;
}
}
=item C<set_strictness ($STRICTNESS_NAME)>
Configure channels for strictness C<$STRICTNESS_NAME>.
=cut
sub set_strictness ($)
{
my ($name) = @_;
if ($name eq 'gnu')
{
setup_channel 'error-gnu', silent => 0;
setup_channel 'error-gnu/warn', silent => 0, type => 'error';
setup_channel 'error-gnits', silent => 1;
setup_channel 'portability', silent => 0;
setup_channel 'extra-portability', silent => 1;
setup_channel 'gnu', silent => 0;
}
elsif ($name eq 'gnits')
{
setup_channel 'error-gnu', silent => 0;
setup_channel 'error-gnu/warn', silent => 0, type => 'error';
setup_channel 'error-gnits', silent => 0;
setup_channel 'portability', silent => 0;
setup_channel 'extra-portability', silent => 1;
setup_channel 'gnu', silent => 0;
}
elsif ($name eq 'foreign')
{
setup_channel 'error-gnu', silent => 1;
setup_channel 'error-gnu/warn', silent => 0, type => 'warning';
setup_channel 'error-gnits', silent => 1;
setup_channel 'portability', silent => 1;
setup_channel 'extra-portability', silent => 1;
setup_channel 'gnu', silent => 1;
}
else
{
prog_error "level '$name' not recognized";
}
}
=back
=head1 SEE ALSO
L<Automake::Channels>
=head1 HISTORY
Written by Alexandre Duret-Lutz E<lt>F<adl@gnu.org>E<gt>.
=cut
1;
PK (��\��C{�O �O Automake/Channels.pmnu �[��� # Copyright (C) 2002-2018 Free Software Foundation, Inc.
# 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
###############################################################
# The main copy of this file is in Automake's git repository. #
# Updates should be sent to automake-patches@gnu.org. #
###############################################################
package Automake::Channels;
=head1 NAME
Automake::Channels - support functions for error and warning management
=head1 SYNOPSIS
use Automake::Channels;
# Register a channel to output warnings about unused variables.
register_channel 'unused', type => 'warning';
# Register a channel for system errors.
register_channel 'system', type => 'error', exit_code => 4;
# Output a message on channel 'unused'.
msg 'unused', "$file:$line", "unused variable '$var'";
# Make the 'unused' channel silent.
setup_channel 'unused', silent => 1;
# Turn on all channels of type 'warning'.
setup_channel_type 'warning', silent => 0;
# Redirect all channels to push messages on a Thread::Queue using
# the specified serialization key.
setup_channel_queue $queue, $key;
# Output a message pending in a Thread::Queue.
pop_channel_queue $queue;
# Treat all warnings as errors.
$warnings_are_errors = 1;
# Exit with the greatest exit code encountered so far.
exit $exit_code;
=head1 DESCRIPTION
This perl module provides support functions for handling diagnostic
channels in programs. Channels can be registered to convey fatal,
error, warning, or debug messages. Each channel has various options
(e.g. is the channel silent, should duplicate messages be removed,
etc.) that can also be overridden on a per-message basis.
=cut
use 5.006;
use strict;
use Exporter;
use Carp;
use File::Basename;
use vars qw (@ISA @EXPORT %channels $me);
@ISA = qw (Exporter);
@EXPORT = qw ($exit_code $warnings_are_errors
&reset_local_duplicates &reset_global_duplicates
®ister_channel &msg &exists_channel &channel_type
&setup_channel &setup_channel_type
&dup_channel_setup &drop_channel_setup
&buffer_messages &flush_messages
&setup_channel_queue &pop_channel_queue
US_GLOBAL US_LOCAL
UP_NONE UP_TEXT UP_LOC_TEXT);
$me = basename $0;
=head2 Global Variables
=over 4
=item C<$exit_code>
The greatest exit code seen so far. C<$exit_code> is updated from
the C<exit_code> options of C<fatal> and C<error> channels.
=cut
use vars qw ($exit_code);
$exit_code = 0;
=item C<$warnings_are_errors>
Set this variable to 1 if warning messages should be treated as
errors (i.e. if they should update C<$exit_code>).
=cut
use vars qw ($warnings_are_errors);
$warnings_are_errors = 0;
=back
=head2 Constants
=over 4
=item C<UP_NONE>, C<UP_TEXT>, C<UP_LOC_TEXT>
Possible values for the C<uniq_part> options. This selects the part
of the message that should be considered when filtering out duplicates.
If C<UP_LOC_TEXT> is used, the location and the explanation message
are used for filtering. If C<UP_TEXT> is used, only the explanation
message is used (so the same message will be filtered out if it appears
at different locations). C<UP_NONE> means that duplicate messages
should be output.
=cut
use constant UP_NONE => 0;
use constant UP_TEXT => 1;
use constant UP_LOC_TEXT => 2;
=item C<US_LOCAL>, C<US_GLOBAL>
Possible values for the C<uniq_scope> options.
Use C<US_GLOBAL> for error messages that should be printed only
once during the execution of the program, C<US_LOCAL> for message that
should be printed only once per file. (Actually, C<Channels> does not
do this now when files are changed, it relies on you calling
C<reset_local_duplicates> when this happens.)
=cut
# possible values for uniq_scope
use constant US_LOCAL => 0;
use constant US_GLOBAL => 1;
=back
=head2 Options
Channels accept the options described below. These options can be
passed as a hash to the C<register_channel>, C<setup_channel>, and C<msg>
functions. The possible keys, with their default value are:
=over
=item C<type =E<gt> 'warning'>
The type of the channel. One of C<'debug'>, C<'warning'>, C<'error'>, or
C<'fatal'>. Fatal messages abort the program when they are output.
Error messages update the exit status. Debug and warning messages are
harmless, except that warnings are treated as errors if
C<$warnings_are_errors> is set.
=item C<exit_code =E<gt> 1>
The value to update C<$exit_code> with when a fatal or error message
is emitted. C<$exit_code> is also updated for warnings output
when C<$warnings_are_errors> is set.
=item C<file =E<gt> \*STDERR>
The file where the error should be output.
=item C<silent =E<gt> 0>
Whether the channel should be silent. Use this do disable a
category of warning, for instance.
=item C<ordered =E<gt> 1>
Whether, with multi-threaded execution, the message should be queued
for ordered output.
=item C<uniq_part =E<gt> UP_LOC_TEXT>
The part of the message subject to duplicate filtering. See the
documentation for the C<UP_NONE>, C<UP_TEXT>, and C<UP_LOC_TEXT>
constants above.
C<uniq_part> can also be set to an arbitrary string that will be used
instead of the message when considering duplicates.
=item C<uniq_scope =E<gt> US_LOCAL>
The scope of duplicate filtering. See the documentation for the
C<US_LOCAL>, and C<US_GLOBAL> constants above.
=item C<header =E<gt> ''>
A string to prepend to each message emitted through this channel.
With partial messages, only the first part will have C<header>
prepended.
=item C<footer =E<gt> ''>
A string to append to each message emitted through this channel.
With partial messages, only the final part will have C<footer>
appended.
=item C<backtrace =E<gt> 0>
Die with a stack backtrace after displaying the message.
=item C<partial =E<gt> 0>
When set, indicates a partial message that should
be output along with the next message with C<partial> unset.
Several partial messages can be stacked this way.
Duplicate filtering will apply to the I<global> message resulting from
all I<partial> messages, using the options from the last (non-partial)
message. Linking associated messages is the main reason to use this
option.
For instance the following messages
msg 'channel', 'foo:2', 'redefinition of A ...';
msg 'channel', 'foo:1', '... A previously defined here';
msg 'channel', 'foo:3', 'redefinition of A ...';
msg 'channel', 'foo:1', '... A previously defined here';
will result in
foo:2: redefinition of A ...
foo:1: ... A previously defined here
foo:3: redefinition of A ...
where the duplicate "I<... A previously defined here>" has been
filtered out.
Linking these messages using C<partial> as follows will prevent the
fourth message to disappear.
msg 'channel', 'foo:2', 'redefinition of A ...', partial => 1;
msg 'channel', 'foo:1', '... A previously defined here';
msg 'channel', 'foo:3', 'redefinition of A ...', partial => 1;
msg 'channel', 'foo:1', '... A previously defined here';
Note that because the stack of C<partial> messages is printed with the
first non-C<partial> message, most options of C<partial> messages will
be ignored.
=back
=cut
use vars qw (%_default_options %_global_duplicate_messages
%_local_duplicate_messages);
# Default options for a channel.
%_default_options =
(
type => 'warning',
exit_code => 1,
file => \*STDERR,
silent => 0,
ordered => 1,
queue => 0,
queue_key => undef,
uniq_scope => US_LOCAL,
uniq_part => UP_LOC_TEXT,
header => '',
footer => '',
backtrace => 0,
partial => 0,
);
# Filled with output messages as keys, to detect duplicates.
# The value associated with each key is the number of occurrences
# filtered out.
%_local_duplicate_messages = ();
%_global_duplicate_messages = ();
sub _reset_duplicates (\%)
{
my ($ref) = @_;
my $dup = 0;
foreach my $k (keys %$ref)
{
$dup += $ref->{$k};
}
%$ref = ();
return $dup;
}
=head2 Functions
=over 4
=item C<reset_local_duplicates ()>
Reset local duplicate messages (see C<US_LOCAL>), and
return the number of messages that have been filtered out.
=cut
sub reset_local_duplicates ()
{
return _reset_duplicates %_local_duplicate_messages;
}
=item C<reset_global_duplicates ()>
Reset local duplicate messages (see C<US_GLOBAL>), and
return the number of messages that have been filtered out.
=cut
sub reset_global_duplicates ()
{
return _reset_duplicates %_global_duplicate_messages;
}
sub _merge_options (\%%)
{
my ($hash, %options) = @_;
local $_;
foreach (keys %options)
{
if (exists $hash->{$_})
{
$hash->{$_} = $options{$_}
}
else
{
confess "unknown option '$_'";
}
}
if ($hash->{'ordered'})
{
confess "fatal messages cannot be ordered"
if $hash->{'type'} eq 'fatal';
confess "backtrace cannot be output on ordered messages"
if $hash->{'backtrace'};
}
}
=item C<register_channel ($name, [%options])>
Declare channel C<$name>, and override the default options
with those listed in C<%options>.
=cut
sub register_channel ($;%)
{
my ($name, %options) = @_;
my %channel_opts = %_default_options;
_merge_options %channel_opts, %options;
$channels{$name} = \%channel_opts;
}
=item C<exists_channel ($name)>
Returns true iff channel C<$name> has been registered.
=cut
sub exists_channel ($)
{
my ($name) = @_;
return exists $channels{$name};
}
=item C<channel_type ($name)>
Returns the type of channel C<$name> if it has been registered.
Returns the empty string otherwise.
=cut
sub channel_type ($)
{
my ($name) = @_;
return $channels{$name}{'type'} if exists_channel $name;
return '';
}
# _format_sub_message ($LEADER, $MESSAGE)
# ---------------------------------------
# Split $MESSAGE at new lines and add $LEADER to each line.
sub _format_sub_message ($$)
{
my ($leader, $message) = @_;
return $leader . join ("\n" . $leader, split ("\n", $message)) . "\n";
}
# Store partial messages here. (See the 'partial' option.)
use vars qw ($partial);
$partial = '';
# _format_message ($LOCATION, $MESSAGE, %OPTIONS)
# -----------------------------------------------
# Format the message. Return a string ready to print.
sub _format_message ($$%)
{
my ($location, $message, %opts) = @_;
my $msg = ($partial eq '' ? $opts{'header'} : '') . $message
. ($opts{'partial'} ? '' : $opts{'footer'});
if (ref $location)
{
# If $LOCATION is a reference, assume it's an instance of the
# Automake::Location class and display contexts.
my $loc = $location->get || $me;
$msg = _format_sub_message ("$loc: ", $msg);
for my $pair ($location->get_contexts)
{
$msg .= _format_sub_message ($pair->[0] . ": ", $pair->[1]);
}
}
else
{
$location ||= $me;
$msg = _format_sub_message ("$location: ", $msg);
}
return $msg;
}
# _enqueue ($QUEUE, $KEY, $UNIQ_SCOPE, $TO_FILTER, $MSG, $FILE)
# -------------------------------------------------------------
# Push message on a queue, to be processed by another thread.
sub _enqueue ($$$$$$)
{
my ($queue, $key, $uniq_scope, $to_filter, $msg, $file) = @_;
$queue->enqueue ($key, $msg, $to_filter, $uniq_scope);
confess "message queuing works only for STDERR"
if $file ne \*STDERR;
}
# _dequeue ($QUEUE)
# -----------------
# Pop a message from a queue, and print, similarly to how
# _print_message would do it. Return 0 if the queue is
# empty. Note that the key has already been dequeued.
sub _dequeue ($)
{
my ($queue) = @_;
my $msg = $queue->dequeue || return 0;
my $to_filter = $queue->dequeue;
my $uniq_scope = $queue->dequeue;
my $file = \*STDERR;
if ($to_filter ne '')
{
# Do we want local or global uniqueness?
my $dups;
if ($uniq_scope == US_LOCAL)
{
$dups = \%_local_duplicate_messages;
}
elsif ($uniq_scope == US_GLOBAL)
{
$dups = \%_global_duplicate_messages;
}
else
{
confess "unknown value for uniq_scope: " . $uniq_scope;
}
# Update the hash of messages.
if (exists $dups->{$to_filter})
{
++$dups->{$to_filter};
return 1;
}
else
{
$dups->{$to_filter} = 0;
}
}
print $file $msg;
return 1;
}
# _print_message ($LOCATION, $MESSAGE, %OPTIONS)
# ----------------------------------------------
# Format the message, check duplicates, and print it.
sub _print_message ($$%)
{
my ($location, $message, %opts) = @_;
return 0 if ($opts{'silent'});
my $msg = _format_message ($location, $message, %opts);
if ($opts{'partial'})
{
# Incomplete message. Store, don't print.
$partial .= $msg;
return;
}
else
{
# Prefix with any partial message send so far.
$msg = $partial . $msg;
$partial = '';
}
msg ('note', '', 'warnings are treated as errors', uniq_scope => US_GLOBAL)
if ($opts{'type'} eq 'warning' && $warnings_are_errors);
# Check for duplicate message if requested.
my $to_filter;
if ($opts{'uniq_part'} ne UP_NONE)
{
# Which part of the error should we match?
if ($opts{'uniq_part'} eq UP_TEXT)
{
$to_filter = $message;
}
elsif ($opts{'uniq_part'} eq UP_LOC_TEXT)
{
$to_filter = $msg;
}
else
{
$to_filter = $opts{'uniq_part'};
}
# Do we want local or global uniqueness?
my $dups;
if ($opts{'uniq_scope'} == US_LOCAL)
{
$dups = \%_local_duplicate_messages;
}
elsif ($opts{'uniq_scope'} == US_GLOBAL)
{
$dups = \%_global_duplicate_messages;
}
else
{
confess "unknown value for uniq_scope: " . $opts{'uniq_scope'};
}
# Update the hash of messages.
if (exists $dups->{$to_filter})
{
++$dups->{$to_filter};
return 0;
}
else
{
$dups->{$to_filter} = 0;
}
}
my $file = $opts{'file'};
if ($opts{'ordered'} && $opts{'queue'})
{
_enqueue ($opts{'queue'}, $opts{'queue_key'}, $opts{'uniq_scope'},
$to_filter, $msg, $file);
}
else
{
print $file $msg;
}
return 1;
}
=item C<msg ($channel, $location, $message, [%options])>
Emit a message on C<$channel>, overriding some options of the channel with
those specified in C<%options>. Obviously C<$channel> must have been
registered with C<register_channel>.
C<$message> is the text of the message, and C<$location> is a location
associated to the message.
For instance to complain about some unused variable C<mumble>
declared at line 10 in F<foo.c>, one could do:
msg 'unused', 'foo.c:10', "unused variable 'mumble'";
If channel C<unused> is not silent (and if this message is not a duplicate),
the following would be output:
foo.c:10: unused variable 'mumble'
C<$location> can also be an instance of C<Automake::Location>. In this
case, the stack of contexts will be displayed in addition.
If C<$message> contains newline characters, C<$location> is prepended
to each line. For instance,
msg 'error', 'somewhere', "1st line\n2nd line";
becomes
somewhere: 1st line
somewhere: 2nd line
If C<$location> is an empty string, it is replaced by the name of the
program. Actually, if you don't use C<%options>, you can even
elide the empty C<$location>. Thus
msg 'fatal', '', 'fatal error';
msg 'fatal', 'fatal error';
both print
progname: fatal error
=cut
use vars qw (@backlog %buffering);
# See buffer_messages() and flush_messages() below.
%buffering = (); # The map of channel types to buffer.
@backlog = (); # The buffer of messages.
sub msg ($$;$%)
{
my ($channel, $location, $message, %options) = @_;
if (! defined $message)
{
$message = $location;
$location = '';
}
confess "unknown channel $channel" unless exists $channels{$channel};
my %opts = %{$channels{$channel}};
_merge_options (%opts, %options);
if (exists $buffering{$opts{'type'}})
{
push @backlog, [$channel, $location->clone, $message, %options];
return;
}
# Print the message if needed.
if (_print_message ($location, $message, %opts))
{
# Adjust exit status.
if ($opts{'type'} eq 'error'
|| $opts{'type'} eq 'fatal'
|| ($opts{'type'} eq 'warning' && $warnings_are_errors))
{
my $es = $opts{'exit_code'};
$exit_code = $es if $es > $exit_code;
}
# Die on fatal messages.
confess if $opts{'backtrace'};
if ($opts{'type'} eq 'fatal')
{
# flush messages explicitly here, needed in worker threads.
STDERR->flush;
exit $exit_code;
}
}
}
=item C<setup_channel ($channel, %options)>
Override the options of C<$channel> with those specified by C<%options>.
=cut
sub setup_channel ($%)
{
my ($name, %opts) = @_;
confess "unknown channel $name" unless exists $channels{$name};
_merge_options %{$channels{$name}}, %opts;
}
=item C<setup_channel_type ($type, %options)>
Override the options of any channel of type C<$type>
with those specified by C<%options>.
=cut
sub setup_channel_type ($%)
{
my ($type, %opts) = @_;
foreach my $channel (keys %channels)
{
setup_channel $channel, %opts
if $channels{$channel}{'type'} eq $type;
}
}
=item C<dup_channel_setup ()>, C<drop_channel_setup ()>
Sometimes it is necessary to make temporary modifications to channels.
For instance one may want to disable a warning while processing a
particular file, and then restore the initial setup. These two
functions make it easy: C<dup_channel_setup ()> saves a copy of the
current configuration for later restoration by
C<drop_channel_setup ()>.
You can think of this as a stack of configurations whose first entry
is the active one. C<dup_channel_setup ()> duplicates the first
entry, while C<drop_channel_setup ()> just deletes it.
=cut
use vars qw (@_saved_channels @_saved_werrors);
@_saved_channels = ();
@_saved_werrors = ();
sub dup_channel_setup ()
{
my %channels_copy;
foreach my $k1 (keys %channels)
{
$channels_copy{$k1} = {%{$channels{$k1}}};
}
push @_saved_channels, \%channels_copy;
push @_saved_werrors, $warnings_are_errors;
}
sub drop_channel_setup ()
{
my $saved = pop @_saved_channels;
%channels = %$saved;
$warnings_are_errors = pop @_saved_werrors;
}
=item C<buffer_messages (@types)>, C<flush_messages ()>
By default, when C<msg> is called, messages are processed immediately.
Sometimes it is necessary to delay the output of messages.
For instance you might want to make diagnostics before
channels have been completely configured.
After C<buffer_messages(@types)> has been called, messages sent with
C<msg> to a channel whose type is listed in C<@types> will be stored in a
list for later processing.
This backlog of messages is processed when C<flush_messages> is
called, with the current channel options (not the options in effect,
at the time of C<msg>). So for instance, if some channel was silenced
in the meantime, messages to this channel will not be printed.
C<flush_messages> cancels the effect of C<buffer_messages>. Following
calls to C<msg> are processed immediately as usual.
=cut
sub buffer_messages (@)
{
foreach my $type (@_)
{
$buffering{$type} = 1;
}
}
sub flush_messages ()
{
%buffering = ();
foreach my $args (@backlog)
{
&msg (@$args);
}
@backlog = ();
}
=item C<setup_channel_queue ($queue, $key)>
Set the queue to fill for each channel that is ordered,
and the key to use for serialization.
=cut
sub setup_channel_queue ($$)
{
my ($queue, $key) = @_;
foreach my $channel (keys %channels)
{
setup_channel $channel, queue => $queue, queue_key => $key
if $channels{$channel}{'ordered'};
}
}
=item C<pop_channel_queue ($queue)>
pop a message off the $queue; the key has already been popped.
=cut
sub pop_channel_queue ($)
{
my ($queue) = @_;
return _dequeue ($queue);
}
=back
=head1 SEE ALSO
L<Automake::Location>
=head1 HISTORY
Written by Alexandre Duret-Lutz E<lt>F<adl@gnu.org>E<gt>.
=cut
1;
PK (��\`���K; K; Automake/Condition.pmnu �[��� # Copyright (C) 1997-2018 Free Software Foundation, Inc.
# 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
package Automake::Condition;
use 5.006;
use strict;
use Carp;
require Exporter;
use vars '@ISA', '@EXPORT_OK';
@ISA = qw/Exporter/;
@EXPORT_OK = qw/TRUE FALSE reduce_and reduce_or/;
=head1 NAME
Automake::Condition - record a conjunction of conditionals
=head1 SYNOPSIS
use Automake::Condition;
# Create a condition to represent "COND1 and not COND2".
my $cond = new Automake::Condition "COND1_TRUE", "COND2_FALSE";
# Create a condition to represent "not COND3".
my $other = new Automake::Condition "COND3_FALSE";
# Create a condition to represent
# "COND1 and not COND2 and not COND3".
my $both = $cond->merge ($other);
# Likewise, but using a list of conditional strings
my $both2 = $cond->merge_conds ("COND3_FALSE");
# Strip from $both any subconditions which are in $other.
# This is the opposite of merge.
$cond = $both->strip ($other);
# Return the list of conditions ("COND1_TRUE", "COND2_FALSE"):
my @conds = $cond->conds;
# Is $cond always true? (Not in this example)
if ($cond->true) { ... }
# Is $cond always false? (Not in this example)
if ($cond->false) { ... }
# Return the list of conditionals as a string:
# "COND1_TRUE COND2_FALSE"
my $str = $cond->string;
# Return the list of conditionals as a human readable string:
# "COND1 and !COND2"
my $str = $cond->human;
# Return the list of conditionals as a AC_SUBST-style string:
# "@COND1_TRUE@@COND2_FALSE@"
my $subst = $cond->subst_string;
# Is $cond true when $both is true? (Yes in this example)
if ($cond->true_when ($both)) { ... }
# Is $cond redundant w.r.t. {$other, $both}?
# (Yes in this example)
if ($cond->redundant_wrt ($other, $both)) { ... }
# Does $cond imply any of {$other, $both}?
# (Not in this example)
if ($cond->implies_any ($other, $both)) { ... }
# Remove superfluous conditionals assuming they will eventually
# be multiplied together.
# (Returns @conds = ($both) in this example, because
# $other and $cond are implied by $both.)
@conds = Automake::Condition::reduce_and ($other, $both, $cond);
# Remove superfluous conditionals assuming they will eventually
# be summed together.
# (Returns @conds = ($cond, $other) in this example, because
# $both is a subset condition of $cond: $cond is true whenever $both
# is true.)
@conds = Automake::Condition::reduce_or ($other, $both, $cond);
# Invert a Condition. This returns a list of Conditions.
@conds = $both->not;
=head1 DESCRIPTION
A C<Condition> is a conjunction of conditionals (i.e., atomic conditions
defined in F<configure.ac> by C<AM_CONDITIONAL>. In Automake they
are used to represent the conditions into which F<Makefile> variables and
F<Makefile> rules are defined.
If the variable C<VAR> is defined as
if COND1
if COND2
VAR = value
endif
endif
then it will be associated a C<Condition> created with
the following statement.
new Automake::Condition "COND1_TRUE", "COND2_TRUE";
Remember that a C<Condition> is a I<conjunction> of conditionals, so
the above C<Condition> means C<VAR> is defined when C<COND1>
B<and> C<COND2> are true. There is no way to express disjunctions
(i.e., I<or>s) with this class (but see L<DisjConditions>).
Another point worth to mention is that each C<Condition> object is
unique with respect to its conditionals. Two C<Condition> objects
created for the same set of conditionals will have the same address.
This makes it easy to compare C<Condition>s: just compare the
references.
my $c1 = new Automake::Condition "COND1_TRUE", "COND2_TRUE";
my $c2 = new Automake::Condition "COND1_TRUE", "COND2_TRUE";
$c1 == $c2; # True!
=head2 Methods
=over 4
=item C<$cond = new Automake::Condition [@conds]>
Return a C<Condition> objects for the conjunctions of conditionals
listed in C<@conds> as strings.
An item in C<@conds> should be either C<"FALSE">, C<"TRUE">, or have
the form C<"NAME_FALSE"> or C<"NAME_TRUE"> where C<NAME> can be
anything (in practice C<NAME> should be the name of a conditional
declared in F<configure.ac> with C<AM_CONDITIONAL>, but it's not
C<Automake::Condition>'s responsibility to ensure this).
An empty C<@conds> means C<"TRUE">.
As explained previously, the reference (object) returned is unique
with respect to C<@conds>. For this purpose, duplicate elements are
ignored, and C<@conds> is rewritten as C<("FALSE")> if it contains
C<"FALSE"> or two contradictory conditionals (such as C<"NAME_FALSE">
and C<"NAME_TRUE">.)
Therefore the following two statements create the same object (they
both create the C<"FALSE"> condition).
my $c3 = new Automake::Condition "COND1_TRUE", "COND1_FALSE";
my $c4 = new Automake::Condition "COND2_TRUE", "FALSE";
$c3 == $c4; # True!
$c3 == FALSE; # True!
=cut
# Keys in this hash are conditional strings. Values are the
# associated object conditions. This is used by 'new' to reuse
# Condition objects with identical conditionals.
use vars '%_condition_singletons';
# Do NOT reset this hash here. It's already empty by default,
# and any setting would otherwise occur AFTER the 'TRUE' and 'FALSE'
# constants definitions.
# %_condition_singletons = ();
sub new ($;@)
{
my ($class, @conds) = @_;
my $self = {
hash => {},
};
bless $self, $class;
for my $cond (@conds)
{
# Catch some common programming errors:
# - A Condition passed to new
confess "'$cond' is a reference, expected a string" if ref $cond;
# - A Condition passed as a string to new
confess "'$cond' does not look like a condition" if $cond =~ /::/;
}
# Accept strings like "FOO BAR" as shorthand for ("FOO", "BAR").
@conds = map { split (' ', $_) } @conds;
for my $cond (@conds)
{
next if $cond eq 'TRUE';
# Detect cases when @conds can be simplified to FALSE.
if (($cond eq 'FALSE' && $#conds > 0)
|| ($cond =~ /^(.*)_TRUE$/ && exists $self->{'hash'}{"${1}_FALSE"})
|| ($cond =~ /^(.*)_FALSE$/ && exists $self->{'hash'}{"${1}_TRUE"}))
{
return &FALSE;
}
$self->{'hash'}{$cond} = 1;
}
my $key = $self->string;
if (exists $_condition_singletons{$key})
{
return $_condition_singletons{$key};
}
$_condition_singletons{$key} = $self;
return $self;
}
=item C<$newcond = $cond-E<gt>merge (@otherconds)>
Return a new condition which is the conjunction of
C<$cond> and C<@otherconds>.
=cut
sub merge ($@)
{
my ($self, @otherconds) = @_;
new Automake::Condition (map { $_->conds } ($self, @otherconds));
}
=item C<$newcond = $cond-E<gt>merge_conds (@conds)>
Return a new condition which is the conjunction of C<$cond> and
C<@conds>, where C<@conds> is a list of conditional strings, as
passed to C<new>.
=cut
sub merge_conds ($@)
{
my ($self, @conds) = @_;
new Automake::Condition $self->conds, @conds;
}
=item C<$newcond = $cond-E<gt>strip ($minuscond)>
Return a new condition which has all the conditionals of C<$cond>
except those of C<$minuscond>. This is the opposite of C<merge>.
=cut
sub strip ($$)
{
my ($self, $minus) = @_;
my @res = grep { not $minus->_has ($_) } $self->conds;
return new Automake::Condition @res;
}
=item C<@list = $cond-E<gt>conds>
Return the set of conditionals defining C<$cond>, as strings. Note that
this might not be exactly the list passed to C<new> (or a
concatenation of such lists if C<merge> was used), because of the
cleanup mentioned in C<new>'s description.
For instance C<$c3-E<gt>conds> will simply return C<("FALSE")>.
=cut
sub conds ($ )
{
my ($self) = @_;
my @conds = keys %{$self->{'hash'}};
return ("TRUE") unless @conds;
return sort @conds;
}
# Undocumented, shouldn't be needed outside of this class.
sub _has ($$)
{
my ($self, $cond) = @_;
return exists $self->{'hash'}{$cond};
}
=item C<$cond-E<gt>false>
Return 1 iff this condition is always false.
=cut
sub false ($ )
{
my ($self) = @_;
return $self->_has ('FALSE');
}
=item C<$cond-E<gt>true>
Return 1 iff this condition is always true.
=cut
sub true ($ )
{
my ($self) = @_;
return 0 == keys %{$self->{'hash'}};
}
=item C<$cond-E<gt>string>
Build a string which denotes the condition.
For instance using the C<$cond> definition from L<SYNOPSYS>,
C<$cond-E<gt>string> will return C<"COND1_TRUE COND2_FALSE">.
=cut
sub string ($ )
{
my ($self) = @_;
return $self->{'string'} if defined $self->{'string'};
my $res = '';
if ($self->false)
{
$res = 'FALSE';
}
else
{
$res = join (' ', $self->conds);
}
$self->{'string'} = $res;
return $res;
}
=item C<$cond-E<gt>human>
Build a human readable string which denotes the condition.
For instance using the C<$cond> definition from L<SYNOPSYS>,
C<$cond-E<gt>string> will return C<"COND1 and !COND2">.
=cut
sub _to_human ($ )
{
my ($s) = @_;
if ($s =~ /^(.*)_(TRUE|FALSE)$/)
{
return (($2 eq 'FALSE') ? '!' : '') . $1;
}
else
{
return $s;
}
}
sub human ($ )
{
my ($self) = @_;
return $self->{'human'} if defined $self->{'human'};
my $res = '';
if ($self->false)
{
$res = 'FALSE';
}
else
{
$res = join (' and ', map { _to_human $_ } $self->conds);
}
$self->{'human'} = $res;
return $res;
}
=item C<$cond-E<gt>subst_string>
Build a C<AC_SUBST>-style string for output in F<Makefile.in>.
For instance using the C<$cond> definition from L<SYNOPSYS>,
C<$cond-E<gt>subst_string> will return C<"@COND1_TRUE@@COND2_FALSE@">.
=cut
sub subst_string ($ )
{
my ($self) = @_;
return $self->{'subst_string'} if defined $self->{'subst_string'};
my $res = '';
if ($self->false)
{
$res = '#';
}
elsif (! $self->true)
{
$res = '@' . join ('@@', sort $self->conds) . '@';
}
$self->{'subst_string'} = $res;
return $res;
}
=item C<$cond-E<gt>true_when ($when)>
Return 1 iff C<$cond> is true when C<$when> is true.
Return 0 otherwise.
Using the definitions from L<SYNOPSYS>, C<$cond> is true
when C<$both> is true, but the converse is wrong.
=cut
sub true_when ($$)
{
my ($self, $when) = @_;
# Nothing is true when FALSE (not even FALSE itself, but it
# shouldn't hurt if you decide to change that).
return 0 if $self->false || $when->false;
# If we are true, we stay true when $when is true :)
return 1 if $self->true;
# $SELF is true under $WHEN if each conditional component of $SELF
# exists in $WHEN.
foreach my $cond ($self->conds)
{
return 0 unless $when->_has ($cond);
}
return 1;
}
=item C<$cond-E<gt>redundant_wrt (@conds)>
Return 1 iff C<$cond> is true for any condition in C<@conds>.
If @conds is empty, return 1 iff C<$cond> is C<FALSE>.
Return 0 otherwise.
=cut
sub redundant_wrt ($@)
{
my ($self, @conds) = @_;
foreach my $cond (@conds)
{
return 1 if $self->true_when ($cond);
}
return $self->false;
}
=item C<$cond-E<gt>implies_any (@conds)>
Return 1 iff C<$cond> implies any of the conditions in C<@conds>.
Return 0 otherwise.
=cut
sub implies_any ($@)
{
my ($self, @conds) = @_;
foreach my $cond (@conds)
{
return 1 if $cond->true_when ($self);
}
return 0;
}
=item C<$cond-E<gt>not>
Return a negation of C<$cond> as a list of C<Condition>s.
This list should be used to construct a C<DisjConditions>
(we cannot return a C<DisjConditions> from C<Automake::Condition>,
because that would make these two packages interdependent).
=cut
sub not ($ )
{
my ($self) = @_;
return @{$self->{'not'}} if defined $self->{'not'};
my @res =
map { new Automake::Condition &conditional_negate ($_) } $self->conds;
$self->{'not'} = [@res];
return @res;
}
=item C<$cond-E<gt>multiply (@conds)>
Assumption: C<@conds> represent a disjunction of conditions.
Return the result of multiplying C<$cond> with that disjunction.
The result will be a list of conditions suitable to construct a
C<DisjConditions>.
=cut
sub multiply ($@)
{
my ($self, @set) = @_;
my %res = ();
for my $cond (@set)
{
my $ans = $self->merge ($cond);
$res{$ans} = $ans;
}
# FALSE can always be removed from a disjunction.
delete $res{FALSE};
# Now, $self is a common factor of the remaining conditions.
# If one of the conditions is $self, we can discard the rest.
return ($self, ())
if exists $res{$self};
return (values %res);
}
=back
=head2 Other helper functions
=over 4
=item C<TRUE>
The C<"TRUE"> conditional.
=item C<FALSE>
The C<"FALSE"> conditional.
=cut
use constant TRUE => new Automake::Condition "TRUE";
use constant FALSE => new Automake::Condition "FALSE";
=item C<reduce_and (@conds)>
Return a subset of @conds with the property that the conjunction of
the subset is the same as the conjunction of @conds. For example, if
both C<COND1_TRUE COND2_TRUE> and C<COND1_TRUE> are in the list,
discard the latter. If the input list is empty, return C<(TRUE)>.
=cut
sub reduce_and (@)
{
my (@conds) = @_;
my @ret = ();
my $cond;
while (@conds > 0)
{
$cond = shift @conds;
# FALSE is absorbent.
return FALSE
if $cond == FALSE;
if (! $cond->redundant_wrt (@ret, @conds))
{
push (@ret, $cond);
}
}
return TRUE if @ret == 0;
return @ret;
}
=item C<reduce_or (@conds)>
Return a subset of @conds with the property that the disjunction of
the subset is equivalent to the disjunction of @conds. For example,
if both C<COND1_TRUE COND2_TRUE> and C<COND1_TRUE> are in the list,
discard the former. If the input list is empty, return C<(FALSE)>.
=cut
sub reduce_or (@)
{
my (@conds) = @_;
my @ret = ();
my $cond;
while (@conds > 0)
{
$cond = shift @conds;
next
if $cond == FALSE;
return TRUE
if $cond == TRUE;
push (@ret, $cond)
unless $cond->implies_any (@ret, @conds);
}
return FALSE if @ret == 0;
return @ret;
}
=item C<conditional_negate ($condstr)>
Negate a conditional string.
=cut
sub conditional_negate ($)
{
my ($cond) = @_;
$cond =~ s/TRUE$/TRUEO/;
$cond =~ s/FALSE$/TRUE/;
$cond =~ s/TRUEO$/FALSE/;
return $cond;
}
=back
=head1 SEE ALSO
L<Automake::DisjConditions>.
=head1 HISTORY
C<AM_CONDITIONAL>s and supporting code were added to Automake 1.1o by
Ian Lance Taylor <ian@cygnus.org> in 1997. Since then it has been
improved by Tom Tromey <tromey@redhat.com>, Richard Boulton
<richard@tartarus.org>, Raja R Harinath <harinath@cs.umn.edu>,
Akim Demaille <akim@epita.fr>, and Alexandre Duret-Lutz <adl@gnu.org>.
=cut
1;
PK (��\#c�� � Automake/Config.pmnu �[��� # -*- Perl -*-
# Copyright (C) 2003-2018 Free Software Foundation, Inc.
# Generated from Config.in; do not edit by hand.
# 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
package Automake::Config;
use strict;
use 5.006;
require Exporter;
our @ISA = qw (Exporter);
our @EXPORT = qw ($APIVERSION $PACKAGE $PACKAGE_BUGREPORT $VERSION
$RELEASE_YEAR $libdir $perl_threads);
# Parameters set by configure. Not to be changed. NOTE: assign
# VERSION as string so that e.g. version 0.30 will print correctly.
our $APIVERSION = '1.16';
our $PACKAGE = 'automake';
our $PACKAGE_BUGREPORT = 'bug-automake@gnu.org';
our $VERSION = '1.16.1';
our $RELEASE_YEAR = '2018';
our $libdir = $ENV{"AUTOMAKE_LIBDIR"} || '/usr/share/automake-1.16';
our $perl_threads = 0;
# We need at least this version for CLONE support.
if (eval { require 5.007_002; })
{
use Config;
$perl_threads = $Config{useithreads};
}
1;
PK (��\�3z� � Automake/Configure_ac.pmnu �[��� # Copyright (C) 2003-2018 Free Software Foundation, Inc.
# 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
###############################################################
# The main copy of this file is in Automake's git repository. #
# Updates should be sent to automake-patches@gnu.org. #
###############################################################
package Automake::Configure_ac;
use 5.006;
use strict;
use Exporter;
use Automake::Channels;
use Automake::ChannelDefs;
use vars qw (@ISA @EXPORT);
@ISA = qw (Exporter);
@EXPORT = qw (&find_configure_ac &require_configure_ac);
=head1 NAME
Automake::Configure_ac - Locate configure.ac or configure.in.
=head1 SYNOPSIS
use Automake::Configure_ac;
# Try to locate configure.in or configure.ac in the current
# directory. It may be absent. Complain if both files exist.
my $file_name = find_configure_ac;
# Likewise, but bomb out if the file does not exist.
my $file_name = require_configure_ac;
# Likewise, but in $dir.
my $file_name = find_configure_ac ($dir);
my $file_name = require_configure_ac ($dir);
=over 4
=back
=head2 Functions
=over 4
=item C<$configure_ac = find_configure_ac ([$directory])>
Find a F<configure.ac> or F<configure.in> file in C<$directory>,
defaulting to the current directory. Complain if both files are present.
Return the name of the file found, or the former if neither is present.
=cut
sub find_configure_ac (;@)
{
my ($directory) = @_;
$directory ||= '.';
my $configure_ac =
File::Spec->canonpath (File::Spec->catfile ($directory, 'configure.ac'));
my $configure_in =
File::Spec->canonpath (File::Spec->catfile ($directory, 'configure.in'));
if (-f $configure_in)
{
msg ('obsolete', "autoconf input should be named 'configure.ac'," .
" not 'configure.in'");
if (-f $configure_ac)
{
msg ('unsupported',
"'$configure_ac' and '$configure_in' both present.\n"
. "proceeding with '$configure_ac'");
return $configure_ac
}
else
{
return $configure_in;
}
}
return $configure_ac;
}
=item C<$configure_ac = require_configure_ac ([$directory])>
Like C<find_configure_ac>, but fail if neither is present.
=cut
sub require_configure_ac (;$)
{
my $res = find_configure_ac (@_);
fatal "'configure.ac' is required" unless -f $res;
return $res
}
1;
PK (��\wWn��7 �7 Automake/DisjConditions.pmnu �[��� # Copyright (C) 1997-2018 Free Software Foundation, Inc.
# 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
package Automake::DisjConditions;
use 5.006;
use strict;
use Carp;
use Automake::Condition qw/TRUE FALSE/;
=head1 NAME
Automake::DisjConditions - record a disjunction of Conditions
=head1 SYNOPSIS
use Automake::Condition;
use Automake::DisjConditions;
# Create a Condition to represent "COND1 and not COND2".
my $cond = new Automake::Condition "COND1_TRUE", "COND2_FALSE";
# Create a Condition to represent "not COND3".
my $other = new Automake::Condition "COND3_FALSE";
# Create a DisjConditions to represent
# "(COND1 and not COND2) or (not COND3)"
my $set = new Automake::DisjConditions $cond, $other;
# Return the list of Conditions involved in $set.
my @conds = $set->conds;
# Return one of the Condition involved in $set.
my $cond = $set->one_cond;
# Return true iff $set is always true (i.e. its subconditions
# cover all cases).
if ($set->true) { ... }
# Return false iff $set is always false (i.e. is empty, or contains
# only false conditions).
if ($set->false) { ... }
# Return a string representing the DisjConditions.
# "COND1_TRUE COND2_FALSE | COND3_FALSE"
my $str = $set->string;
# Return a human readable string representing the DisjConditions.
# "(COND1 and !COND2) or (!COND3)"
my $str = $set->human;
# Merge (OR) several DisjConditions.
my $all = $set->merge($set2, $set3, ...)
# Invert a DisjConditions, i.e., create a new DisjConditions
# that complements $set.
my $inv = $set->invert;
# Multiply two DisjConditions.
my $prod = $set1->multiply ($set2);
# Return the subconditions of a DisjConditions with respect to
# a Condition. See the description for a real example.
my $subconds = $set->sub_conditions ($cond);
# Check whether a new definition in condition $cond would be
# ambiguous w.r.t. existing definitions in $set.
($msg, $ambig_cond) = $set->ambiguous_p ($what, $cond);
=head1 DESCRIPTION
A C<DisjConditions> is a disjunction of C<Condition>s. In Automake
they are used to represent the conditions into which Makefile
variables and Makefile rules are defined.
If the variable C<VAR> is defined as
if COND1
if COND2
VAR = value1
endif
endif
if !COND3
if COND4
VAR = value2
endif
endif
then it will be associated a C<DisjConditions> created with
the following statement.
new Automake::DisjConditions
(new Automake::Condition ("COND1_TRUE", "COND2_TRUE"),
new Automake::Condition ("COND3_FALSE", "COND4_TRUE"));
As you can see, a C<DisjConditions> is made from a list of
C<Condition>s. Since C<DisjConditions> is a disjunction, and
C<Condition> is a conjunction, the above can be read as
follows.
(COND1 and COND2) or ((not COND3) and COND4)
That's indeed the condition in which C<VAR> has a value.
Like C<Condition> objects, a C<DisjConditions> object is unique
with respect to its conditions. Two C<DisjConditions> objects created
for the same set of conditions will have the same address. This makes
it easy to compare C<DisjConditions>s: just compare the references.
=head2 Methods
=over 4
=item C<$set = new Automake::DisjConditions [@conds]>
Create a C<DisjConditions> object from the list of C<Condition>
objects passed in arguments.
If the C<@conds> list is empty, the C<DisjConditions> is assumed to be
false.
As explained previously, the reference (object) returned is unique
with respect to C<@conds>. For this purpose, duplicate elements are
ignored.
=cut
# Keys in this hash are DisjConditions strings. Values are the
# associated object DisjConditions. This is used by 'new' to reuse
# DisjConditions objects with identical conditions.
use vars '%_disjcondition_singletons';
sub new ($;@)
{
my ($class, @conds) = @_;
my @filtered_conds = ();
for my $cond (@conds)
{
confess "'$cond' isn't a reference" unless ref $cond;
confess "'$cond' isn't an Automake::Condition"
unless $cond->isa ("Automake::Condition");
# This is a disjunction of conditions, so we drop
# false conditions. We'll always treat an "empty"
# DisjConditions as false for this reason.
next if $cond->false;
push @filtered_conds, $cond;
}
my $string;
if (@filtered_conds)
{
@filtered_conds = sort { $a->string cmp $b->string } @filtered_conds;
$string = join (' | ', map { $_->string } @filtered_conds);
}
else
{
$string = 'FALSE';
}
# Return any existing identical DisjConditions.
my $me = $_disjcondition_singletons{$string};
return $me if $me;
# Else, create a new DisjConditions.
# Store conditions as keys AND as values, because blessed
# objects are converted to strings when used as keys (so
# at least we still have the value when we need to call
# a method).
my %h = map {$_ => $_} @filtered_conds;
my $self = {
hash => \%h,
string => $string,
conds => \@filtered_conds,
};
bless $self, $class;
$_disjcondition_singletons{$string} = $self;
return $self;
}
=item C<CLONE>
Internal special subroutine to fix up the self hashes in
C<%_disjcondition_singletons> upon thread creation. C<CLONE> is invoked
automatically with ithreads from Perl 5.7.2 or later, so if you use this
module with earlier versions of Perl, it is not thread-safe.
=cut
sub CLONE
{
foreach my $self (values %_disjcondition_singletons)
{
my %h = map { $_ => $_ } @{$self->{'conds'}};
$self->{'hash'} = \%h;
}
}
=item C<@conds = $set-E<gt>conds>
Return the list of C<Condition> objects involved in C<$set>.
=cut
sub conds ($ )
{
my ($self) = @_;
return @{$self->{'conds'}};
}
=item C<$cond = $set-E<gt>one_cond>
Return one C<Condition> object involved in C<$set>.
=cut
sub one_cond ($)
{
my ($self) = @_;
return (%{$self->{'hash'}},)[1];
}
=item C<$et = $set-E<gt>false>
Return 1 iff the C<DisjConditions> object is always false (i.e., if it
is empty, or if it contains only false C<Condition>s). Return 0
otherwise.
=cut
sub false ($ )
{
my ($self) = @_;
return 0 == keys %{$self->{'hash'}};
}
=item C<$et = $set-E<gt>true>
Return 1 iff the C<DisjConditions> object is always true (i.e. covers all
conditions). Return 0 otherwise.
=cut
sub true ($ )
{
my ($self) = @_;
return $self->invert->false;
}
=item C<$str = $set-E<gt>string>
Build a string which denotes the C<DisjConditions>.
=cut
sub string ($ )
{
my ($self) = @_;
return $self->{'string'};
}
=item C<$cond-E<gt>human>
Build a human readable string which denotes the C<DisjConditions>.
=cut
sub human ($ )
{
my ($self) = @_;
return $self->{'human'} if defined $self->{'human'};
my $res = '';
if ($self->false)
{
$res = 'FALSE';
}
else
{
my @c = $self->conds;
if (1 == @c)
{
$res = $c[0]->human;
}
else
{
$res = '(' . join (') or (', map { $_->human } $self->conds) . ')';
}
}
$self->{'human'} = $res;
return $res;
}
=item C<$newcond = $cond-E<gt>merge (@otherconds)>
Return a new C<DisjConditions> which is the disjunction of
C<$cond> and C<@otherconds>. Items in C<@otherconds> can be
@C<Condition>s or C<DisjConditions>.
=cut
sub merge ($@)
{
my ($self, @otherconds) = @_;
new Automake::DisjConditions (
map { $_->isa ("Automake::DisjConditions") ? $_->conds : $_ }
($self, @otherconds));
}
=item C<$prod = $set1-E<gt>multiply ($set2)>
Multiply two conditional sets.
my $set1 = new Automake::DisjConditions
(new Automake::Condition ("A_TRUE"),
new Automake::Condition ("B_TRUE"));
my $set2 = new Automake::DisjConditions
(new Automake::Condition ("C_FALSE"),
new Automake::Condition ("D_FALSE"));
C<$set1-E<gt>multiply ($set2)> will return
new Automake::DisjConditions
(new Automake::Condition ("A_TRUE", "C_FALSE"),
new Automake::Condition ("B_TRUE", "C_FALSE"),;
new Automake::Condition ("A_TRUE", "D_FALSE"),
new Automake::Condition ("B_TRUE", "D_FALSE"));
The argument can also be a C<Condition>.
=cut
# Same as multiply() but take a list of Conditionals as second argument.
# We use this in invert().
sub _multiply ($@)
{
my ($self, @set) = @_;
my @res = map { $_->multiply (@set) } $self->conds;
return new Automake::DisjConditions (Automake::Condition::reduce_or @res);
}
sub multiply ($$)
{
my ($self, $set) = @_;
return $self->_multiply ($set) if $set->isa('Automake::Condition');
return $self->_multiply ($set->conds);
}
=item C<$inv = $set-E<gt>invert>
Invert a C<DisjConditions>. Return a C<DisjConditions> which is true
when C<$set> is false, and vice-versa.
my $set = new Automake::DisjConditions
(new Automake::Condition ("A_TRUE", "B_TRUE"),
new Automake::Condition ("A_FALSE", "B_FALSE"));
Calling C<$set-E<gt>invert> will return the following C<DisjConditions>.
new Automake::DisjConditions
(new Automake::Condition ("A_TRUE", "B_FALSE"),
new Automake::Condition ("A_FALSE", "B_TRUE"));
We implement the inversion by a product-of-sums to sum-of-products
conversion using repeated multiplications. Because of the way we
implement multiplication, the result of inversion is in canonical
prime implicant form.
=cut
sub invert($ )
{
my ($self) = @_;
return $self->{'invert'} if defined $self->{'invert'};
# The invert of an empty DisjConditions is TRUE.
my $res = new Automake::DisjConditions TRUE;
# !((a.b)+(c.d)+(e.f))
# = (!a+!b).(!c+!d).(!e+!f)
# We develop this into a sum of product iteratively, starting from TRUE:
# 1) TRUE
# 2) TRUE.!a + TRUE.!b
# 3) TRUE.!a.!c + TRUE.!b.!c + TRUE.!a.!d + TRUE.!b.!d
# 4) TRUE.!a.!c.!e + TRUE.!b.!c.!e + TRUE.!a.!d.!e + TRUE.!b.!d.!e
# + TRUE.!a.!c.!f + TRUE.!b.!c.!f + TRUE.!a.!d.!f + TRUE.!b.!d.!f
foreach my $cond ($self->conds)
{
$res = $res->_multiply ($cond->not);
}
# Cache result.
$self->{'invert'} = $res;
# It's tempting to also set $res->{'invert'} to $self, but that
# is a bad idea as $self hasn't been normalized in any way.
# (Different inputs can produce the same inverted set.)
return $res;
}
=item C<$self-E<gt>simplify>
Return a C<Disjunction> which is a simplified canonical form of C<$self>.
This canonical form contains only prime implicants, but it can contain
non-essential prime implicants.
=cut
sub simplify ($)
{
my ($self) = @_;
return $self->invert->invert;
}
=item C<$self-E<gt>sub_conditions ($cond)>
Return the subconditions of C<$self> that contains C<$cond>, with
C<$cond> stripped. More formally, return C<$res> such that
C<$res-E<gt>multiply ($cond) == $self-E<gt>multiply ($cond)> and
C<$res> does not mention any of the variables in C<$cond>.
For instance, consider:
my $a = new Automake::DisjConditions
(new Automake::Condition ("A_TRUE", "B_TRUE"),
new Automake::Condition ("A_TRUE", "C_FALSE"),
new Automake::Condition ("A_TRUE", "B_FALSE", "C_TRUE"),
new Automake::Condition ("A_FALSE"));
my $b = new Automake::DisjConditions
(new Automake::Condition ("A_TRUE", "B_FALSE"));
Calling C<$a-E<gt>sub_conditions ($b)> will return the following
C<DisjConditions>.
new Automake::DisjConditions
(new Automake::Condition ("C_FALSE"), # From A_TRUE C_FALSE
new Automake::Condition ("C_TRUE")); # From A_TRUE B_FALSE C_TRUE"
=cut
sub sub_conditions ($$)
{
my ($self, $subcond) = @_;
# Make $subcond blindingly apparent in the DisjConditions.
# For instance '$b->multiply($a->conds)' (from the POD example) is:
# (new Automake::Condition ("FALSE"),
# new Automake::Condition ("A_TRUE", "B_FALSE", "C_FALSE"),
# new Automake::Condition ("A_TRUE", "B_FALSE", "C_TRUE"),
# new Automake::Condition ("FALSE"))
my @prodconds = $subcond->multiply ($self->conds);
# Now, strip $subcond from the remaining (i.e., non-false) Conditions.
my @res = map { $_->false ? () : $_->strip ($subcond) } @prodconds;
return new Automake::DisjConditions @res;
}
=item C<($string, $ambig_cond) = $condset-E<gt>ambiguous_p ($what, $cond)>
Check for an ambiguous condition. Return an error message and the
other condition involved if we have an ambiguity. Return an empty
string and FALSE otherwise.
C<$what> is the name of the thing being defined, to use in the error
message. C<$cond> is the C<Condition> under which it is being
defined. C<$condset> is the C<DisjConditions> under which it had
already been defined.
=cut
sub ambiguous_p ($$$)
{
my ($self, $var, $cond) = @_;
# Note that these rules don't consider the following
# example as ambiguous.
#
# if COND1
# FOO = foo
# endif
# if COND2
# FOO = bar
# endif
#
# It's up to the user to not define COND1 and COND2
# simultaneously.
return ("$var multiply defined in condition " . $cond->human, $cond)
if exists $self->{'hash'}{$cond};
foreach my $vcond ($self->conds)
{
return ("$var was already defined in condition " . $vcond->human
. ", which includes condition ". $cond->human, $vcond)
if $vcond->true_when ($cond);
return ("$var was already defined in condition " . $vcond->human
. ", which is included in condition " . $cond->human, $vcond)
if $cond->true_when ($vcond);
}
return ('', FALSE);
}
=head1 SEE ALSO
L<Automake::Condition>.
=head1 HISTORY
C<AM_CONDITIONAL>s and supporting code were added to Automake 1.1o by
Ian Lance Taylor <ian@cygnus.org> in 1997. Since then it has been
improved by Tom Tromey <tromey@redhat.com>, Richard Boulton
<richard@tartarus.org>, Raja R Harinath <harinath@cs.umn.edu>, Akim
Demaille <akim@epita.fr>, Pavel Roskin <proski@gnu.org>, and
Alexandre Duret-Lutz <adl@gnu.org>.
=cut
1;
PK (��\�]���# �# Automake/FileUtils.pmnu �[��� # Copyright (C) 2003-2018 Free Software Foundation, Inc.
# 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
###############################################################
# The main copy of this file is in Automake's git repository. #
# Updates should be sent to automake-patches@gnu.org. #
###############################################################
package Automake::FileUtils;
=head1 NAME
Automake::FileUtils - handling files
=head1 SYNOPSIS
use Automake::FileUtils
=head1 DESCRIPTION
This perl module provides various general purpose file handling functions.
=cut
use 5.006;
use strict;
use Exporter;
use File::stat;
use IO::File;
use Automake::Channels;
use Automake::ChannelDefs;
use vars qw (@ISA @EXPORT);
@ISA = qw (Exporter);
@EXPORT = qw (&contents
&find_file &mtime
&update_file &up_to_date_p
&xsystem &xsystem_hint &xqx
&dir_has_case_matching_file &reset_dir_cache
&set_dir_cache_file);
=item C<find_file ($file_name, @include)>
Return the first path for a C<$file_name> in the C<include>s.
We match exactly the behavior of GNU M4: first look in the current
directory (which includes the case of absolute file names), and then,
if the file name is not absolute, look in C<@include>.
If the file is flagged as optional (ends with C<?>), then return undef
if absent, otherwise exit with error.
=cut
# $FILE_NAME
# find_file ($FILE_NAME, @INCLUDE)
# --------------------------------
sub find_file ($@)
{
use File::Spec;
my ($file_name, @include) = @_;
my $optional = 0;
$optional = 1
if $file_name =~ s/\?$//;
return File::Spec->canonpath ($file_name)
if -e $file_name;
if (!File::Spec->file_name_is_absolute ($file_name))
{
foreach my $path (@include)
{
return File::Spec->canonpath (File::Spec->catfile ($path, $file_name))
if -e File::Spec->catfile ($path, $file_name)
}
}
fatal "$file_name: no such file or directory"
unless $optional;
return undef;
}
=item C<mtime ($file)>
Return the mtime of C<$file>. Missing files, or C<-> standing for
C<STDIN> or C<STDOUT> are "obsolete", i.e., as old as possible.
=cut
# $MTIME
# MTIME ($FILE)
# -------------
sub mtime ($)
{
my ($file) = @_;
return 0
if $file eq '-' || ! -f $file;
my $stat = stat ($file)
or fatal "cannot stat $file: $!";
return $stat->mtime;
}
=item C<update_file ($from, $to, [$force])>
Rename C<$from> as C<$to>, preserving C<$to> timestamp if it has not
changed, unless C<$force> is true (defaults to false). Recognize
C<$to> = C<-> standing for C<STDIN>. C<$from> is always
removed/renamed.
=cut
# &update_file ($FROM, $TO; $FORCE)
# ---------------------------------
sub update_file ($$;$)
{
my ($from, $to, $force) = @_;
$force = 0
unless defined $force;
my $SIMPLE_BACKUP_SUFFIX = $ENV{'SIMPLE_BACKUP_SUFFIX'} || '~';
use File::Compare;
use File::Copy;
if ($to eq '-')
{
my $in = new IO::File $from, "<";
my $out = new IO::File (">-");
while ($_ = $in->getline)
{
print $out $_;
}
$in->close;
unlink ($from) || fatal "cannot remove $from: $!";
return;
}
if (!$force && -f "$to" && compare ("$from", "$to") == 0)
{
# File didn't change, so don't update its mod time.
msg 'note', "'$to' is unchanged";
unlink ($from)
or fatal "cannot remove $from: $!";
return
}
if (-f "$to")
{
# Back up and install the new one.
move ("$to", "$to$SIMPLE_BACKUP_SUFFIX")
or fatal "cannot backup $to: $!";
move ("$from", "$to")
or fatal "cannot rename $from as $to: $!";
msg 'note', "'$to' is updated";
}
else
{
move ("$from", "$to")
or fatal "cannot rename $from as $to: $!";
msg 'note', "'$to' is created";
}
}
=item C<up_to_date_p ($file, @dep)>
Is C<$file> more recent than C<@dep>?
=cut
# $BOOLEAN
# &up_to_date_p ($FILE, @DEP)
# ---------------------------
sub up_to_date_p ($@)
{
my ($file, @dep) = @_;
my $mtime = mtime ($file);
foreach my $dep (@dep)
{
if ($mtime < mtime ($dep))
{
verb "up_to_date ($file): outdated: $dep";
return 0;
}
}
verb "up_to_date ($file): up to date";
return 1;
}
=item C<handle_exec_errors ($command, [$expected_exit_code = 0], [$hint])>
Display an error message for C<$command>, based on the content of
C<$?> and C<$!>. Be quiet if the command exited normally
with C<$expected_exit_code>. If C<$hint> is given, display that as well
if the command failed to run at all.
=cut
sub handle_exec_errors ($;$$)
{
my ($command, $expected, $hint) = @_;
$expected = 0 unless defined $expected;
if (defined $hint)
{
$hint = "\n" . $hint;
}
else
{
$hint = '';
}
$command = (split (' ', $command))[0];
if ($!)
{
fatal "failed to run $command: $!" . $hint;
}
else
{
use POSIX qw (WIFEXITED WEXITSTATUS WIFSIGNALED WTERMSIG);
if (WIFEXITED ($?))
{
my $status = WEXITSTATUS ($?);
# Propagate exit codes.
fatal ('',
"$command failed with exit status: $status",
exit_code => $status)
unless $status == $expected;
}
elsif (WIFSIGNALED ($?))
{
my $signal = WTERMSIG ($?);
fatal "$command terminated by signal: $signal";
}
else
{
fatal "$command exited abnormally";
}
}
}
=item C<xqx ($command)>
Same as C<qx> (but in scalar context), but fails on errors.
=cut
# xqx ($COMMAND)
# --------------
sub xqx ($)
{
my ($command) = @_;
verb "running: $command";
$! = 0;
my $res = `$command`;
handle_exec_errors $command
if $?;
return $res;
}
=item C<xsystem (@argv)>
Same as C<system>, but fails on errors, and reports the C<@argv>
in verbose mode.
=cut
sub xsystem (@)
{
my (@command) = @_;
verb "running: @command";
$! = 0;
handle_exec_errors "@command"
if system @command;
}
=item C<xsystem_hint ($msg, @argv)>
Same as C<xsystem>, but allows to pass a hint that will be displayed
in case the command failed to run at all.
=cut
sub xsystem_hint (@)
{
my ($hint, @command) = @_;
verb "running: @command";
$! = 0;
handle_exec_errors "@command", 0, $hint
if system @command;
}
=item C<contents ($file_name)>
Return the contents of C<$file_name>.
=cut
# contents ($FILE_NAME)
# ---------------------
sub contents ($)
{
my ($file) = @_;
verb "reading $file";
local $/; # Turn on slurp-mode.
my $f = new Automake::XFile $file, "<";
my $contents = $f->getline;
$f->close;
return $contents;
}
=item C<dir_has_case_matching_file ($DIRNAME, $FILE_NAME)>
Return true iff $DIR contains a file name that matches $FILE_NAME case
insensitively.
We need to be cautious on case-insensitive case-preserving file
systems (e.g. Mac OS X's HFS+). On such systems C<-f 'Foo'> and C<-f
'foO'> answer the same thing. Hence if a package distributes its own
F<CHANGELOG> file, but has no F<ChangeLog> file, automake would still
try to distribute F<ChangeLog> (because it thinks it exists) in
addition to F<CHANGELOG>, although it is impossible for these two
files to be in the same directory (the two file names designate the
same file).
=cut
use vars '%_directory_cache';
sub dir_has_case_matching_file ($$)
{
# Note that print File::Spec->case_tolerant returns 0 even on MacOS
# X (with Perl v5.8.1-RC3 at least), so do not try to shortcut this
# function using that.
my ($dirname, $file_name) = @_;
return 0 unless -f "$dirname/$file_name";
# The file appears to exist, however it might be a mirage if the
# system is case insensitive. Let's browse the directory and check
# whether the file is really in. We maintain a cache of directories
# so Automake doesn't spend all its time reading the same directory
# again and again.
if (!exists $_directory_cache{$dirname})
{
error "failed to open directory '$dirname'"
unless opendir (DIR, $dirname);
$_directory_cache{$dirname} = { map { $_ => 1 } readdir (DIR) };
closedir (DIR);
}
return exists $_directory_cache{$dirname}{$file_name};
}
=item C<reset_dir_cache ($dirname)>
Clear C<dir_has_case_matching_file>'s cache for C<$dirname>.
=cut
sub reset_dir_cache ($)
{
delete $_directory_cache{$_[0]};
}
=item C<set_dir_cache_file ($dirname, $file_name)>
State that C<$dirname> contains C<$file_name> now.
=cut
sub set_dir_cache_file ($$)
{
my ($dirname, $file_name) = @_;
$_directory_cache{$dirname}{$file_name} = 1
if exists $_directory_cache{$dirname};
}
1; # for require
PK (��\�H�b� � Automake/General.pmnu �[��� # Copyright (C) 2001-2018 Free Software Foundation, Inc.
# 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
package Automake::General;
use 5.006;
use strict;
use Exporter;
use File::Basename;
use vars qw (@ISA @EXPORT);
@ISA = qw (Exporter);
@EXPORT = qw (&uniq &none $me);
# Variable we share with the main package. Be sure to have a single
# copy of them: using 'my' together with multiple inclusion of this
# package would introduce several copies.
use vars qw ($me);
$me = basename ($0);
# END
# ---
# Exit nonzero whenever closing STDOUT fails.
sub END
{
# This is required if the code might send any output to stdout
# E.g., even --version or --help. So it's best to do it unconditionally.
if (! close STDOUT)
{
print STDERR "$me: closing standard output: $!\n";
$? = 74; # EX_IOERR
return;
}
}
# @RES
# uniq (@LIST)
# ------------
# Return LIST with no duplicates.
sub uniq (@)
{
my @res = ();
my %seen = ();
foreach my $item (@_)
{
if (! exists $seen{$item})
{
$seen{$item} = 1;
push (@res, $item);
}
}
return wantarray ? @res : "@res";
}
# $RES
# none (&PRED, @LIST)
# ------------
# Return 1 when no element in LIST satisfies predicate PRED otherwise 0.
sub none (&@)
{
my ($pred, @list) = @_;
my $res = 1;
foreach my $item (@list)
{
if ($pred->($item))
{
$res = 0;
last;
}
}
return $res;
}
1; # for require
PK (��\ZҺ&� � Automake/Getopt.pmnu �[��� # Copyright (C) 2012-2018 Free Software Foundation, Inc.
# 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
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
package Automake::Getopt;
=head1 NAME
Automake::Getopt - GCS conforming parser for command line options
=head1 SYNOPSIS
use Automake::Getopt;
=head1 DESCRIPTION
Export a function C<parse_options>, performing parsing of command
line options in conformance to the GNU Coding standards.
=cut
use 5.006;
use strict;
use warnings FATAL => 'all';
use Exporter ();
use Getopt::Long ();
use Automake::ChannelDefs qw/fatal/;
use Carp qw/croak confess/;
use vars qw (@ISA @EXPORT);
@ISA = qw (Exporter);
@EXPORT= qw/getopt/;
=item C<parse_options (%option)>
Wrapper around C<Getopt::Long>, trying to conform to the GNU
Coding Standards for error messages.
=cut
sub parse_options (%)
{
my %option = @_;
Getopt::Long::Configure ("bundling", "pass_through");
# Unrecognized options are passed through, so GetOption can only fail
# due to internal errors or misuse of options specification.
Getopt::Long::GetOptions (%option)
or confess "error in options specification (likely)";
if (@ARGV && $ARGV[0] =~ /^-./)
{
my %argopts;
for my $k (keys %option)
{
if ($k =~ /(.*)=s$/)
{
map { $argopts{(length ($_) == 1)
? "-$_" : "--$_" } = 1; } (split (/\|/, $1));
}
}
if ($ARGV[0] eq '--')
{
shift @ARGV;
}
elsif (exists $argopts{$ARGV[0]})
{
fatal ("option '$ARGV[0]' requires an argument\n"
. "Try '$0 --help' for more information.");
}
else
{
fatal ("unrecognized option '$ARGV[0]'.\n"
. "Try '$0 --help' for more information.");
}
}
}
=back
=head1 SEE ALSO
L<Getopt::Long>
=cut
1; # for require
PK (��\��# # Automake/Item.pmnu �[��� # Copyright (C) 2003-2018 Free Software Foundation, Inc.
# 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
package Automake::Item;
use 5.006;
use strict;
use Carp;
use Automake::ChannelDefs;
use Automake::DisjConditions;
=head1 NAME
Automake::Item - base class for Automake::Variable and Automake::Rule
=head1 DESCRIPTION
=head2 Methods
=over 4
=item C<new Automake::Item $name>
Create and return an empty Item called C<$name>.
=cut
sub new ($$)
{
my ($class, $name) = @_;
my $self = {
name => $name,
defs => {},
conds => {},
};
bless $self, $class;
return $self;
}
=item C<$item-E<gt>name>
Return the name of C<$item>.
=cut
sub name ($)
{
my ($self) = @_;
return $self->{'name'};
}
=item C<$item-E<gt>def ($cond)>
Return the definition for this item in condition C<$cond>, if it
exists. Return 0 otherwise.
=cut
sub def ($$)
{
# This method is called very often, so keep it small and fast. We
# don't mind the extra undefined items introduced by lookup failure;
# avoiding this with 'exists' means doing two hash lookup on
# success, and proved worse on benchmark.
my $def = $_[0]->{'defs'}{$_[1]};
return defined $def && $def;
}
=item C<$item-E<gt>rdef ($cond)>
Return the definition for this item in condition C<$cond>. Abort with
an internal error if the item was not defined under this condition.
The I<r> in front of C<def> stands for I<required>. One
should call C<rdef> to assert the conditional definition's existence.
=cut
sub rdef ($$)
{
my ($self, $cond) = @_;
my $d = $self->def ($cond);
prog_error ("undefined condition '" . $cond->human . "' for '"
. $self->name . "'\n" . $self->dump)
unless $d;
return $d;
}
=item C<$item-E<gt>set ($cond, $def)>
Add a new definition to an existing item.
=cut
sub set ($$$)
{
my ($self, $cond, $def) = @_;
$self->{'defs'}{$cond} = $def;
$self->{'conds'}{$cond} = $cond;
}
=item C<$var-E<gt>conditions>
Return an L<Automake::DisjConditions> describing the conditions that
that an item is defined in.
These are all the conditions for which is would be safe to call
C<rdef>.
=cut
sub conditions ($)
{
my ($self) = @_;
prog_error ("self is not a reference")
unless ref $self;
return new Automake::DisjConditions (values %{$self->{'conds'}});
}
=item C<@missing_conds = $var-E<gt>not_always_defined_in_cond ($cond)>
Check whether C<$var> is always defined for condition C<$cond>.
Return a list of conditions where the definition is missing.
For instance, given
if COND1
if COND2
A = foo
D = d1
else
A = bar
D = d2
endif
else
D = d3
endif
if COND3
A = baz
B = mumble
endif
C = mumble
we should have (we display result as conditional strings in this
illustration, but we really return DisjConditions objects):
var ('A')->not_always_defined_in_cond ('COND1_TRUE COND2_TRUE')
=> ()
var ('A')->not_always_defined_in_cond ('COND1_TRUE')
=> ()
var ('A')->not_always_defined_in_cond ('TRUE')
=> ("COND1_FALSE COND3_FALSE")
var ('B')->not_always_defined_in_cond ('COND1_TRUE')
=> ("COND1_TRUE COND3_FALSE")
var ('C')->not_always_defined_in_cond ('COND1_TRUE')
=> ()
var ('D')->not_always_defined_in_cond ('TRUE')
=> ()
var ('Z')->not_always_defined_in_cond ('TRUE')
=> ("TRUE")
=cut
sub not_always_defined_in_cond ($$)
{
my ($self, $cond) = @_;
# Compute the subconditions where $var isn't defined.
return
$self->conditions
->sub_conditions ($cond)
->invert
->multiply ($cond);
}
1;
PK (��\��� � Automake/ItemDef.pmnu �[��� # Copyright (C) 2003-2018 Free Software Foundation, Inc.
# 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
package Automake::ItemDef;
use 5.006;
use strict;
use Carp;
=head1 NAME
Automake::ItemDef - base class for Automake::VarDef and Automake::RuleDef
=head1 DESCRIPTION
=head2 Methods
=over 4
=item C<my $def = Automake::new ($comment, $location, $owner)>
Create a new Makefile-item definition.
C<$comment> is any comment preceding the definition. (Because
Automake reorders items in the output, it also tries to carry comments
around.)
C<$location> is the place where the definition occurred, it should be
an instance of L<Automake::Location>.
C<$owner> specifies who owns the rule.
=cut
sub new ($$$$)
{
my ($class, $comment, $location, $owner) = @_;
my $self = {
comment => $comment,
location => $location,
owner => $owner,
};
bless $self, $class;
return $self;
}
=item C<$def-E<gt>comment>
=item C<$def-E<gt>location>
=item C<$def-E<gt>owner>
Accessors to the various constituents of an C<ItemDef>. See the
documentation of C<new>'s arguments for a description of these.
=cut
sub comment ($)
{
my ($self) = @_;
return $self->{'comment'};
}
sub location ($)
{
my ($self) = @_;
return $self->{'location'};
}
sub owner ($)
{
my ($self) = @_;
return $self->{'owner'};
}
=head1 SEE ALSO
L<Automake::VarDef>, and L<Automake::RuleDef>.
=cut
1;
PK (��\��T��
�
Automake/Language.pmnu �[��� # Copyright (C) 2013-2018 Free Software Foundation, Inc.
# 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
package Automake::Language;
use 5.006;
use strict;
use Class::Struct ();
Class::Struct::struct (
# Short name of the language (c, f77...).
'name' => "\$",
# Nice name of the language (C, Fortran 77...).
'Name' => "\$",
# List of configure variables which must be defined.
'config_vars' => '@',
# 'pure' is '1' or ''. A 'pure' language is one where, if
# all the files in a directory are of that language, then we
# do not require the C compiler or any code to call it.
'pure' => "\$",
'autodep' => "\$",
# Name of the compiling variable (COMPILE).
'compiler' => "\$",
# Content of the compiling variable.
'compile' => "\$",
# Flag to require compilation without linking (-c).
'compile_flag' => "\$",
'extensions' => '@',
# A subroutine to compute a list of possible extensions of
# the product given the input extensions.
# (defaults to a subroutine which returns ('.$(OBJEXT)', '.lo'))
'output_extensions' => "\$",
# A list of flag variables used in 'compile'.
# (defaults to [])
'flags' => "@",
# Any tag to pass to libtool while compiling.
'libtool_tag' => "\$",
# The file to use when generating rules for this language.
# The default is 'depend2'.
'rule_file' => "\$",
# Name of the linking variable (LINK).
'linker' => "\$",
# Content of the linking variable.
'link' => "\$",
# Name of the compiler variable (CC).
'ccer' => "\$",
# Name of the linker variable (LD).
'lder' => "\$",
# Content of the linker variable ($(CC)).
'ld' => "\$",
# Flag to specify the output file (-o).
'output_flag' => "\$",
'_finish' => "\$",
# This is a subroutine which is called whenever we finally
# determine the context in which a source file will be
# compiled.
'_target_hook' => "\$",
# If TRUE, nodist_ sources will be compiled using specific rules
# (i.e. not inference rules). The default is FALSE.
'nodist_specific' => "\$");
sub finish ($)
{
my ($self) = @_;
if (defined $self->_finish)
{
&{$self->_finish} (@_);
}
}
sub target_hook ($$$$%)
{
my ($self) = @_;
if (defined $self->_target_hook)
{
$self->_target_hook->(@_);
}
}
1;
PK (��\E1� } } Automake/Location.pmnu �[��� # Copyright (C) 2002-2018 Free Software Foundation, Inc.
# 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
package Automake::Location;
use 5.006;
=head1 NAME
Automake::Location - a class for location tracking, with a stack of contexts
=head1 SYNOPSIS
use Automake::Location;
# Create a new Location object
my $where = new Automake::Location "foo.c:13";
# Change the location
$where->set ("foo.c:14");
# Get the location (without context).
# Here this should print "foo.c:14"
print $where->get, "\n";
# Push a context, and change the location
$where->push_context ("included from here");
$where->set ("bar.h:1");
# Print the location and the stack of context (for debugging)
print $where->dump;
# This should display
# bar.h:1:
# foo.c:14: included from here
# Get the contexts (list of [$location_string, $description])
for my $pair (reverse $where->contexts)
{
my ($loc, $descr) = @{$pair};
...
}
# Pop a context, and reset the location to the previous context.
$where->pop_context;
# Clone a Location. Use this when storing the state of a location
# that would otherwise be modified.
my $where_copy = $where->clone;
# Serialize a Location object (for passing through a thread queue,
# for example)
my @array = $where->serialize ();
# De-serialize: recreate a Location object from a queue.
my $where = new Automake::Location::deserialize ($queue);
=head1 DESCRIPTION
C<Location> objects are used to keep track of locations in Automake,
and used to produce diagnostics.
A C<Location> object is made of two parts: a location string, and
a stack of contexts.
For instance if C<VAR> is defined at line 1 in F<bar.h> which was
included at line 14 in F<foo.c>, then the location string should be
C<"bar.h:10"> and the context should be the pair (C<"foo.c:14">,
C<"included from here">).
Section I<SYNOPSIS> shows how to setup such a C<Location>, and access
the location string or the stack of contexts.
You can pass a C<Location> to C<Automake::Channels::msg>.
=cut
=head2 Methods
=over
=item C<$where = new Automake::Location ([$position])>
Create and return a new Location object.
=cut
sub new ($;$)
{
my ($class, $position) = @_;
my $self = {
position => $position,
contexts => [],
};
bless $self, $class;
return $self;
}
=item C<$location-E<gt>set ($position)>
Change the location to be C<$position>.
=cut
sub set ($$)
{
my ($self, $position) = @_;
$self->{'position'} = $position;
}
=item C<$location-E<gt>get>
Get the location (without context).
=cut
sub get ($)
{
my ($self) = @_;
return $self->{'position'};
}
=item C<$location-E<gt>push_context ($context)>
Push a context to the location.
=cut
sub push_context ($$)
{
my ($self, $context) = @_;
push @{$self->{'contexts'}}, [$self->get, $context];
$self->set (undef);
}
=item C<$where = $location-E<gt>pop_context ($context)>
Pop a context, and reset the location to the previous context.
=cut
sub pop_context ($)
{
my ($self) = @_;
my $pair = pop @{$self->{'contexts'}};
$self->set ($pair->[0]);
return @{$pair};
}
=item C<@contexts = $location-E<gt>get_contexts>
Return the array of contexts.
=cut
sub get_contexts ($)
{
my ($self) = @_;
return @{$self->{'contexts'}};
}
=item C<$location = $location-E<gt>clone>
Clone a Location. Use this when storing the state of a location
that would otherwise be modified.
=cut
sub clone ($)
{
my ($self) = @_;
my $other = new Automake::Location ($self->get);
my @contexts = $self->get_contexts;
for my $pair (@contexts)
{
push @{$other->{'contexts'}}, [@{$pair}];
}
return $other;
}
=item C<$res = $location-E<gt>dump>
Print the location and the stack of context (for debugging).
=cut
sub dump ($)
{
my ($self) = @_;
my $res = ($self->get || 'INTERNAL') . ":\n";
for my $pair (reverse $self->get_contexts)
{
$res .= $pair->[0] || 'INTERNAL';
$res .= ": $pair->[1]\n";
}
return $res;
}
=item C<@array = $location-E<gt>serialize>
Serialize a Location object (for passing through a thread queue,
for example).
=cut
sub serialize ($)
{
my ($self) = @_;
my @serial = ();
push @serial, $self->get;
my @contexts = $self->get_contexts;
for my $pair (@contexts)
{
push @serial, @{$pair};
}
push @serial, undef;
return @serial;
}
=item C<new Automake::Location::deserialize ($queue)>
De-serialize: recreate a Location object from a queue.
=cut
sub deserialize ($)
{
my ($queue) = @_;
my $position = $queue->dequeue ();
my $self = new Automake::Location $position;
while (my $position = $queue->dequeue ())
{
my $context = $queue->dequeue ();
push @{$self->{'contexts'}}, [$position, $context];
}
return $self;
}
=back
=head1 SEE ALSO
L<Automake::Channels>
=head1 HISTORY
Written by Alexandre Duret-Lutz E<lt>F<adl@gnu.org>E<gt>.
=cut
1;
PK (��\�<S��, �, Automake/Options.pmnu �[��� # Copyright (C) 2003-2018 Free Software Foundation, Inc.
# 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
package Automake::Options;
use 5.006;
use strict;
use Exporter;
use Automake::Config;
use Automake::ChannelDefs;
use Automake::Channels;
use Automake::Version;
use vars qw (@ISA @EXPORT);
@ISA = qw (Exporter);
@EXPORT = qw (option global_option
set_option set_global_option
unset_option unset_global_option
process_option_list process_global_option_list
set_strictness $strictness $strictness_name
&FOREIGN &GNU &GNITS);
=head1 NAME
Automake::Options - keep track of Automake options
=head1 SYNOPSIS
use Automake::Options;
# Option lookup and setting.
$opt = option 'name';
$opt = global_option 'name';
set_option 'name', 'value';
set_global_option 'name', 'value';
unset_option 'name';
unset_global_option 'name';
# Batch option setting.
process_option_list $location, @names;
process_global_option_list $location, @names;
# Strictness lookup and setting.
set_strictness 'foreign';
set_strictness 'gnu';
set_strictness 'gnits';
if ($strictness >= GNU) { ... }
print "$strictness_name\n";
=head1 DESCRIPTION
This packages manages Automake's options and strictness settings.
Options can be either local or global. Local options are set using an
C<AUTOMAKE_OPTIONS> variable in a F<Makefile.am> and apply only to
this F<Makefile.am>. Global options are set from the command line or
passed as an argument to C<AM_INIT_AUTOMAKE>, they apply to all
F<Makefile.am>s.
=cut
# Values are the Automake::Location of the definition.
use vars '%_options'; # From AUTOMAKE_OPTIONS
use vars '%_global_options'; # From AM_INIT_AUTOMAKE or the command line.
# Whether process_option_list has already been called for the current
# Makefile.am.
use vars '$_options_processed';
# Whether process_global_option_list has already been called.
use vars '$_global_options_processed';
=head2 Constants
=over 4
=item FOREIGN
=item GNU
=item GNITS
Strictness constants used as values for C<$strictness>.
=back
=cut
# Constants to define the "strictness" level.
use constant FOREIGN => 0;
use constant GNU => 1;
use constant GNITS => 2;
=head2 Variables
=over 4
=item C<$strictness>
The current strictness. One of C<FOREIGN>, C<GNU>, or C<GNITS>.
=item C<$strictness_name>
The current strictness name. One of C<'foreign'>, C<'gnu'>, or C<'gnits'>.
=back
=cut
# Strictness levels.
use vars qw ($strictness $strictness_name);
# Strictness level as set on command line.
use vars qw ($_default_strictness $_default_strictness_name);
=head2 Functions
=over 4
=item C<Automake::Options::reset>
Reset the options variables for the next F<Makefile.am>.
In other words, this gets rid of all local options in use by the
previous F<Makefile.am>.
=cut
sub reset ()
{
$_options_processed = 0;
%_options = %_global_options;
# The first time we are run,
# remember the current setting as the default.
if (defined $_default_strictness)
{
$strictness = $_default_strictness;
$strictness_name = $_default_strictness_name;
}
else
{
$_default_strictness = $strictness;
$_default_strictness_name = $strictness_name;
}
}
=item C<$value = option ($name)>
=item C<$value = global_option ($name)>
Query the state of an option. If the option is unset, this
returns the empty list. Otherwise it returns the option's value,
as set by C<set_option> or C<set_global_option>.
Note that C<global_option> should be used only when it is
important to make sure an option hasn't been set locally.
Otherwise C<option> should be the standard function to
check for options (be they global or local).
=cut
sub option ($)
{
my ($name) = @_;
return () unless defined $_options{$name};
return $_options{$name};
}
sub global_option ($)
{
my ($name) = @_;
return () unless defined $_global_options{$name};
return $_global_options{$name};
}
=item C<set_option ($name, $value)>
=item C<set_global_option ($name, $value)>
Set an option. By convention, C<$value> is usually the location
of the option definition.
=cut
sub set_option ($$)
{
my ($name, $value) = @_;
$_options{$name} = $value;
}
sub set_global_option ($$)
{
my ($name, $value) = @_;
$_global_options{$name} = $value;
}
=item C<unset_option ($name)>
=item C<unset_global_option ($name)>
Unset an option.
=cut
sub unset_option ($)
{
my ($name) = @_;
delete $_options{$name};
}
sub unset_global_option ($)
{
my ($name) = @_;
delete $_global_options{$name};
}
=item C<process_option_list (@list)>
=item C<process_global_option_list (@list)>
Process Automake's option lists. C<@list> should be a list of hash
references with keys C<option> and C<where>, where C<option> is an
option as they occur in C<AUTOMAKE_OPTIONS> or C<AM_INIT_AUTOMAKE>,
and C<where> is the location where that option occurred.
These functions should be called at most once for each set of options
having the same precedence; i.e., do not call it twice for two options
from C<AM_INIT_AUTOMAKE>.
Return 0 on error, 1 otherwise.
=cut
# $BOOL
# _option_is_from_configure ($OPTION, $WHERE)
# ----------------------------------------------
# Check that the $OPTION given in location $WHERE is specified with
# AM_INIT_AUTOMAKE, not with AUTOMAKE_OPTIONS.
sub _option_is_from_configure ($$)
{
my ($opt, $where)= @_;
return 1
if $where->get =~ /^configure\./;
error $where,
"option '$opt' can only be used as argument to AM_INIT_AUTOMAKE\n" .
"but not in AUTOMAKE_OPTIONS makefile statements";
return 0;
}
# $BOOL
# _is_valid_easy_option ($OPTION)
# -------------------------------
# Explicitly recognize valid automake options that require no
# special handling by '_process_option_list' below.
sub _is_valid_easy_option ($)
{
my $opt = shift;
return scalar grep { $opt eq $_ } qw(
check-news
color-tests
dejagnu
dist-bzip2
dist-lzip
dist-xz
dist-zip
info-in-builddir
no-define
no-dependencies
no-dist
no-dist-gzip
no-exeext
no-installinfo
no-installman
no-texinfo.tex
nostdinc
readme-alpha
serial-tests
parallel-tests
silent-rules
std-options
subdir-objects
);
}
# $BOOL
# _process_option_list (\%OPTIONS, @LIST)
# ------------------------------------------
# Process a list of options. \%OPTIONS is the hash to fill with options
# data. @LIST is a list of options as get passed to public subroutines
# process_option_list() and process_global_option_list() (see POD
# documentation above).
sub _process_option_list (\%@)
{
my ($options, @list) = @_;
my @warnings = ();
my $ret = 1;
foreach my $h (@list)
{
local $_ = $h->{'option'};
my $where = $h->{'where'};
$options->{$_} = $where;
if ($_ eq 'gnits' || $_ eq 'gnu' || $_ eq 'foreign')
{
set_strictness ($_);
}
# TODO: Remove this special check in Automake 3.0.
elsif (/^(.*\/)?ansi2knr$/)
{
# Obsolete (and now removed) de-ANSI-fication support.
error ($where,
"automatic de-ANSI-fication support has been removed");
$ret = 0;
}
# TODO: Remove this special check in Automake 3.0.
elsif ($_ eq 'cygnus')
{
error $where, "support for Cygnus-style trees has been removed";
$ret = 0;
}
# TODO: Remove this special check in Automake 3.0.
elsif ($_ eq 'dist-lzma')
{
error ($where, "support for lzma-compressed distribution " .
"archives has been removed");
$ret = 0;
}
# TODO: Make this a fatal error in Automake 2.0.
elsif ($_ eq 'dist-shar')
{
msg ('obsolete', $where,
"support for shar distribution archives is deprecated.\n" .
" It will be removed in Automake 2.0");
}
# TODO: Make this a fatal error in Automake 2.0.
elsif ($_ eq 'dist-tarZ')
{
msg ('obsolete', $where,
"support for distribution archives compressed with " .
"legacy program 'compress' is deprecated.\n" .
" It will be removed in Automake 2.0");
}
elsif (/^filename-length-max=(\d+)$/)
{
delete $options->{$_};
$options->{'filename-length-max'} = [$_, $1];
}
elsif ($_ eq 'tar-v7' || $_ eq 'tar-ustar' || $_ eq 'tar-pax')
{
if (not _option_is_from_configure ($_, $where))
{
$ret = 0;
}
for my $opt ('tar-v7', 'tar-ustar', 'tar-pax')
{
next
if $opt eq $_ or ! exists $options->{$opt};
error ($where,
"options '$_' and '$opt' are mutually exclusive");
$ret = 0;
}
}
elsif (/^\d+\.\d+(?:\.\d+)?[a-z]?(?:-[A-Za-z0-9]+)?$/)
{
# Got a version number.
if (Automake::Version::check ($VERSION, $&))
{
error ($where, "require Automake $_, but have $VERSION");
$ret = 0;
}
}
elsif (/^(?:--warnings=|-W)(.*)$/)
{
my @w = map { { cat => $_, loc => $where} } split (',', $1);
push @warnings, @w;
}
elsif (! _is_valid_easy_option $_)
{
error ($where, "option '$_' not recognized");
$ret = 0;
}
}
# We process warnings here, so that any explicitly-given warning setting
# will take precedence over warning settings defined implicitly by the
# strictness.
foreach my $w (@warnings)
{
msg 'unsupported', $w->{'loc'},
"unknown warning category '$w->{'cat'}'"
if switch_warning $w->{cat};
}
return $ret;
}
sub process_option_list (@)
{
prog_error "local options already processed"
if $_options_processed;
$_options_processed = 1;
_process_option_list (%_options, @_);
}
sub process_global_option_list (@)
{
prog_error "global options already processed"
if $_global_options_processed;
$_global_options_processed = 1;
_process_option_list (%_global_options, @_);
}
=item C<set_strictness ($name)>
Set the current strictness level.
C<$name> should be one of C<'foreign'>, C<'gnu'>, or C<'gnits'>.
=cut
# Set strictness.
sub set_strictness ($)
{
$strictness_name = $_[0];
Automake::ChannelDefs::set_strictness ($strictness_name);
if ($strictness_name eq 'gnu')
{
$strictness = GNU;
}
elsif ($strictness_name eq 'gnits')
{
$strictness = GNITS;
}
elsif ($strictness_name eq 'foreign')
{
$strictness = FOREIGN;
}
else
{
prog_error "level '$strictness_name' not recognized";
}
}
1;
PK (��\�j�
o^ o^ Automake/Rule.pmnu �[��� # Copyright (C) 2003-2018 Free Software Foundation, Inc.
# 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
package Automake::Rule;
use 5.006;
use strict;
use Carp;
use Automake::Item;
use Automake::RuleDef;
use Automake::ChannelDefs;
use Automake::Channels;
use Automake::Options;
use Automake::Condition qw (TRUE FALSE);
use Automake::DisjConditions;
require Exporter;
use vars '@ISA', '@EXPORT', '@EXPORT_OK';
@ISA = qw/Automake::Item Exporter/;
@EXPORT = qw (reset register_suffix_rule next_in_suffix_chain
suffixes rules $KNOWN_EXTENSIONS_PATTERN
depend %dependencies %actions register_action
accept_extensions
reject_rule msg_rule msg_cond_rule err_rule err_cond_rule
rule rrule ruledef rruledef);
=head1 NAME
Automake::Rule - support for rules definitions
=head1 SYNOPSIS
use Automake::Rule;
use Automake::RuleDef;
=head1 DESCRIPTION
This package provides support for Makefile rule definitions.
An C<Automake::Rule> is a rule name associated to possibly
many conditional definitions. These definitions are instances
of C<Automake::RuleDef>.
Therefore obtaining the value of a rule under a given
condition involves two lookups. One to look up the rule,
and one to look up the conditional definition:
my $rule = rule $name;
if ($rule)
{
my $def = $rule->def ($cond);
if ($def)
{
return $def->location;
}
...
}
...
when it is known that the rule and the definition
being looked up exist, the above can be simplified to
return rule ($name)->def ($cond)->location; # do not write this.
but is better written
return rrule ($name)->rdef ($cond)->location;
or even
return rruledef ($name, $cond)->location;
The I<r> variants of the C<rule>, C<def>, and C<ruledef> methods add
an extra test to ensure that the lookup succeeded, and will diagnose
failures as internal errors (with a message which is much more
informative than Perl's warning about calling a method on a
non-object).
=head2 Global variables
=over 4
=cut
my $_SUFFIX_RULE_PATTERN =
'^(\.[a-zA-Z0-9_(){}$+@\-]+)(\.[a-zA-Z0-9_(){}$+@\-]+)' . "\$";
my @_suffixes = ();
my @_known_extensions_list = ();
my %_rule_dict = ();
# See comments in the implementation of the 'next_in_suffix_chain()'
# variable for details.
my %_suffix_rules;
# Same as $suffix_rules, but records only the default rules
# supplied by the languages Automake supports.
my %_suffix_rules_builtin;
=item C<%dependencies>
Holds the dependencies of targets which dependencies are factored.
Typically, C<.PHONY> will appear in plenty of F<*.am> files, but must
be output once. Arguably all pure dependencies could be subject to
this factoring, but it is not unpleasant to have paragraphs in
Makefile: keeping related stuff altogether.
=cut
use vars '%dependencies';
=item <%actions>
Holds the factored actions. Tied to C<%dependencies>, i.e., filled
only when keys exists in C<%dependencies>.
=cut
use vars '%actions';
=item C<$KNOWN_EXTENSIONS_PATTERN>
Pattern that matches all know input extensions (i.e. extensions used
by the languages supported by Automake). Using this pattern (instead
of '\..*$') to match extensions allows Automake to support dot-less
extensions.
New extensions should be registered with C<accept_extensions>.
=cut
use vars qw ($KNOWN_EXTENSIONS_PATTERN);
$KNOWN_EXTENSIONS_PATTERN = "";
=back
=head2 Error reporting functions
In these functions, C<$rule> can be either a rule name, or
an instance of C<Automake::Rule>.
=over 4
=item C<err_rule ($rule, $message, [%options])>
Uncategorized errors about rules.
=cut
sub err_rule ($$;%)
{
msg_rule ('error', @_);
}
=item C<err_cond_rule ($cond, $rule, $message, [%options])>
Uncategorized errors about conditional rules.
=cut
sub err_cond_rule ($$$;%)
{
msg_cond_rule ('error', @_);
}
=item C<msg_cond_rule ($channel, $cond, $rule, $message, [%options])>
Messages about conditional rules.
=cut
sub msg_cond_rule ($$$$;%)
{
my ($channel, $cond, $rule, $msg, %opts) = @_;
my $r = ref ($rule) ? $rule : rrule ($rule);
msg $channel, $r->rdef ($cond)->location, $msg, %opts;
}
=item C<msg_rule ($channel, $targetname, $message, [%options])>
Messages about rules.
=cut
sub msg_rule ($$$;%)
{
my ($channel, $rule, $msg, %opts) = @_;
my $r = ref ($rule) ? $rule : rrule ($rule);
# Don't know which condition is concerned. Pick any.
my $cond = $r->conditions->one_cond;
msg_cond_rule ($channel, $cond, $r, $msg, %opts);
}
=item C<$bool = reject_rule ($rule, $error_msg)>
Bail out with C<$error_msg> if a rule with name C<$rule> has been
defined.
Return true iff C<$rule> is defined.
=cut
sub reject_rule ($$)
{
my ($rule, $msg) = @_;
if (rule ($rule))
{
err_rule $rule, $msg;
return 1;
}
return 0;
}
=back
=head2 Administrative functions
=over 4
=item C<accept_extensions (@exts)>
Update C<$KNOWN_EXTENSIONS_PATTERN> to recognize the extensions
listed in C<@exts>. Extensions should contain a dot if needed.
=cut
sub accept_extensions (@)
{
push @_known_extensions_list, @_;
$KNOWN_EXTENSIONS_PATTERN =
'(?:' . join ('|', map (quotemeta, @_known_extensions_list)) . ')';
}
=item C<rules>
Return the list of all L<Automake::Rule> instances. (I.e., all
rules defined so far.)
=cut
sub rules ()
{
return values %_rule_dict;
}
=item C<register_action($target, $action)>
Append the C<$action> to C<$actions{$target}> taking care of special
cases.
=cut
sub register_action ($$)
{
my ($target, $action) = @_;
if ($actions{$target})
{
$actions{$target} .= "\n$action" if $action;
}
else
{
$actions{$target} = $action;
}
}
=item C<Automake::Rule::reset>
The I<forget all> function. Clears all known rules and resets some
other internal data.
=cut
sub reset()
{
%_rule_dict = ();
@_suffixes = ();
%_suffix_rules = %_suffix_rules_builtin;
%dependencies =
(
# Texinfoing.
'dvi' => [],
'dvi-am' => [],
'pdf' => [],
'pdf-am' => [],
'ps' => [],
'ps-am' => [],
'info' => [],
'info-am' => [],
'html' => [],
'html-am' => [],
# Installing/uninstalling.
'install-data-am' => [],
'install-exec-am' => [],
'uninstall-am' => [],
'install-man' => [],
'uninstall-man' => [],
'install-dvi' => [],
'install-dvi-am' => [],
'install-html' => [],
'install-html-am' => [],
'install-info' => [],
'install-info-am' => [],
'install-pdf' => [],
'install-pdf-am' => [],
'install-ps' => [],
'install-ps-am' => [],
'installcheck-am' => [],
# Cleaning.
'clean-am' => [],
'mostlyclean-am' => [],
'maintainer-clean-am' => [],
'distclean-am' => [],
'clean' => [],
'mostlyclean' => [],
'maintainer-clean' => [],
'distclean' => [],
# Tarballing.
'dist-all' => [],
'.PHONY' => [],
'.PRECIOUS' => [],
# Recursive install targets (so "make -n install" works for BSD Make).
'.MAKE' => [],
);
%actions = ();
}
=item C<next_in_suffix_chain ($ext1, $ext2)>
Return the target suffix for the next rule to use to reach C<$ext2>
from C<$ext1>, or C<undef> if no such rule exists.
=cut
sub next_in_suffix_chain ($$)
{
my ($ext1, $ext2) = @_;
return undef unless (exists $_suffix_rules{$ext1} and
exists $_suffix_rules{$ext1}{$ext2});
return $_suffix_rules{$ext1}{$ext2}[0];
}
=item C<register_suffix_rule ($where, $src, $dest)>
Register a suffix rule defined on C<$where> that transforms
files ending in C<$src> into files ending in C<$dest>.
=cut
sub register_suffix_rule ($$$)
{
my ($where, $src, $dest) = @_;
my $suffix_rules = $where->{'position'} ? \%_suffix_rules
: \%_suffix_rules_builtin;
verb "Sources ending in $src become $dest";
push @_suffixes, $src, $dest;
# When transforming sources to objects, Automake uses the
# %suffix_rules to move from each source extension to
# '.$(OBJEXT)', not to '.o' or '.obj'. However some people
# define suffix rules for '.o' or '.obj', so internally we will
# consider these extensions equivalent to '.$(OBJEXT)'. We
# CANNOT rewrite the target (i.e., automagically replace '.o'
# and '.obj' by '.$(OBJEXT)' in the output), or warn the user
# that (s)he'd better use '.$(OBJEXT)', because Automake itself
# output suffix rules for '.o' or '.obj' ...
$dest = '.$(OBJEXT)' if ($dest eq '.o' || $dest eq '.obj');
# ----------------------------------------------------------------------
# The $suffix_rules variable maps the source extension for all suffix
# rules seen to a hash whose keys are the possible output extensions.
#
# Note that this is transitively closed by construction:
# if we have
#
# exists $suffix_rules{$ext1}{$ext2}
# && exists $suffix_rules{$ext2}{$ext3}
#
# then we also have
#
# exists $suffix_rules{$ext1}{$ext3}
#
# So it's easy to check whether '.foo' can be transformed to
# '.$(OBJEXT)' by checking whether $suffix_rules{'.foo'}{'.$(OBJEXT)'}
# exists. This will work even if transforming '.foo' to '.$(OBJEXT)'
# involves a chain of several suffix rules.
#
# The value of $suffix_rules{$ext1}{$ext2} is a pair [$next_sfx, $dist]
# where $next_sfx is target suffix for the next rule to use to reach
# $ext2, and $dist the distance to $ext2.
# ----------------------------------------------------------------------
# Register $dest as a possible destination from $src.
# We might have the create the \hash.
if (exists $suffix_rules->{$src})
{
$suffix_rules->{$src}{$dest} = [ $dest, 1 ];
}
else
{
$suffix_rules->{$src} = { $dest => [ $dest, 1 ] };
}
# If we know how to transform $dest in something else, then
# we know how to transform $src in that "something else".
if (exists $suffix_rules->{$dest})
{
for my $dest2 (keys %{$suffix_rules->{$dest}})
{
my $dist = $suffix_rules->{$dest}{$dest2}[1] + 1;
# Overwrite an existing $src->$dest2 path only if
# the path via $dest which is shorter.
if (! exists $suffix_rules->{$src}{$dest2}
|| $suffix_rules->{$src}{$dest2}[1] > $dist)
{
$suffix_rules->{$src}{$dest2} = [ $dest, $dist ];
}
}
}
# Similarly, any extension that can be derived into $src
# can be derived into the same extensions as $src can.
my @dest2 = keys %{$suffix_rules->{$src}};
for my $src2 (keys %$suffix_rules)
{
if (exists $suffix_rules->{$src2}{$src})
{
for my $dest2 (@dest2)
{
my $dist = $suffix_rules->{$src}{$dest2} + 1;
# Overwrite an existing $src2->$dest2 path only if
# the path via $src is shorter.
if (! exists $suffix_rules->{$src2}{$dest2}
|| $suffix_rules->{$src2}{$dest2}[1] > $dist)
{
$suffix_rules->{$src2}{$dest2} = [ $src, $dist ];
}
}
}
}
}
=item C<@list = suffixes>
Return the list of known suffixes.
=cut
sub suffixes ()
{
return @_suffixes;
}
=item C<rule ($rulename)>
Return the C<Automake::Rule> object for the rule
named C<$rulename> if defined. Return 0 otherwise.
=cut
sub rule ($)
{
my ($name) = @_;
# Strip $(EXEEXT) from $name, so we can diagnose
# a clash if 'ctags$(EXEEXT):' is redefined after 'ctags:'.
$name =~ s,\$\(EXEEXT\)$,,;
return $_rule_dict{$name} || 0;
}
=item C<ruledef ($rulename, $cond)>
Return the C<Automake::RuleDef> object for the rule named
C<$rulename> if defined in condition C<$cond>. Return false
if the condition or the rule does not exist.
=cut
sub ruledef ($$)
{
my ($name, $cond) = @_;
my $rule = rule $name;
return $rule && $rule->def ($cond);
}
=item C<rrule ($rulename)
Return the C<Automake::Rule> object for the variable named
C<$rulename>. Abort with an internal error if the variable was not
defined.
The I<r> in front of C<var> stands for I<required>. One
should call C<rvar> to assert the rule's existence.
=cut
sub rrule ($)
{
my ($name) = @_;
my $r = rule $name;
prog_error ("undefined rule $name\n" . &rules_dump)
unless $r;
return $r;
}
=item C<rruledef ($varname, $cond)>
Return the C<Automake::RuleDef> object for the rule named
C<$rulename> if defined in condition C<$cond>. Abort with an internal
error if the condition or the rule does not exist.
=cut
sub rruledef ($$)
{
my ($name, $cond) = @_;
return rrule ($name)->rdef ($cond);
}
# Create the variable if it does not exist.
# This is used only by other functions in this package.
sub _crule ($)
{
my ($name) = @_;
my $r = rule $name;
return $r if $r;
return _new Automake::Rule $name;
}
sub _new ($$)
{
my ($class, $name) = @_;
# Strip $(EXEEXT) from $name, so we can diagnose
# a clash if 'ctags$(EXEEXT):' is redefined after 'ctags:'.
(my $keyname = $name) =~ s,\$\(EXEEXT\)$,,;
my $self = Automake::Item::new ($class, $name);
$_rule_dict{$keyname} = $self;
return $self;
}
sub _rule_defn_with_exeext_awareness ($$$)
{
my ($target, $cond, $where) = @_;
# For now 'foo:' will override 'foo$(EXEEXT):'. This is temporary,
# though, so we emit a warning.
(my $noexe = $target) =~ s/\$\(EXEEXT\)$//;
my $noexerule = rule $noexe;
my $tdef = $noexerule ? $noexerule->def ($cond) : undef;
if ($noexe ne $target
&& $tdef
&& $noexerule->name ne $target)
{
# The no-exeext option enables this feature.
if (! option 'no-exeext')
{
msg ('obsolete', $tdef->location,
"deprecated feature: target '$noexe' overrides "
. "'$noexe\$(EXEEXT)'\n"
. "change your target to read '$noexe\$(EXEEXT)'",
partial => 1);
msg ('obsolete', $where, "target '$target' was defined here");
}
}
return $tdef;
}
sub _maybe_warn_about_duplicated_target ($$$$$$)
{
my ($target, $tdef, $source, $owner, $cond, $where) = @_;
my $oldowner = $tdef->owner;
# Ok, it's the name target, but the name maybe different because
# 'foo$(EXEEXT)' and 'foo' have the same key in our table.
my $oldname = $tdef->name;
# Don't mention true conditions in diagnostics.
my $condmsg =
$cond == TRUE ? '' : (" in condition '" . $cond->human . "'");
if ($owner == RULE_USER)
{
if ($oldowner == RULE_USER)
{
# Ignore '%'-style pattern rules. We'd need the
# dependencies to detect duplicates, and they are
# already diagnosed as unportable by -Wportability.
if ($target !~ /^[^%]*%[^%]*$/)
{
## FIXME: Presently we can't diagnose duplicate user rules
## because we don't distinguish rules with commands
## from rules that only add dependencies. E.g.,
## .PHONY: foo
## .PHONY: bar
## is legitimate. This is checked in the 'phony.sh' test.
# msg ('syntax', $where,
# "redefinition of '$target'$condmsg ...", partial => 1);
# msg_cond_rule ('syntax', $cond, $target,
# "... '$target' previously defined here");
}
}
else
{
# Since we parse the user Makefile.am before reading
# the Automake fragments, this condition should never happen.
prog_error ("user target '$target'$condmsg seen after Automake's"
. " definition\nfrom " . $tdef->source);
}
}
else # $owner == RULE_AUTOMAKE
{
if ($oldowner == RULE_USER)
{
# -am targets listed in %dependencies support a -local
# variant. If the user tries to override TARGET or
# TARGET-am for which there exists a -local variant,
# just tell the user to use it.
my $hint = 0;
my $noam = $target;
$noam =~ s/-am$//;
if (exists $dependencies{"$noam-am"})
{
$hint = "consider using $noam-local instead of $target";
}
msg_cond_rule ('override', $cond, $target,
"user target '$target' defined here"
. "$condmsg ...", partial => 1);
msg ('override', $where,
"... overrides Automake target '$oldname' defined here",
partial => $hint);
msg_cond_rule ('override', $cond, $target, $hint)
if $hint;
}
else # $oldowner == RULE_AUTOMAKE
{
# Automake should ignore redefinitions of its own
# rules if they came from the same file. This makes
# it easier to process a Makefile fragment several times.
# However it's an error if the target is defined in many
# files. E.g., the user might be using bin_PROGRAMS = ctags
# which clashes with our 'ctags' rule.
# (It would be more accurate if we had a way to compare
# the *content* of both rules. Then $targets_source would
# be useless.)
my $oldsource = $tdef->source;
if (not ($source eq $oldsource && $target eq $oldname))
{
msg ('syntax',
$where, "redefinition of '$target'$condmsg ...",
partial => 1);
msg_cond_rule ('syntax', $cond, $target,
"... '$oldname' previously defined here");
}
}
}
}
# Return the list of conditionals in which the rule was defined. In case
# an ambiguous conditional definition is detected, return the empty list.
sub _conditionals_for_rule ($$$$)
{
my ($rule, $owner, $cond, $where) = @_;
my $target = $rule->name;
my @conds;
my ($message, $ambig_cond) = $rule->conditions->ambiguous_p ($target, $cond);
return $cond if !$message; # No ambiguity.
if ($owner == RULE_USER)
{
# For user rules, just diagnose the ambiguity.
msg 'syntax', $where, "$message ...", partial => 1;
msg_cond_rule ('syntax', $ambig_cond, $target,
"... '$target' previously defined here");
return ();
}
# FIXME: for Automake rules, we can't diagnose ambiguities yet.
# The point is that Automake doesn't propagate conditions
# everywhere. For instance &handle_PROGRAMS doesn't care if
# bin_PROGRAMS was defined conditionally or not.
# On the following input
# if COND1
# foo:
# ...
# else
# bin_PROGRAMS = foo
# endif
# &handle_PROGRAMS will attempt to define a 'foo:' rule
# in condition TRUE (which conflicts with COND1). Fixing
# this in &handle_PROGRAMS and siblings seems hard: you'd
# have to explain &file_contents what to do with a
# condition. So for now we do our best *here*. If 'foo:'
# was already defined in condition COND1 and we want to define
# it in condition TRUE, then define it only in condition !COND1.
# (See cond14.sh and cond15.sh for some test cases.)
@conds = $rule->not_always_defined_in_cond ($cond)->conds;
# No conditions left to define the rule.
# Warn, because our workaround is meaningless in this case.
if (scalar @conds == 0)
{
msg 'syntax', $where, "$message ...", partial => 1;
msg_cond_rule ('syntax', $ambig_cond, $target,
"... '$target' previously defined here");
return ();
}
return @conds;
}
=item C<@conds = define ($rulename, $source, $owner, $cond, $where)>
Define a new rule. C<$rulename> is the list of targets. C<$source>
is the filename the rule comes from. C<$owner> is the owner of the
rule (C<RULE_AUTOMAKE> or C<RULE_USER>). C<$cond> is the
C<Automake::Condition> under which the rule is defined. C<$where> is
the C<Automake::Location> where the rule is defined.
Returns a (possibly empty) list of C<Automake::Condition>s where the
rule's definition should be output.
=cut
sub define ($$$$$)
{
my ($target, $source, $owner, $cond, $where) = @_;
prog_error "$where is not a reference"
unless ref $where;
prog_error "$cond is not a reference"
unless ref $cond;
# Don't even think about defining a rule in condition FALSE.
return () if $cond == FALSE;
my $tdef = _rule_defn_with_exeext_awareness ($target, $cond, $where);
# A GNU make-style pattern rule has a single "%" in the target name.
msg ('portability', $where,
"'%'-style pattern rules are a GNU make extension")
if $target =~ /^[^%]*%[^%]*$/;
# See whether this is a duplicated target declaration.
if ($tdef)
{
# Diagnose invalid target redefinitions, if any. Note that some
# target redefinitions are valid (e.g., for multiple-targets
# pattern rules).
_maybe_warn_about_duplicated_target ($target, $tdef, $source,
$owner, $cond, $where);
# Return so we don't redefine the rule in our tables, don't check
# for ambiguous condition, etc. The rule will be output anyway
# because '&read_am_file' ignores the return code.
return ();
}
my $rule = _crule $target;
# Conditions for which the rule should be defined. Due to some
# complications in the automake internals, this aspect is not as
# obvious as it might be, and in come cases this list must contain
# other entries in addition to '$cond'. See the comments in
# '_conditionals_for_rule' for a rationale.
my @conds = _conditionals_for_rule ($rule, $owner, $cond, $where);
# Stop if we had ambiguous conditional definitions.
return unless @conds;
# Finally define this rule.
for my $c (@conds)
{
my $def = new Automake::RuleDef ($target, '', $where->clone,
$owner, $source);
$rule->set ($c, $def);
}
# We honor inference rules with multiple targets because many
# makes support this and people use it. However this is disallowed
# by POSIX. We'll print a warning later.
my $target_count = 0;
my $inference_rule_count = 0;
for my $t (split (' ', $target))
{
++$target_count;
# Check if the rule is a suffix rule: either it's a rule for
# two known extensions...
if ($t =~ /^($KNOWN_EXTENSIONS_PATTERN)($KNOWN_EXTENSIONS_PATTERN)$/
# ...or it's a rule with unknown extensions (i.e., the rule
# looks like '.foo.bar:' but '.foo' or '.bar' are not
# declared in SUFFIXES and are not known language
# extensions). Automake will complete SUFFIXES from
# @suffixes automatically (see handle_footer).
|| ($t =~ /$_SUFFIX_RULE_PATTERN/o && accept_extensions($1)))
{
++$inference_rule_count;
register_suffix_rule ($where, $1, $2);
}
}
# POSIX allows multiple targets before the colon, but disallows
# definitions of multiple inference rules. It's also
# disallowed to mix plain targets with inference rules.
msg ('portability', $where,
"inference rules can have only one target before the colon (POSIX)")
if $inference_rule_count > 0 && $target_count > 1;
return @conds;
}
=item C<depend ($target, @deps)>
Adds C<@deps> to the dependencies of target C<$target>. This should
be used only with factored targets (those appearing in
C<%dependees>).
=cut
sub depend ($@)
{
my ($category, @dependees) = @_;
push (@{$dependencies{$category}}, @dependees);
}
=back
=head1 SEE ALSO
L<Automake::RuleDef>, L<Automake::Condition>,
L<Automake::DisjConditions>, L<Automake::Location>.
=cut
1;
PK (��\�2��� � Automake/RuleDef.pmnu �[��� # Copyright (C) 2003-2018 Free Software Foundation, Inc.
# 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
package Automake::RuleDef;
use 5.006;
use strict;
use Carp;
use Automake::ChannelDefs;
use Automake::ItemDef;
require Exporter;
use vars '@ISA', '@EXPORT';
@ISA = qw/Automake::ItemDef Exporter/;
@EXPORT = qw (&RULE_AUTOMAKE &RULE_USER);
=head1 NAME
Automake::RuleDef - a class for rule definitions
=head1 SYNOPSIS
use Automake::RuleDef;
use Automake::Location;
=head1 DESCRIPTION
This class gathers data related to one Makefile-rule definition.
It shouldn't be needed outside of F<Rule.pm>.
=head2 Constants
=over 4
=item C<RULE_AUTOMAKE>, C<RULE_USER>
Possible owners for rules.
=cut
use constant RULE_AUTOMAKE => 0; # Rule defined by Automake.
use constant RULE_USER => 1; # Rule defined in the user's Makefile.am.
=back
=head2 Methods
=over 4
=item C<new Automake::RuleDef ($name, $comment, $location, $owner, $source)>
Create a new rule definition with target C<$name>, with associated comment
C<$comment>, Location C<$location> and owner C<$owner>, defined in file
C<$source>.
=cut
sub new ($$$$$)
{
my ($class, $name, $comment, $location, $owner, $source) = @_;
my $self = Automake::ItemDef::new ($class, $comment, $location, $owner);
$self->{'source'} = $source;
$self->{'name'} = $name;
return $self;
}
=item C<$source = $rule-E<gt>source>
Return the source of the rule.
=cut
sub source ($)
{
my ($self) = @_;
return $self->{'source'};
}
=item C<$name = $rule-E<gt>name>
Return the name of the rule.
=cut
sub name ($)
{
my ($self) = @_;
return $self->{'name'};
}
=back
=head1 SEE ALSO
L<Automake::Rule>, L<Automake::ItemDef>.
=cut
1;
PK (��\ʩq! q! Automake/VarDef.pmnu �[��� # Copyright (C) 2003-2018 Free Software Foundation, Inc.
# 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
package Automake::VarDef;
use 5.006;
use strict;
use Carp;
use Automake::ChannelDefs;
use Automake::ItemDef;
require Exporter;
use vars '@ISA', '@EXPORT';
@ISA = qw/Automake::ItemDef Exporter/;
@EXPORT = qw (&VAR_AUTOMAKE &VAR_CONFIGURE &VAR_MAKEFILE
&VAR_ASIS &VAR_PRETTY &VAR_SILENT &VAR_SORTED);
=head1 NAME
Automake::VarDef - a class for variable definitions
=head1 SYNOPSIS
use Automake::VarDef;
use Automake::Location;
# Create a VarDef for a definition such as
# | # any comment
# | foo = bar # more comment
# in Makefile.am
my $loc = new Automake::Location 'Makefile.am:2';
my $def = new Automake::VarDef ('foo', 'bar # more comment',
'# any comment',
$loc, '', VAR_MAKEFILE, VAR_ASIS);
# Appending to a definition.
$def->append ('value to append', 'comment to append');
# Accessors.
my $value = $def->value; # with trailing '#' comments and
# continuation ("\\\n") omitted.
my $value = $def->raw_value; # the real value, as passed to new().
my $comment = $def->comment;
my $location = $def->location;
my $type = $def->type;
my $owner = $def->owner;
my $pretty = $def->pretty;
# Changing owner.
$def->set_owner (VAR_CONFIGURE,
new Automake::Location 'configure.ac:15');
# Marking examined definitions.
$def->set_seen;
my $seen_p = $def->seen;
# Printing a variable for debugging.
print STDERR $def->dump;
=head1 DESCRIPTION
This class gathers data related to one Makefile-variable definition.
=head2 Constants
=over 4
=item C<VAR_AUTOMAKE>, C<VAR_CONFIGURE>, C<VAR_MAKEFILE>
Possible owners for variables. A variable can be defined
by Automake, in F<configure.ac> (using C<AC_SUBST>), or in
the user's F<Makefile.am>.
=cut
# Defined so that the owner of a variable can only be increased (e.g
# Automake should not override a configure or Makefile variable).
use constant VAR_AUTOMAKE => 0; # Variable defined by Automake.
use constant VAR_CONFIGURE => 1;# Variable defined in configure.ac.
use constant VAR_MAKEFILE => 2; # Variable defined in Makefile.am.
=item C<VAR_ASIS>, C<VAR_PRETTY>, C<VAR_SILENT>, C<VAR_SORTED>
Possible print styles. C<VAR_ASIS> variables should be output as-is.
C<VAR_PRETTY> variables are wrapped on multiple lines if they cannot
fit on one. C<VAR_SILENT> variables are not output at all. Finally,
C<VAR_SORTED> variables should be sorted and then handled as
C<VAR_PRETTY> variables.
C<VAR_SILENT> variables can also be overridden silently (unlike the
other kinds of variables whose overriding may sometimes produce
warnings).
=cut
# Possible values for pretty.
use constant VAR_ASIS => 0; # Output as-is.
use constant VAR_PRETTY => 1; # Pretty printed on output.
use constant VAR_SILENT => 2; # Not output. (Can also be
# overridden silently.)
use constant VAR_SORTED => 3; # Sorted and pretty-printed.
=back
=head2 Methods
C<VarDef> defines the following methods in addition to those inherited
from L<Automake::ItemDef>.
=over 4
=item C<my $def = new Automake::VarDef ($varname, $value, $comment, $location, $type, $owner, $pretty)>
Create a new Makefile-variable definition. C<$varname> is the name of
the variable being defined and C<$value> its value.
C<$comment> is any comment preceding the definition. (Because
Automake reorders variable definitions in the output, it also tries to
carry comments around.)
C<$location> is the place where the definition occurred, it should be
an instance of L<Automake::Location>.
C<$type> should be C<''> for definitions made with C<=>, and C<':'>
for those made with C<:=>.
C<$owner> specifies who owns the variables, it can be one of
C<VAR_AUTOMAKE>, C<VAR_CONFIGURE>, or C<VAR_MAKEFILE> (see these
definitions).
Finally, C<$pretty> tells how the variable should be output, and can
be one of C<VAR_ASIS>, C<VAR_PRETTY>, or C<VAR_SILENT>, or
C<VAR_SORTED> (see these definitions).
=cut
sub new ($$$$$$$$)
{
my ($class, $var, $value, $comment, $location, $type, $owner, $pretty) = @_;
# A user variable must be set by either '=' or ':=', and later
# promoted to '+='.
if ($owner != VAR_AUTOMAKE && $type eq '+')
{
error $location, "$var must be set with '=' before using '+='";
}
my $self = Automake::ItemDef::new ($class, $comment, $location, $owner);
$self->{'value'} = $value;
$self->{'type'} = $type;
$self->{'pretty'} = $pretty;
$self->{'seen'} = 0;
return $self;
}
=item C<$def-E<gt>append ($value, $comment)>
Append C<$value> and <$comment> to the existing value and comment of
C<$def>. This is normally called on C<+=> definitions.
=cut
sub append ($$$)
{
my ($self, $value, $comment) = @_;
$self->{'comment'} .= $comment;
my $val = $self->{'value'};
# Strip comments from augmented variables. This is so that
# VAR = foo # com
# VAR += bar
# does not become
# VAR = foo # com bar
# Furthermore keeping '#' would not be portable if the variable is
# output on multiple lines.
$val =~ s/ ?#.*//;
# Insert a separator, if required.
$val .= ' ' if $val;
$self->{'value'} = $val . $value;
# Turn ASIS appended variables into PRETTY variables. This is to
# cope with 'make' implementation that cannot read very long lines.
$self->{'pretty'} = VAR_PRETTY if $self->{'pretty'} == VAR_ASIS;
}
=item C<$def-E<gt>value>
=item C<$def-E<gt>raw_value>
=item C<$def-E<gt>type>
=item C<$def-E<gt>pretty>
Accessors to the various constituents of a C<VarDef>. See the
documentation of C<new>'s arguments for a description of these.
=cut
sub value ($)
{
my ($self) = @_;
my $val = $self->raw_value;
# Strip anything past '#'. '#' characters cannot be escaped
# in Makefiles, so we don't have to be smart.
$val =~ s/#.*$//s;
# Strip backslashes.
$val =~ s/\\$/ /mg;
return $val;
}
sub raw_value ($)
{
my ($self) = @_;
return $self->{'value'};
}
sub type ($)
{
my ($self) = @_;
return $self->{'type'};
}
sub pretty ($)
{
my ($self) = @_;
return $self->{'pretty'};
}
=item C<$def-E<gt>set_owner ($owner, $location)>
Change the owner of a definition. This usually happens because
the user used C<+=> on an Automake variable, so (s)he now owns
the content. C<$location> should be an instance of L<Automake::Location>
indicating where the change took place.
=cut
sub set_owner ($$$)
{
my ($self, $owner, $location) = @_;
# We always adjust the location when the owner changes (even for
# '+=' statements). The risk otherwise is to warn about
# a VAR_MAKEFILE variable and locate it in configure.ac...
$self->{'owner'} = $owner;
$self->{'location'} = $location;
}
=item C<$def-E<gt>set_seen>
=item C<$bool = $def-E<gt>seen>
These function allows Automake to mark (C<set_seen>) variable that
it has examined in some way, and latter check (using C<seen>) for
unused variables. Unused variables usually indicate typos.
=cut
sub set_seen ($)
{
my ($self) = @_;
$self->{'seen'} = 1;
}
sub seen ($)
{
my ($self) = @_;
return $self->{'seen'};
}
=item C<$str = $def-E<gt>dump>
Format the contents of C<$def> as a human-readable string,
for debugging.
=cut
sub dump ($)
{
my ($self) = @_;
my $owner = $self->owner;
if ($owner == VAR_AUTOMAKE)
{
$owner = 'Automake';
}
elsif ($owner == VAR_CONFIGURE)
{
$owner = 'Configure';
}
elsif ($owner == VAR_MAKEFILE)
{
$owner = 'Makefile';
}
else
{
prog_error ("unexpected owner");
}
my $where = $self->location->dump;
my $comment = $self->comment;
my $value = $self->raw_value;
my $type = $self->type;
return "{
type: $type=
where: $where comment: $comment
value: $value
owner: $owner
}\n";
}
=back
=head1 SEE ALSO
L<Automake::Variable>, L<Automake::ItemDef>.
=cut
1;
PK (��\D�T藳 �� Automake/Variable.pmnu �[��� # Copyright (C) 2003-2018 Free Software Foundation, Inc.
# 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
package Automake::Variable;
use 5.006;
use strict;
use Carp;
use Automake::Channels;
use Automake::ChannelDefs;
use Automake::Configure_ac;
use Automake::Item;
use Automake::VarDef;
use Automake::Condition qw (TRUE FALSE);
use Automake::DisjConditions;
use Automake::General 'uniq';
use Automake::Wrap 'makefile_wrap';
require Exporter;
use vars '@ISA', '@EXPORT', '@EXPORT_OK';
@ISA = qw/Automake::Item Exporter/;
@EXPORT = qw (err_var msg_var msg_cond_var reject_var
var rvar vardef rvardef
variables
scan_variable_expansions check_variable_expansions
variable_delete
variables_dump
set_seen
require_variables
variable_value
output_variables
transform_variable_recursively);
=head1 NAME
Automake::Variable - support for variable definitions
=head1 SYNOPSIS
use Automake::Variable;
use Automake::VarDef;
# Defining a variable.
Automake::Variable::define($varname, $owner, $type,
$cond, $value, $comment,
$where, $pretty)
# Looking up a variable.
my $var = var $varname;
if ($var)
{
...
}
# Looking up a variable that is assumed to exist.
my $var = rvar $varname;
# The list of conditions where $var has been defined.
# ($var->conditions is an Automake::DisjConditions,
# $var->conditions->conds is a list of Automake::Condition.)
my @conds = $var->conditions->conds
# Access to the definition in Condition $cond.
# $def is an Automake::VarDef.
my $def = $var->def ($cond);
if ($def)
{
...
}
# When the conditional definition is assumed to exist, use
my $def = $var->rdef ($cond);
=head1 DESCRIPTION
This package provides support for Makefile variable definitions.
An C<Automake::Variable> is a variable name associated to possibly
many conditional definitions. These definitions are instances
of C<Automake::VarDef>.
Therefore obtaining the value of a variable under a given
condition involves two lookups. One to look up the variable,
and one to look up the conditional definition:
my $var = var $name;
if ($var)
{
my $def = $var->def ($cond);
if ($def)
{
return $def->value;
}
...
}
...
When it is known that the variable and the definition
being looked up exist, the above can be simplified to
return var ($name)->def ($cond)->value; # Do not write this.
but is better written
return rvar ($name)->rdef ($cond)->value;
or even
return rvardef ($name, $cond)->value;
The I<r> variants of the C<var>, C<def>, and C<vardef> methods add an
extra test to ensure that the lookup succeeded, and will diagnose
failures as internal errors (with a message which is much more
informative than Perl's warning about calling a method on a
non-object).
=cut
my $_VARIABLE_CHARACTERS = '[.A-Za-z0-9_@]+';
my $_VARIABLE_PATTERN = '^' . $_VARIABLE_CHARACTERS . "\$";
my $_VARIABLE_RECURSIVE_PATTERN =
'^([.A-Za-z0-9_@]|\$[({]' . $_VARIABLE_CHARACTERS . '[})]?)+' . "\$";
# The order in which variables should be output. (May contain
# duplicates -- only the first occurrence matters.)
my @_var_order;
# This keeps track of all variables defined by &_gen_varname.
# $_gen_varname{$base} is a hash for all variables defined with
# prefix '$base'. Values stored in this hash are the variable names.
# Keys have the form "(COND1)VAL1(COND2)VAL2..." where VAL1 and VAL2
# are the values of the variable for condition COND1 and COND2.
my %_gen_varname = ();
# $_gen_varname_n{$base} is the number of variables generated by
# _gen_varname() for $base. This is not the same as keys
# %{$_gen_varname{$base}} because %_gen_varname may also contain
# variables not generated by _gen_varname.
my %_gen_varname_n = ();
# Declare the macros that define known variables, so we can
# hint the user if she try to use one of these variables.
# Macros accessible via aclocal.
my %_am_macro_for_var =
(
CCAS => 'AM_PROG_AS',
CCASFLAGS => 'AM_PROG_AS',
EMACS => 'AM_PATH_LISPDIR',
GCJ => 'AM_PROG_GCJ',
LEX => 'AM_PROG_LEX',
LIBTOOL => 'LT_INIT',
lispdir => 'AM_PATH_LISPDIR',
pkgpyexecdir => 'AM_PATH_PYTHON',
pkgpythondir => 'AM_PATH_PYTHON',
pyexecdir => 'AM_PATH_PYTHON',
PYTHON => 'AM_PATH_PYTHON',
pythondir => 'AM_PATH_PYTHON',
);
# Macros shipped with Autoconf.
my %_ac_macro_for_var =
(
ALLOCA => 'AC_FUNC_ALLOCA',
CC => 'AC_PROG_CC',
CFLAGS => 'AC_PROG_CC',
CXX => 'AC_PROG_CXX',
CXXFLAGS => 'AC_PROG_CXX',
F77 => 'AC_PROG_F77',
FFLAGS => 'AC_PROG_F77',
FC => 'AC_PROG_FC',
FCFLAGS => 'AC_PROG_FC',
OBJC => 'AC_PROG_OBJC',
OBJCFLAGS => 'AC_PROG_OBJC',
OBJCXX => 'AC_PROG_OBJCXX',
OBJCXXFLAGS => 'AC_PROG_OBJCXX',
RANLIB => 'AC_PROG_RANLIB',
UPC => 'AM_PROG_UPC',
UPCFLAGS => 'AM_PROG_UPC',
YACC => 'AC_PROG_YACC',
);
# The name of the configure.ac file.
my $configure_ac;
# Variables that can be overridden without complaint from -Woverride
my %_silent_variable_override =
(AM_MAKEINFOHTMLFLAGS => 1,
AR => 1,
ARFLAGS => 1,
DEJATOOL => 1,
JAVAC => 1,
JAVAROOT => 1);
# Count of helper variables used to implement conditional '+='.
my $_appendvar;
# Each call to C<Automake::Variable::traverse_recursively> gets an
# unique label. This is used to detect recursively defined variables.
my $_traversal = 0;
=head2 Error reporting functions
In these functions, C<$var> can be either a variable name, or
an instance of C<Automake::Variable>.
=over 4
=item C<err_var ($var, $message, [%options])>
Uncategorized errors about variables.
=cut
sub err_var ($$;%)
{
msg_var ('error', @_);
}
=item C<msg_cond_var ($channel, $cond, $var, $message, [%options])>
Messages about conditional variable.
=cut
sub msg_cond_var ($$$$;%)
{
my ($channel, $cond, $var, $msg, %opts) = @_;
my $v = ref ($var) ? $var : rvar ($var);
msg $channel, $v->rdef ($cond)->location, $msg, %opts;
}
=item C<msg_var ($channel, $var, $message, [%options])>
Messages about variables.
=cut
sub msg_var ($$$;%)
{
my ($channel, $var, $msg, %opts) = @_;
my $v = ref ($var) ? $var : rvar ($var);
# Don't know which condition is concerned. Pick any.
my $cond = $v->conditions->one_cond;
msg_cond_var $channel, $cond, $v, $msg, %opts;
}
=item C<$bool = reject_var ($varname, $error_msg)>
Bail out with C<$error_msg> if a variable with name C<$varname> has
been defined.
Return true iff C<$varname> is defined.
=cut
sub reject_var ($$)
{
my ($var, $msg) = @_;
my $v = var ($var);
if ($v)
{
err_var $v, $msg;
return 1;
}
return 0;
}
=back
=head2 Administrative functions
=over 4
=item C<Automake::Variable::hook ($varname, $fun)>
Declare a function to be called whenever a variable
named C<$varname> is defined or redefined.
C<$fun> should take two arguments: C<$type> and C<$value>.
When type is C<''> or <':'>, C<$value> is the value being
assigned to C<$varname>. When C<$type> is C<'+'>, C<$value>
is the value being appended to C<$varname>.
=cut
use vars '%_hooks';
sub hook ($$)
{
my ($var, $fun) = @_;
$_hooks{$var} = $fun;
}
=item C<variables ([$suffix])>
Returns the list of all L<Automake::Variable> instances. (I.e., all
variables defined so far.) If C<$suffix> is supplied, return only
the L<Automake::Variable> instances that ends with C<_$suffix>.
=cut
use vars '%_variable_dict', '%_primary_dict';
sub variables (;$)
{
my ($suffix) = @_;
my @vars = ();
if ($suffix)
{
if (exists $_primary_dict{$suffix})
{
@vars = values %{$_primary_dict{$suffix}};
}
}
else
{
@vars = values %_variable_dict;
}
# The behaviour of the 'sort' built-in is undefined in scalar
# context, hence we need an ad-hoc handling for such context.
return wantarray ? sort { $a->name cmp $b->name } @vars : scalar @vars;
}
=item C<Automake::Variable::reset>
The I<forget all> function. Clears all know variables and reset some
other internal data.
=cut
sub reset ()
{
%_variable_dict = ();
%_primary_dict = ();
$_appendvar = 0;
@_var_order = ();
%_gen_varname = ();
%_gen_varname_n = ();
$_traversal = 0;
}
=item C<var ($varname)>
Return the C<Automake::Variable> object for the variable
named C<$varname> if defined. Return 0 otherwise.
=cut
sub var ($)
{
my ($name) = @_;
return $_variable_dict{$name} if exists $_variable_dict{$name};
return 0;
}
=item C<vardef ($varname, $cond)>
Return the C<Automake::VarDef> object for the variable named
C<$varname> if defined in condition C<$cond>. Return false
if the condition or the variable does not exist.
=cut
sub vardef ($$)
{
my ($name, $cond) = @_;
my $var = var $name;
return $var && $var->def ($cond);
}
# Create the variable if it does not exist.
# This is used only by other functions in this package.
sub _cvar ($)
{
my ($name) = @_;
my $v = var $name;
return $v if $v;
return _new Automake::Variable $name;
}
=item C<rvar ($varname)>
Return the C<Automake::Variable> object for the variable named
C<$varname>. Abort with an internal error if the variable was not
defined.
The I<r> in front of C<var> stands for I<required>. One
should call C<rvar> to assert the variable's existence.
=cut
sub rvar ($)
{
my ($name) = @_;
my $v = var $name;
prog_error ("undefined variable $name\n" . &variables_dump)
unless $v;
return $v;
}
=item C<rvardef ($varname, $cond)>
Return the C<Automake::VarDef> object for the variable named
C<$varname> if defined in condition C<$cond>. Abort with an internal
error if the condition or the variable does not exist.
=cut
sub rvardef ($$)
{
my ($name, $cond) = @_;
return rvar ($name)->rdef ($cond);
}
=back
=head2 Methods
C<Automake::Variable> is a subclass of C<Automake::Item>. See
that package for inherited methods.
Here are the methods specific to the C<Automake::Variable> instances.
Use the C<define> function, described latter, to create such objects.
=over 4
=cut
# Create Automake::Variable objects. This is used
# only in this file. Other users should use
# the "define" function.
sub _new ($$)
{
my ($class, $name) = @_;
my $self = Automake::Item::new ($class, $name);
$self->{'scanned'} = 0;
$self->{'last-append'} = []; # helper variable for last conditional append.
$_variable_dict{$name} = $self;
if ($name =~ /_([[:alnum:]]+)$/)
{
$_primary_dict{$1}{$name} = $self;
}
return $self;
}
# _check_ambiguous_condition ($SELF, $COND, $WHERE)
# -------------------------------------------------
# Check for an ambiguous conditional. This is called when a variable
# is being defined conditionally. If we already know about a
# definition that is true under the same conditions, then we have an
# ambiguity.
sub _check_ambiguous_condition ($$$)
{
my ($self, $cond, $where) = @_;
my $var = $self->name;
my ($message, $ambig_cond) = $self->conditions->ambiguous_p ($var, $cond);
# We allow silent variables to be overridden silently,
# by either silent or non-silent variables.
my $def = $self->def ($ambig_cond);
if ($message && $def->pretty != VAR_SILENT)
{
msg 'syntax', $where, "$message ...", partial => 1;
msg_var ('syntax', $var, "... '$var' previously defined here");
verb ($self->dump);
}
}
=item C<$bool = $var-E<gt>check_defined_unconditionally ([$parent, $parent_cond])>
Warn if the variable is conditionally defined. C<$parent> is the name
of the parent variable, and C<$parent_cond> the condition of the parent
definition. These two variables are used to display diagnostics.
=cut
sub check_defined_unconditionally ($;$$)
{
my ($self, $parent, $parent_cond) = @_;
if (!$self->conditions->true)
{
if ($parent)
{
msg_cond_var ('unsupported', $parent_cond, $parent,
"automake does not support conditional definition of "
. $self->name . " in $parent");
}
else
{
msg_var ('unsupported', $self,
"automake does not support " . $self->name
. " being defined conditionally");
}
}
}
=item C<$str = $var-E<gt>output ([@conds])>
Format all the definitions of C<$var> if C<@cond> is not specified,
else only that corresponding to C<@cond>.
=cut
sub output ($@)
{
my ($self, @conds) = @_;
@conds = $self->conditions->conds
unless @conds;
my $res = '';
my $name = $self->name;
foreach my $cond (@conds)
{
my $def = $self->def ($cond);
prog_error ("unknown condition '" . $cond->human . "' for '"
. $self->name . "'")
unless $def;
next
if $def->pretty == VAR_SILENT;
$res .= $def->comment;
my $val = $def->raw_value;
my $equals = $def->type eq ':' ? ':=' : '=';
my $str = $cond->subst_string;
if ($def->pretty == VAR_ASIS)
{
my $output_var = "$name $equals $val";
$output_var =~ s/^/$str/meg;
$res .= "$output_var\n";
}
elsif ($def->pretty == VAR_PRETTY)
{
# Suppress escaped new lines. &makefile_wrap will
# add them back, maybe at other places.
$val =~ s/\\$//mg;
my $wrap = makefile_wrap ("$str$name $equals", "$str\t",
split (' ', $val));
# If the last line of the definition is made only of
# @substitutions@, append an empty variable to make sure it
# cannot be substituted as a blank line (that would confuse
# HP-UX Make).
$wrap = makefile_wrap ("$str$name $equals", "$str\t",
split (' ', $val), '$(am__empty)')
if $wrap =~ /\n(\s*@\w+@)+\s*$/;
$res .= $wrap;
}
else # ($def->pretty == VAR_SORTED)
{
# Suppress escaped new lines. &makefile_wrap will
# add them back, maybe at other places.
$val =~ s/\\$//mg;
$res .= makefile_wrap ("$str$name $equals", "$str\t",
sort (split (' ' , $val)));
}
}
return $res;
}
=item C<@values = $var-E<gt>value_as_list ($cond, [$parent, $parent_cond])>
Get the value of C<$var> as a list, given a specified condition,
without recursing through any subvariables.
C<$cond> is the condition of interest. C<$var> does not need
to be defined for condition C<$cond> exactly, but it needs
to be defined for at most one condition implied by C<$cond>.
C<$parent> and C<$parent_cond> designate the name and the condition
of the parent variable, i.e., the variable in which C<$var> is
being expanded. These are used in diagnostics.
For example, if C<A> is defined as "C<foo $(B) bar>" in condition
C<TRUE>, calling C<rvar ('A')->value_as_list (TRUE)> will return
C<("foo", "$(B)", "bar")>.
=cut
sub value_as_list ($$;$$)
{
my ($self, $cond, $parent, $parent_cond) = @_;
my @result;
# Get value for given condition
my $onceflag;
foreach my $vcond ($self->conditions->conds)
{
if ($vcond->true_when ($cond))
{
# If there is more than one definitions of $var matching
# $cond then we are in trouble: tell the user we need a
# paddle. Continue by merging results from all conditions,
# although it doesn't make much sense.
$self->check_defined_unconditionally ($parent, $parent_cond)
if $onceflag;
$onceflag = 1;
my $val = $self->rdef ($vcond)->value;
push @result, split (' ', $val);
}
}
return @result;
}
=item C<@values = $var-E<gt>value_as_list_recursive ([%options])>
Return the contents of C<$var> as a list, split on whitespace. This
will recursively follow C<$(...)> and C<${...}> inclusions. It
preserves C<@...@> substitutions.
C<%options> is a list of option for C<Variable::traverse_recursively>
(see this method). The most useful is C<cond_filter>:
$var->value_as_list_recursive (cond_filter => $cond)
will return the contents of C<$var> and any subvariable in all
conditions implied by C<$cond>.
C<%options> can also carry options specific to C<value_as_list_recursive>.
Presently, the only such option is C<location =E<gt> 1> which instructs
C<value_as_list_recursive> to return a list of C<[$location, @values]> pairs.
=cut
sub value_as_list_recursive ($;%)
{
my ($var, %options) = @_;
return $var->traverse_recursively
(# Construct [$location, $value] pairs if requested.
sub {
my ($var, $val, $cond, $full_cond) = @_;
return [$var->rdef ($cond)->location, $val] if $options{'location'};
return $val;
},
# Collect results.
sub {
my ($var, $parent_cond, @allresults) = @_;
return map { my ($cond, @vals) = @$_; @vals } @allresults;
},
%options);
}
=item C<$bool = $var-E<gt>has_conditional_contents>
Return 1 if C<$var> or one of its subvariable was conditionally
defined. Return 0 otherwise.
=cut
sub has_conditional_contents ($)
{
my ($self) = @_;
# Traverse the variable recursively until we
# find a variable defined conditionally.
# Use 'die' to abort the traversal, and pass it '$full_cond'
# to we can find easily whether the 'eval' block aborted
# because we found a condition, or for some other error.
eval
{
$self->traverse_recursively
(sub
{
my ($subvar, $val, $cond, $full_cond) = @_;
die $full_cond if ! $full_cond->true;
return ();
},
sub { return (); });
};
if ($@)
{
return 1 if ref ($@) && $@->isa ("Automake::Condition");
# Propagate other errors.
die;
}
return 0;
}
=item C<$string = $var-E<gt>dump>
Return a string describing all we know about C<$var>.
For debugging.
=cut
sub dump ($)
{
my ($self) = @_;
my $text = $self->name . ": \n {\n";
foreach my $vcond ($self->conditions->conds)
{
$text .= " " . $vcond->human . " => " . $self->rdef ($vcond)->dump;
}
$text .= " }\n";
return $text;
}
=back
=head2 Utility functions
=over 4
=item C<@list = scan_variable_expansions ($text)>
Return the list of variable names expanded in C<$text>. Note that
unlike some other functions, C<$text> is not split on spaces before we
check for subvariables.
=cut
sub scan_variable_expansions ($)
{
my ($text) = @_;
my @result = ();
# Strip comments.
$text =~ s/#.*$//;
# Record each use of ${stuff} or $(stuff) that does not follow a $.
while ($text =~ /(?<!\$)\$(?:\{([^\}]*)\}|\(([^\)]*)\))/g)
{
my $var = $1 || $2;
# The occurrence may look like $(string1[:subst1=[subst2]]) but
# we want only 'string1'.
$var =~ s/:[^:=]*=[^=]*$//;
push @result, $var;
}
return @result;
}
=item C<check_variable_expansions ($text, $where)>
Check variable expansions in C<$text> and warn about any name that
does not conform to POSIX. C<$where> is the location of C<$text>
for the error message.
=cut
sub check_variable_expansions ($$)
{
my ($text, $where) = @_;
# Catch expansion of variables whose name does not conform to POSIX.
foreach my $var (scan_variable_expansions ($text))
{
if ($var !~ /$_VARIABLE_PATTERN/o)
{
# If the variable name contains a space, it's likely
# to be a GNU make extension (such as $(addsuffix ...)).
# Mention this in the diagnostic.
my $gnuext = "";
$gnuext = "\n(probably a GNU make extension)" if $var =~ / /;
# Accept recursive variable expansions if so desired
# (we hope they are rather portable in practice).
if ($var =~ /$_VARIABLE_RECURSIVE_PATTERN/o)
{
msg ('portability-recursive', $where,
"$var: non-POSIX recursive variable expansion$gnuext");
}
else
{
msg ('portability', $where, "$var: non-POSIX variable name$gnuext");
}
}
}
}
=item C<Automake::Variable::define($varname, $owner, $type, $cond, $value, $comment, $where, $pretty)>
Define or append to a new variable.
C<$varname>: the name of the variable being defined.
C<$owner>: owner of the variable (one of C<VAR_MAKEFILE>,
C<VAR_CONFIGURE>, or C<VAR_AUTOMAKE>, defined by L<Automake::VarDef>).
Variables can be overridden, provided the new owner is not weaker
(C<VAR_AUTOMAKE> < C<VAR_CONFIGURE> < C<VAR_MAKEFILE>).
C<$type>: the type of the assignment (C<''> for C<FOO = bar>,
C<':'> for C<FOO := bar>, and C<'+'> for C<'FOO += bar'>).
C<$cond>: the C<Condition> in which C<$var> is being defined.
C<$value>: the value assigned to C<$var> in condition C<$cond>.
C<$comment>: any comment (C<'# bla.'>) associated with the assignment.
Comments from C<+=> assignments stack with comments from the last C<=>
assignment.
C<$where>: the C<Location> of the assignment.
C<$pretty>: whether C<$value> should be pretty printed (one of
C<VAR_ASIS>, C<VAR_PRETTY>, C<VAR_SILENT>, or C<VAR_SORTED>, defined
by by L<Automake::VarDef>). C<$pretty> applies only to real
assignments. I.e., it does not apply to a C<+=> assignment (except
when part of it is being done as a conditional C<=> assignment).
This function will all run any hook registered with the C<hook>
function.
=cut
sub define ($$$$$$$$)
{
my ($var, $owner, $type, $cond, $value, $comment, $where, $pretty) = @_;
prog_error "$cond is not a reference"
unless ref $cond;
prog_error "$where is not a reference"
unless ref $where;
prog_error "pretty argument missing"
unless defined $pretty && ($pretty == VAR_ASIS
|| $pretty == VAR_PRETTY
|| $pretty == VAR_SILENT
|| $pretty == VAR_SORTED);
error $where, "bad characters in variable name '$var'"
if $var !~ /$_VARIABLE_PATTERN/o;
# ':='-style assignments are not acknowledged by POSIX. Moreover it
# has multiple meanings. In GNU make or BSD make it means "assign
# with immediate expansion", while in OSF make it is used for
# conditional assignments.
msg ('portability', $where, "':='-style assignments are not portable")
if $type eq ':';
check_variable_expansions ($value, $where);
# If there's a comment, make sure it is \n-terminated.
if ($comment)
{
chomp $comment;
$comment .= "\n";
}
else
{
$comment = '';
}
my $self = _cvar $var;
my $def = $self->def ($cond);
my $new_var = $def ? 0 : 1;
# Additional checks for Automake definitions.
if ($owner == VAR_AUTOMAKE && ! $new_var)
{
# An Automake variable must be consistently defined with the same
# sign by Automake.
if ($def->type ne $type && $def->owner == VAR_AUTOMAKE)
{
error ($def->location,
"Automake variable '$var' was set with '"
. $def->type . "=' here ...", partial => 1);
error ($where, "... and is now set with '$type=' here.");
prog_error ("Automake variable assignments should be consistently\n"
. "defined with the same sign");
}
# If Automake tries to override a value specified by the user,
# just don't let it do.
if ($def->owner != VAR_AUTOMAKE)
{
if (! exists $_silent_variable_override{$var})
{
my $condmsg = ($cond == TRUE
? '' : (" in condition '" . $cond->human . "'"));
msg_cond_var ('override', $cond, $var,
"user variable '$var' defined here$condmsg ...",
partial => 1);
msg ('override', $where,
"... overrides Automake variable '$var' defined here");
}
verb ("refusing to override the user definition of:\n"
. $self->dump ."with '" . $cond->human . "' => '$value'");
return;
}
}
# Differentiate assignment types.
# 1. append (+=) to a variable defined for current condition
if ($type eq '+' && ! $new_var)
{
$def->append ($value, $comment);
$self->{'last-append'} = [];
# Only increase owners. A VAR_CONFIGURE variable augmented in a
# Makefile.am becomes a VAR_MAKEFILE variable.
$def->set_owner ($owner, $where->clone)
if $owner > $def->owner;
}
# 2. append (+=) to a variable defined for *another* condition
elsif ($type eq '+' && ! $self->conditions->false)
{
# * Generally, $cond is not TRUE. For instance:
# FOO = foo
# if COND
# FOO += bar
# endif
# In this case, we declare an helper variable conditionally,
# and append it to FOO:
# FOO = foo $(am__append_1)
# @COND_TRUE@am__append_1 = bar
# Of course if FOO is defined under several conditions, we add
# $(am__append_1) to each definitions.
#
# * If $cond is TRUE, we don't need the helper variable. E.g., in
# if COND1
# FOO = foo1
# else
# FOO = foo2
# endif
# FOO += bar
# we can add bar directly to all definition of FOO, and output
# @COND_TRUE@FOO = foo1 bar
# @COND_FALSE@FOO = foo2 bar
my $lastappend = [];
# Do we need an helper variable?
if ($cond != TRUE)
{
# Can we reuse the helper variable created for the previous
# append? (We cannot reuse older helper variables because
# we must preserve the order of items appended to the
# variable.)
my $condstr = $cond->string;
my $key = "$var:$condstr";
my ($appendvar, $appendvarcond) = @{$self->{'last-append'}};
if ($appendvar && $condstr eq $appendvarcond)
{
# Yes, let's simply append to it.
$var = $appendvar;
$owner = VAR_AUTOMAKE;
$self = var ($var);
$def = $self->rdef ($cond);
$new_var = 0;
}
else
{
# No, create it.
my $num = ++$_appendvar;
my $hvar = "am__append_$num";
$lastappend = [$hvar, $condstr];
&define ($hvar, VAR_AUTOMAKE, '+',
$cond, $value, $comment, $where, $pretty);
# Now HVAR is to be added to VAR.
$comment = '';
$value = "\$($hvar)";
}
}
# Add VALUE to all definitions of SELF.
foreach my $vcond ($self->conditions->conds)
{
# We have a bit of error detection to do here.
# This:
# if COND1
# X = Y
# endif
# X += Z
# should be rejected because X is not defined for all conditions
# where '+=' applies.
my $undef_cond = $self->not_always_defined_in_cond ($cond);
if (! $undef_cond->false)
{
error ($where,
"cannot apply '+=' because '$var' is not defined "
. "in\nthe following conditions:\n "
. join ("\n ", map { $_->human } $undef_cond->conds)
. "\neither define '$var' in these conditions,"
. " or use\n'+=' in the same conditions as"
. " the definitions.");
}
else
{
&define ($var, $owner, '+', $vcond, $value, $comment,
$where, $pretty);
}
}
$self->{'last-append'} = $lastappend;
}
# 3. first assignment (=, :=, or +=)
else
{
# There must be no previous value unless the user is redefining
# an Automake variable or an AC_SUBST variable for an existing
# condition.
_check_ambiguous_condition ($self, $cond, $where)
unless (!$new_var
&& (($def->owner == VAR_AUTOMAKE && $owner != VAR_AUTOMAKE)
|| $def->owner == VAR_CONFIGURE));
# Never decrease an owner.
$owner = $def->owner
if ! $new_var && $owner < $def->owner;
# Assignments to a macro set its location. We don't adjust
# locations for '+='. Ideally I suppose we would associate
# line numbers with random bits of text.
$def = new Automake::VarDef ($var, $value, $comment, $where->clone,
$type, $owner, $pretty);
$self->set ($cond, $def);
push @_var_order, $var;
}
# Call any defined hook. This helps to update some internal state
# *while* parsing the file. For instance the handling of SUFFIXES
# requires this (see var_SUFFIXES_trigger).
&{$_hooks{$var}}($type, $value) if exists $_hooks{$var};
}
=item C<variable_delete ($varname, [@conds])>
Forget about C<$varname> under the conditions C<@conds>, or completely
if C<@conds> is empty.
=cut
sub variable_delete ($@)
{
my ($var, @conds) = @_;
if (!@conds)
{
delete $_variable_dict{$var};
}
else
{
for my $cond (@conds)
{
delete $_variable_dict{$var}{'defs'}{$cond};
}
}
if ($var =~ /_([[:alnum:]]+)$/)
{
delete $_primary_dict{$1}{$var};
}
}
=item C<$str = variables_dump>
Return a string describing all we know about all variables.
For debugging.
=cut
sub variables_dump ()
{
my $text = "all variables:\n{\n";
foreach my $var (variables())
{
$text .= $var->dump;
}
$text .= "}\n";
return $text;
}
=item C<$var = set_seen ($varname)>
=item C<$var = $var-E<gt>set_seen>
Mark all definitions of this variable as examined, if the variable
exists. See L<Automake::VarDef::set_seen>.
Return the C<Variable> object if the variable exists, or 0
otherwise (i.e., as the C<var> function).
=cut
sub set_seen ($)
{
my ($self) = @_;
$self = ref $self ? $self : var $self;
return 0 unless $self;
for my $c ($self->conditions->conds)
{
$self->rdef ($c)->set_seen;
}
return $self;
}
=item C<$count = require_variables ($where, $reason, $cond, @variables)>
Make sure that each supplied variable is defined in C<$cond>.
Otherwise, issue a warning showing C<$reason> (C<$reason> should be
the reason why these variables are required, for instance C<'option foo
used'>). If we know which macro can define this variable, hint the
user. Return the number of undefined variables.
=cut
sub require_variables ($$$@)
{
my ($where, $reason, $cond, @vars) = @_;
my $res = 0;
$reason .= ' but ' unless $reason eq '';
$configure_ac = find_configure_ac
unless defined $configure_ac;
VARIABLE:
foreach my $var (@vars)
{
# Nothing to do if the variable exists.
next VARIABLE
if vardef ($var, $cond);
my $text = "$reason'$var' is undefined\n";
my $v = var $var;
if ($v)
{
my $undef_cond = $v->not_always_defined_in_cond ($cond);
next VARIABLE
if $undef_cond->false;
$text .= ("in the following conditions:\n "
. join ("\n ", map { $_->human } $undef_cond->conds)
. "\n");
}
++$res;
if (exists $_am_macro_for_var{$var})
{
my $mac = $_am_macro_for_var{$var};
$text .= " The usual way to define '$var' is to add "
. "'$mac'\n to '$configure_ac' and run 'aclocal' and "
. "'autoconf' again.";
# aclocal will not warn about undefined macros unless it
# starts with AM_.
$text .= "\n If '$mac' is in '$configure_ac', make sure\n"
. " its definition is in aclocal's search path."
unless $mac =~ /^AM_/;
}
elsif (exists $_ac_macro_for_var{$var})
{
$text .= " The usual way to define '$var' is to add "
. "'$_ac_macro_for_var{$var}'\n to '$configure_ac' and "
. "run 'autoconf' again.";
}
error $where, $text, uniq_scope => US_GLOBAL;
}
return $res;
}
=item C<$count = $var->requires_variables ($reason, @variables)>
Same as C<require_variables>, but a method of Automake::Variable.
C<@variables> should be defined in the same conditions as C<$var> is
defined.
=cut
sub requires_variables ($$@)
{
my ($var, $reason, @args) = @_;
my $res = 0;
for my $cond ($var->conditions->conds)
{
$res += require_variables ($var->rdef ($cond)->location, $reason,
$cond, @args);
}
return $res;
}
=item C<variable_value ($var)>
Get the C<TRUE> value of a variable, warn if the variable is
conditionally defined. C<$var> can be either a variable name
or a C<Automake::Variable> instance (this allows calls such
as C<$var-E<gt>variable_value>).
=cut
sub variable_value ($)
{
my ($var) = @_;
my $v = ref ($var) ? $var : var ($var);
return () unless $v;
$v->check_defined_unconditionally;
my $d = $v->def (TRUE);
return $d ? $d->value : "";
}
=item C<$str = output_variables>
Format definitions for all variables.
=cut
sub output_variables ()
{
my $res = '';
# We output variables it in the same order in which they were
# defined (skipping duplicates).
my @vars = uniq @_var_order;
# Output all the Automake variables. If the user changed one,
# then it is now marked as VAR_CONFIGURE or VAR_MAKEFILE.
foreach my $var (@vars)
{
my $v = rvar $var;
foreach my $cond ($v->conditions->conds)
{
$res .= $v->output ($cond)
if $v->rdef ($cond)->owner == VAR_AUTOMAKE;
}
}
# Now dump the user variables that were defined.
foreach my $var (@vars)
{
my $v = rvar $var;
foreach my $cond ($v->conditions->conds)
{
$res .= $v->output ($cond)
if $v->rdef ($cond)->owner != VAR_AUTOMAKE;
}
}
return $res;
}
=item C<$var-E<gt>traverse_recursively (&fun_item, &fun_collect, [cond_filter =E<gt> $cond_filter], [inner_expand =E<gt> 1], [skip_ac_subst =E<gt> 1])>
Split the value of the Automake::Variable C<$var> on space, and
traverse its components recursively.
If C<$cond_filter> is an C<Automake::Condition>, process any
conditions which are true when C<$cond_filter> is true. Otherwise,
process all conditions.
We distinguish two kinds of items in the content of C<$var>.
Terms that look like C<$(foo)> or C<${foo}> are subvariables
and cause recursion. Other terms are assumed to be filenames.
Each time a filename is encountered, C<&fun_item> is called with the
following arguments:
($var, -- the Automake::Variable we are currently
traversing
$val, -- the item (i.e., filename) to process
$cond, -- the Condition for the $var definition we are
examining (ignoring the recursion context)
$full_cond) -- the full Condition, taking into account
conditions inherited from parent variables
during recursion
If C<inner_expand> is set, variable references occurring in filename
(as in C<$(BASE).ext>) are expanded before the filename is passed to
C<&fun_item>.
If C<skip_ac_subst> is set, Autoconf @substitutions@ will be skipped,
i.e., C<&fun_item> will never be called for them.
C<&fun_item> may return a list of items, they will be passed to
C<&fun_store> later on. Define C<&fun_item> or @<&fun_store> as
C<undef> when they serve no purpose.
Once all items of a variable have been processed, the result (of the
calls to C<&fun_items>, or of recursive traversals of subvariables)
are passed to C<&fun_collect>. C<&fun_collect> receives three
arguments:
($var, -- the variable being traversed
$parent_cond, -- the Condition inherited from parent
variables during recursion
@condlist) -- a list of [$cond, @results] pairs
where each $cond appear only once, and @result
are all the results for this condition.
Typically you should do C<$cond->merge ($parent_cond)> to recompute
the C<$full_cond> associated to C<@result>. C<&fun_collect> may
return a list of items, that will be used as the result of
C<Automake::Variable::traverse_recursively> (the top-level, or its
recursive calls).
=cut
# Contains a stack of 'from' and 'to' parts of variable
# substitutions currently in force.
my @_substfroms;
my @_substtos;
sub traverse_recursively ($&&;%)
{
++$_traversal;
@_substfroms = ();
@_substtos = ();
my ($var, $fun_item, $fun_collect, %options) = @_;
my $cond_filter = $options{'cond_filter'};
my $inner_expand = $options{'inner_expand'};
my $skip_ac_subst = $options{'skip_ac_subst'};
return $var->_do_recursive_traversal ($var,
$fun_item, $fun_collect,
$cond_filter, TRUE, $inner_expand,
$skip_ac_subst)
}
# The guts of Automake::Variable::traverse_recursively.
sub _do_recursive_traversal ($$&&$$$$)
{
my ($var, $parent, $fun_item, $fun_collect, $cond_filter, $parent_cond,
$inner_expand, $skip_ac_subst) = @_;
$var->set_seen;
if ($var->{'scanned'} == $_traversal)
{
err_var $var, "variable '" . $var->name() . "' recursively defined";
return ();
}
$var->{'scanned'} = $_traversal;
my @allresults = ();
my $cond_once = 0;
foreach my $cond ($var->conditions->conds)
{
if (ref $cond_filter)
{
# Ignore conditions that don't match $cond_filter.
next if ! $cond->true_when ($cond_filter);
# If we found out several definitions of $var
# match $cond_filter then we are in trouble.
# Tell the user we don't support this.
$var->check_defined_unconditionally ($parent, $parent_cond)
if $cond_once;
$cond_once = 1;
}
my @result = ();
my $full_cond = $cond->merge ($parent_cond);
my @to_process = $var->value_as_list ($cond, $parent, $parent_cond);
while (@to_process)
{
my $val = shift @to_process;
# If $val is a variable (i.e. ${foo} or $(bar), not a filename),
# handle the sub variable recursively.
# (Backslashes before '}' and ')' within brackets are here to
# please Emacs's indentation.)
if ($val =~ /^\$\{([^\}]*)\}$/ || $val =~ /^\$\(([^\)]*)\)$/)
{
my $subvarname = $1;
# If the user uses a losing variable name, just ignore it.
# This isn't ideal, but people have requested it.
next if ($subvarname =~ /\@.*\@/);
# See if the variable is actually a substitution reference
my ($from, $to);
# This handles substitution references like ${foo:.a=.b}.
if ($subvarname =~ /^([^:]*):([^=]*)=(.*)$/o)
{
$subvarname = $1;
$to = $3;
$from = quotemeta $2;
}
my $subvar = var ($subvarname);
# Don't recurse into undefined variables.
next unless $subvar;
push @_substfroms, $from;
push @_substtos, $to;
my @res = $subvar->_do_recursive_traversal ($parent,
$fun_item,
$fun_collect,
$cond_filter,
$full_cond,
$inner_expand,
$skip_ac_subst);
push (@result, @res);
pop @_substfroms;
pop @_substtos;
next;
}
# Try to expand variable references inside filenames such as
# '$(NAME).txt'. We do not handle ':.foo=.bar'
# substitutions, but it would make little sense to use this
# here anyway.
elsif ($inner_expand
&& ($val =~ /\$\{([^\}]*)\}/ || $val =~ /\$\(([^\)]*)\)/))
{
my $subvarname = $1;
my $subvar = var $subvarname;
if ($subvar)
{
# Replace the reference by its value, and reschedule
# for expansion.
foreach my $c ($subvar->conditions->conds)
{
if (ref $cond_filter)
{
# Ignore conditions that don't match $cond_filter.
next if ! $c->true_when ($cond_filter);
# If we found out several definitions of $var
# match $cond_filter then we are in trouble.
# Tell the user we don't support this.
$subvar->check_defined_unconditionally ($var,
$full_cond)
if $cond_once;
$cond_once = 1;
}
my $subval = $subvar->rdef ($c)->value;
$val =~ s/\$\{$subvarname\}/$subval/g;
$val =~ s/\$\($subvarname\)/$subval/g;
unshift @to_process, split (' ', $val);
}
next;
}
# We do not know any variable with this name. Fall through
# to filename processing.
}
elsif ($skip_ac_subst && $val =~ /^\@.+\@$/)
{
next;
}
if ($fun_item) # $var is a filename we must process
{
my $substnum=$#_substfroms;
while ($substnum >= 0)
{
$val =~ s/$_substfroms[$substnum]$/$_substtos[$substnum]/
if defined $_substfroms[$substnum];
$substnum -= 1;
}
# Make sure you update the doc of
# Automake::Variable::traverse_recursively
# if you change the prototype of &fun_item.
my @transformed = &$fun_item ($var, $val, $cond, $full_cond);
push (@result, @transformed);
}
}
push (@allresults, [$cond, @result]) if @result;
}
# We only care about _recursive_ variable definitions. The user
# is free to use the same variable several times in the same definition.
$var->{'scanned'} = -1;
return ()
unless $fun_collect;
# Make sure you update the doc of Automake::Variable::traverse_recursively
# if you change the prototype of &fun_collect.
return &$fun_collect ($var, $parent_cond, @allresults);
}
# _hash_varname ($VAR)
# --------------------
# Compute the key associated $VAR in %_gen_varname.
# See _gen_varname() below.
sub _hash_varname ($)
{
my ($var) = @_;
my $key = '';
foreach my $cond ($var->conditions->conds)
{
my @values = $var->value_as_list ($cond);
$key .= "($cond)@values";
}
return $key;
}
# _hash_values (@VALUES)
# ----------------------
# Hash @VALUES for %_gen_varname. @VALUES should be a list
# of pairs: ([$cond, @values], [$cond, @values], ...).
# See _gen_varname() below.
sub _hash_values (@)
{
my $key = '';
foreach my $pair (@_)
{
my ($cond, @values) = @$pair;
$key .= "($cond)@values";
}
return $key;
}
# ($VARNAME, $GENERATED)
# _gen_varname ($BASE, @DEFINITIONS)
# ----------------------------------
# Return a variable name starting with $BASE, that will be
# used to store definitions @DEFINITIONS.
# @DEFINITIONS is a list of pair [$COND, @OBJECTS].
#
# If we already have a $BASE-variable containing @DEFINITIONS, reuse
# it and set $GENERATED to 0. Otherwise construct a new name and set
# $GENERATED to 1.
#
# This way, we avoid combinatorial explosion of the generated
# variables. Especially, in a Makefile such as:
#
# | if FOO1
# | A1=1
# | endif
# |
# | if FOO2
# | A2=2
# | endif
# |
# | ...
# |
# | if FOON
# | AN=N
# | endif
# |
# | B=$(A1) $(A2) ... $(AN)
# |
# | c_SOURCES=$(B)
# | d_SOURCES=$(B)
#
# The generated c_OBJECTS and d_OBJECTS will share the same variable
# definitions.
#
# This setup can be the case of a testsuite containing lots (>100) of
# small C programs, all testing the same set of source files.
sub _gen_varname ($@)
{
my $base = shift;
my $key = _hash_values @_;
return ($_gen_varname{$base}{$key}, 0)
if exists $_gen_varname{$base}{$key};
my $num = 1 + ($_gen_varname_n{$base} || 0);
$_gen_varname_n{$base} = $num;
my $name = "${base}_${num}";
$_gen_varname{$base}{$key} = $name;
return ($name, 1);
}
=item C<$resvar = transform_variable_recursively ($var, $resvar, $base, $nodefine, $where, &fun_item, [%options])>
=item C<$resvar = $var-E<gt>transform_variable_recursively ($resvar, $base, $nodefine, $where, &fun_item, [%options])>
Traverse C<$var> recursively, and create a C<$resvar> variable in
which each filename in C<$var> have been transformed using
C<&fun_item>. (C<$var> may be a variable name in the first syntax.
It must be an C<Automake::Variable> otherwise.)
Helper variables (corresponding to sub-variables of C<$var>) are
created as needed, using C<$base> as prefix.
Arguments are:
$var source variable to traverse
$resvar resulting variable to define
$base prefix to use when naming subvariables of $resvar
$nodefine if true, traverse $var but do not define any variable
(this assumes &fun_item has some useful side-effect)
$where context into which variable definitions are done
&fun_item a transformation function -- see the documentation
of &fun_item in Automake::Variable::traverse_recursively.
This returns the string C<"\$($RESVAR)">.
C<%options> is a list of options to pass to
C<Variable::traverse_recursively> (see this method).
=cut
sub transform_variable_recursively ($$$$$&;%)
{
my ($var, $resvar, $base, $nodefine, $where, $fun_item, %options) = @_;
$var = ref $var ? $var : rvar $var;
my $res = $var->traverse_recursively
($fun_item,
# The code that defines the variable holding the result
# of the recursive transformation of a subvariable.
sub {
my ($subvar, $parent_cond, @allresults) = @_;
# If no definition is required, return anything: the result is
# not expected to be used, only the side effect of $fun_item
# should matter.
return 'report-me' if $nodefine;
# Cache $subvar, so that we reuse it if @allresults is the same.
my $key = _hash_varname $subvar;
$_gen_varname{$base}{$key} = $subvar->name;
# Find a name for the variable, unless this is the top-variable
# for which we want to use $resvar.
my ($varname, $generated) =
($var != $subvar) ? _gen_varname ($base, @allresults) : ($resvar, 1);
# Define the variable if we are not reusing a previously
# defined variable. At the top-level, we can also avoid redefining
# the variable if it already contains the same values.
if ($generated
&& !($varname eq $var->name && $key eq _hash_values @allresults))
{
# If the new variable is the source variable, we assume
# we are trying to override a user variable. Delete
# the old variable first.
variable_delete ($varname) if $varname eq $var->name;
# Define an empty variable in condition TRUE if there is no
# result.
@allresults = ([TRUE, '']) unless @allresults;
# Define the rewritten variable in all conditions not
# already covered by user definitions.
foreach my $pair (@allresults)
{
my ($cond, @result) = @$pair;
my $var = var $varname;
my @conds = ($var
? $var->not_always_defined_in_cond ($cond)->conds
: $cond);
foreach (@conds)
{
define ($varname, VAR_AUTOMAKE, '', $_, "@result",
'', $where, VAR_PRETTY);
}
}
}
set_seen $varname;
return "\$($varname)";
},
%options);
return $res;
}
=back
=head1 SEE ALSO
L<Automake::VarDef>, L<Automake::Condition>,
L<Automake::DisjConditions>, L<Automake::Location>.
=cut
1;
PK (��\�S6� Automake/Version.pmnu �[��� # Copyright (C) 2001-2018 Free Software Foundation, Inc.
# 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
package Automake::Version;
use 5.006;
use strict;
use Automake::ChannelDefs;
=head1 NAME
Automake::Version - version comparison
=head1 SYNOPSIS
use Automake::Version;
print "Version $version is older than required version $required\n"
if Automake::Version::check ($version, $required);
=head1 DESCRIPTION
This module provides support for comparing versions string
as they are used in Automake.
A version is a string that looks like
C<MAJOR.MINOR[.MICRO][ALPHA][-FORK]> where C<MAJOR>, C<MINOR>, and
C<MICRO> are digits, C<ALPHA> is a character, and C<FORK> any
alphanumeric word.
Usually, C<ALPHA> is used to label alpha releases or intermediate
snapshots, C<FORK> is used for git branches or patched releases, and
C<MICRO> is used for bug fixes releases on the C<MAJOR.MINOR> branch.
For the purpose of ordering, C<1.4> is the same as C<1.4.0>, but
C<1.4g> is the same as C<1.4.99g>. The C<FORK> identifier is ignored
in the ordering, except when it looks like C<-pMINOR[ALPHA]>: some
versions were labeled like C<1.4-p3a>, this is the same as an alpha
release labeled C<1.4.3a>. Yes, it's horrible, but Automake did not
support two-dot versions in the past.
=head2 FUNCTIONS
=over 4
=item C<split ($version)>
Split the string C<$version> into the corresponding C<(MAJOR, MINOR,
MICRO, ALPHA, FORK)> tuple. For instance C<'1.4g'> would be split
into C<(1, 4, 99, 'g', '')>. Return C<()> on error.
=cut
sub split ($)
{
my ($ver) = @_;
# Special case for versions like 1.4-p2a.
if ($ver =~ /^(\d+)\.(\d+)(?:-p(\d+)([a-z]+)?)$/)
{
return ($1, $2, $3, $4 || '', '');
}
# Common case.
elsif ($ver =~ /^(\d+)\.(\d+)(?:\.(\d+))?([a-z])?(?:-([A-Za-z0-9]+))?$/)
{
return ($1, $2, $3 || (defined $4 ? 99 : 0), $4 || '', $5 || '');
}
return ();
}
=item C<compare (\@LVERSION, \@RVERSION)>
Compare two version tuples, as returned by C<split>.
Return 1, 0, or -1, if C<LVERSION> is found to be respectively
greater than, equal to, or less than C<RVERSION>.
=cut
sub compare (\@\@)
{
my @l = @{$_[0]};
my @r = @{$_[1]};
for my $i (0, 1, 2)
{
return 1 if ($l[$i] > $r[$i]);
return -1 if ($l[$i] < $r[$i]);
}
for my $i (3, 4)
{
return 1 if ($l[$i] gt $r[$i]);
return -1 if ($l[$i] lt $r[$i]);
}
return 0;
}
=item C<check($VERSION, $REQUIRED)>
Handles the logic of requiring a version number in Automake.
C<$VERSION> should be Automake's version, while C<$REQUIRED>
is the version required by the user input.
Return 0 if the required version is satisfied, 1 otherwise.
=cut
sub check ($$)
{
my ($version, $required) = @_;
my @version = Automake::Version::split ($version);
my @required = Automake::Version::split ($required);
prog_error "version is incorrect: $version"
if $#version == -1;
# This should not happen, because process_option_list and split_version
# use similar regexes.
prog_error "required version is incorrect: $required"
if $#required == -1;
# If we require 3.4n-foo then we require something
# >= 3.4n, with the 'foo' fork identifier.
return 1
if ($required[4] ne '' && $required[4] ne $version[4]);
return 0 > compare (@version, @required);
}
1;
PK (��\g
�h� � Automake/Wrap.pmnu �[��� # Copyright (C) 2003-2018 Free Software Foundation, Inc.
# 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
package Automake::Wrap;
use 5.006;
use strict;
require Exporter;
use vars '@ISA', '@EXPORT_OK';
@ISA = qw/Exporter/;
@EXPORT_OK = qw/wrap makefile_wrap/;
=head1 NAME
Automake::Wrap - a paragraph formatter
=head1 SYNOPSIS
use Automake::Wrap 'wrap', 'makefile_wrap';
print wrap ($first_ident, $next_ident, $end_of_line, $max_length,
@values);
print makefile_wrap ("VARIABLE = ", " ", @values);
=head1 DESCRIPTION
This modules provide facility to format list of strings. It is
comparable to Perl's L<Text::Wrap>, however we can't use L<Text::Wrap>
because some versions will abort when some word to print exceeds the
maximum length allowed. (Ticket #17141, fixed in Perl 5.8.0.)
=head2 Functions
=over 4
=cut
# _tab_length ($TXT)
# ------------------
# Compute the length of TXT, counting tab characters as 8 characters.
sub _tab_length($)
{
my ($txt) = @_;
my $len = length ($txt);
$len += 7 * ($txt =~ tr/\t/\t/);
return $len;
}
=item C<wrap ($head, $fill, $eol, $max_len, @values)>
Format C<@values> as a block of text that starts with C<$head>,
followed by the strings in C<@values> separated by spaces or by
C<"$eol\n$fill"> so that the length of each line never exceeds
C<$max_len>.
The C<$max_len> constraint is ignored for C<@values> items which
are too big to fit alone one a line.
The constructed paragraph is C<"\n">-terminated.
=cut
sub wrap($$$$@)
{
my ($head, $fill, $eol, $max_len, @values) = @_;
my $result = $head;
my $column = _tab_length ($head);
my $fill_len = _tab_length ($fill);
my $eol_len = _tab_length ($eol);
my $not_first_word = 0;
foreach (@values)
{
my $len = _tab_length ($_);
# See if the new variable fits on this line.
# (The + 1 is for the space we add in front of the value.).
if ($column + $len + $eol_len + 1 > $max_len
# Do not break before the first word if it does not fit on
# the next line anyway.
&& ($not_first_word || $fill_len + $len + $eol_len + 1 <= $max_len))
{
# Start a new line.
$result .= "$eol\n" . $fill;
$column = $fill_len;
}
elsif ($not_first_word)
{
# Add a space only if result does not already end
# with a space.
$_ = " $_" if $result =~ /\S\z/;
++$len;
}
$result .= $_;
$column += $len;
$not_first_word = 1;
}
$result .= "\n";
return $result;
}
=item C<makefile_wrap ($head, $fill, @values)>
Format C<@values> in a way which is suitable for F<Makefile>s.
This is comparable to C<wrap>, except C<$eol> is known to
be C<" \\">, and the maximum length has been hardcoded to C<72>.
A space is appended to C<$head> when this is not already
the case.
This can be used to format variable definitions or dependency lines.
makefile_wrap ('VARIABLE =', "\t", @values);
makefile_wrap ('rule:', "\t", @dependencies);
=cut
sub makefile_wrap ($$@)
{
my ($head, $fill, @values) = @_;
if (@values)
{
$head .= ' ' if $head =~ /\S\z/;
return wrap $head, $fill, " \\", 72, @values;
}
return "$head\n";
}
1;
PK (��\�S�=' ' Automake/XFile.pmnu �[��� # Copyright (C) 2001-2018 Free Software Foundation, Inc.
# 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# Written by Akim Demaille <akim@freefriends.org>.
###############################################################
# The main copy of this file is in Automake's git repository. #
# Updates should be sent to automake-patches@gnu.org. #
###############################################################
package Automake::XFile;
=head1 NAME
Automake::XFile - supply object methods for filehandles with error handling
=head1 SYNOPSIS
use Automake::XFile;
$fh = new Automake::XFile;
$fh->open ("file", "<");
# No need to check $FH: we died if open failed.
print <$fh>;
$fh->close;
# No need to check the return value of close: we died if it failed.
$fh = new Automake::XFile "file", ">";
# No need to check $FH: we died if new failed.
print $fh "bar\n";
$fh->close;
$fh = new Automake::XFile "file", "r";
# No need to check $FH: we died if new failed.
defined $fh
print <$fh>;
undef $fh; # automatically closes the file and checks for errors.
$fh = new Automake::XFile "file", O_WRONLY | O_APPEND;
# No need to check $FH: we died if new failed.
print $fh "corge\n";
$pos = $fh->getpos;
$fh->setpos ($pos);
undef $fh; # automatically closes the file and checks for errors.
autoflush STDOUT 1;
=head1 DESCRIPTION
C<Automake::XFile> inherits from C<IO::File>. It provides the method
C<name> returning the file name. It provides dying versions of the
methods C<close>, C<lock> (corresponding to C<flock>), C<new>,
C<open>, C<seek>, and C<truncate>. It also overrides the C<getline>
and C<getlines> methods to translate C<\r\n> to C<\n>.
=cut
use 5.006;
use strict;
use vars qw($VERSION @EXPORT @EXPORT_OK $AUTOLOAD @ISA);
use Carp;
use Errno;
use IO::File;
use File::Basename;
use Automake::ChannelDefs;
use Automake::Channels qw(msg);
use Automake::FileUtils;
require Exporter;
require DynaLoader;
@ISA = qw(IO::File Exporter DynaLoader);
$VERSION = "1.2";
@EXPORT = @IO::File::EXPORT;
eval {
# Make all Fcntl O_XXX and LOCK_XXX constants available for importing
require Fcntl;
my @O = grep /^(LOCK|O)_/, @Fcntl::EXPORT, @Fcntl::EXPORT_OK;
Fcntl->import (@O); # first we import what we want to export
push (@EXPORT, @O);
};
=head2 Methods
=over
=item C<$fh = new Automake::XFile ([$expr, ...]>
Constructor a new XFile object. Additional arguments
are passed to C<open>, if any.
=cut
sub new
{
my $type = shift;
my $class = ref $type || $type || "Automake::XFile";
my $fh = $class->SUPER::new ();
if (@_)
{
$fh->open (@_);
}
$fh;
}
=item C<$fh-E<gt>open ([$file, ...])>
Open a file, passing C<$file> and further arguments to C<IO::File::open>.
Die if opening fails. Store the name of the file. Use binmode for writing.
=cut
sub open
{
my $fh = shift;
my ($file, $mode) = @_;
# WARNING: Gross hack: $FH is a typeglob: use its hash slot to store
# the 'name' of the file we are opening. See the example with
# io_socket_timeout in IO::Socket for more, and read Graham's
# comment in IO::Handle.
${*$fh}{'autom4te_xfile_file'} = "$file";
if (!$fh->SUPER::open (@_))
{
fatal "cannot open $file: $!";
}
# In case we're running under MSWindows, don't write with CRLF.
# (This circumvents a bug in at least Cygwin bash where the shell
# parsing fails on lines ending with the continuation character '\'
# and CRLF).
# Correctly recognize usages like:
# - open ($file, "w")
# - open ($file, "+<")
# - open (" >$file")
binmode $fh
if (defined $mode && $mode =~ /^[+>wa]/ or $file =~ /^\s*>/);
}
=item C<$fh-E<gt>close>
Close the file, handling errors.
=cut
sub close
{
my $fh = shift;
if (!$fh->SUPER::close (@_))
{
my $file = $fh->name;
Automake::FileUtils::handle_exec_errors $file
unless $!;
fatal "cannot close $file: $!";
}
}
=item C<$line = $fh-E<gt>getline>
Read and return a line from the file. Ensure C<\r\n> is translated to
C<\n> on input files.
=cut
# Some native Windows/perl installations fail to translate \r\n to \n on
# input so we do that here.
sub getline
{
local $_ = $_[0]->SUPER::getline;
# Perform a _global_ replacement: $_ may can contains many lines
# in slurp mode ($/ = undef).
s/\015\012/\n/gs if defined $_;
return $_;
}
=item C<@lines = $fh-E<gt>getlines>
Slurp lines from the files.
=cut
sub getlines
{
my @res = ();
my $line;
push @res, $line while $line = $_[0]->getline;
return @res;
}
=item C<$name = $fh-E<gt>name>
Return the name of the file.
=cut
sub name
{
my $fh = shift;
return ${*$fh}{'autom4te_xfile_file'};
}
=item C<$fh-E<gt>lock>
Lock the file using C<flock>. If locking fails for reasons other than
C<flock> being unsupported, then error out if C<$ENV{'MAKEFLAGS'}> indicates
that we are spawned from a parallel C<make>.
=cut
sub lock
{
my ($fh, $mode) = @_;
# Cannot use @_ here.
# Unless explicitly configured otherwise, Perl implements its 'flock' with the
# first of flock(2), fcntl(2), or lockf(3) that works. These can fail on
# NFS-backed files, with ENOLCK (GNU/Linux) or EOPNOTSUPP (FreeBSD); we
# usually ignore these errors. If $ENV{MAKEFLAGS} suggests that a parallel
# invocation of 'make' has invoked the tool we serve, report all locking
# failures and abort.
#
# On Unicos, flock(2) and fcntl(2) over NFS hang indefinitely when 'lockd' is
# not running. NetBSD NFS clients silently grant all locks. We do not
# attempt to defend against these dangers.
#
# -j is for parallel BSD make, -P is for parallel HP-UX make.
if (!flock ($fh, $mode))
{
my $make_j = (exists $ENV{'MAKEFLAGS'}
&& " -$ENV{'MAKEFLAGS'}" =~ / (-[BdeikrRsSw]*[jP]|--[jP]|---?jobs)/);
my $note = "\nforgo \"make -j\" or use a file system that supports locks";
my $file = $fh->name;
msg ($make_j ? 'fatal' : 'unsupported',
"cannot lock $file with mode $mode: $!" . ($make_j ? $note : ""))
if $make_j || !($!{ENOLCK} || $!{EOPNOTSUPP});
}
}
=item C<$fh-E<gt>seek ($position, [$whence])>
Seek file to C<$position>. Die if seeking fails.
=cut
sub seek
{
my $fh = shift;
# Cannot use @_ here.
if (!seek ($fh, $_[0], $_[1]))
{
my $file = $fh->name;
fatal "cannot rewind $file with @_: $!";
}
}
=item C<$fh-E<gt>truncate ($len)>
Truncate the file to length C<$len>. Die on failure.
=cut
sub truncate
{
my ($fh, $len) = @_;
if (!truncate ($fh, $len))
{
my $file = $fh->name;
fatal "cannot truncate $file at $len: $!";
}
}
=back
=head1 SEE ALSO
L<perlfunc>,
L<perlop/"I/O Operators">,
L<IO::File>
L<IO::Handle>
L<IO::Seekable>
=head1 HISTORY
Derived from IO::File.pm by Akim Demaille E<lt>F<akim@freefriends.org>E<gt>.
=cut
1;
PK (��\�� ��V �V am/check.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 2001-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
am__tty_colors_dummy = \
mgn= red= grn= lgn= blu= brg= std=; \
am__color_tests=no
am__tty_colors = { \
$(am__tty_colors_dummy); \
if test "X$(AM_COLOR_TESTS)" = Xno; then \
am__color_tests=no; \
elif test "X$(AM_COLOR_TESTS)" = Xalways; then \
am__color_tests=yes; \
## If stdout is a non-dumb tty, use colors. If test -t is not supported,
## then this check fails; a conservative approach. Of course do not
## redirect stdout here, just stderr.
elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \
am__color_tests=yes; \
fi; \
if test $$am__color_tests = yes; then \
red='[0;31m'; \
grn='[0;32m'; \
lgn='[1;32m'; \
blu='[1;34m'; \
mgn='[0;35m'; \
brg='[1m'; \
std='[m'; \
fi; \
}
.PHONY: check-TESTS
if !%?SERIAL_TESTS%
include inst-vars.am
## New parallel test driver.
##
## The first version of the code here was adapted from check.mk, which was
## originally written at EPITA/LRDE, further developed at Gostai, then made
## its way from GNU coreutils to end up, largely rewritten, in Automake.
## The current version is an heavy rewrite of that, to allow for support
## of more test metadata, and the use of custom test drivers and protocols
## (among them, TAP).
am__recheck_rx = ^[ ]*:recheck:[ ]*
am__global_test_result_rx = ^[ ]*:global-test-result:[ ]*
am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]*
# A command that, given a newline-separated list of test names on the
# standard input, print the name of the tests that are to be re-run
# upon "make recheck".
am__list_recheck_tests = $(AWK) '{ \
## By default, we assume the test is to be re-run.
recheck = 1; \
while ((rc = (getline line < ($$0 ".trs"))) != 0) \
{ \
if (rc < 0) \
{ \
## If we've encountered an I/O error here, there are three possibilities:
##
## [1] The '.log' file exists, but the '.trs' does not; in this case,
## we "gracefully" recover by assuming the corresponding test is
## to be re-run (which will re-create the missing '.trs' file).
##
## [2] Both the '.log' and '.trs' files are missing; this means that
## the corresponding test has not been run, and is thus *not* to
## be re-run.
##
## [3] We have encountered some corner-case problem (e.g., a '.log' or
## '.trs' files somehow made unreadable, or issues with a bad NFS
## connection, or whatever); we don't handle such corner cases.
##
if ((getline line2 < ($$0 ".log")) < 0) \
recheck = 0; \
break; \
} \
else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \
## A directive explicitly specifying the test is *not* to be re-run.
{ \
recheck = 0; \
break; \
} \
else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \
{ \
## A directive explicitly specifying the test *is* to be re-run.
break; \
} \
## else continue with the next iteration.
}; \
if (recheck) \
print $$0; \
## Don't leak open file descriptors, as this could cause serious
## problems when there are many tests (yes, even on Linux).
close ($$0 ".trs"); \
close ($$0 ".log"); \
}'
# A command that, given a newline-separated list of test names on the
# standard input, create the global log from their .trs and .log files.
am__create_global_log = $(AWK) ' \
function fatal(msg) \
{ \
print "fatal: making $@: " msg | "cat >&2"; \
exit 1; \
} \
function rst_section(header) \
{ \
print header; \
len = length(header); \
for (i = 1; i <= len; i = i + 1) \
printf "="; \
printf "\n\n"; \
} \
{ \
## By default, we assume the test log is to be copied in the global log,
## and that its result is simply "RUN" (i.e., we still don't know what
## it outcome was, but we know that at least it has run).
copy_in_global_log = 1; \
global_test_result = "RUN"; \
while ((rc = (getline line < ($$0 ".trs"))) != 0) \
{ \
if (rc < 0) \
fatal("failed to read from " $$0 ".trs"); \
if (line ~ /$(am__global_test_result_rx)/) \
{ \
sub("$(am__global_test_result_rx)", "", line); \
sub("[ ]*$$", "", line); \
global_test_result = line; \
} \
else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \
copy_in_global_log = 0; \
}; \
if (copy_in_global_log) \
{ \
rst_section(global_test_result ": " $$0); \
while ((rc = (getline line < ($$0 ".log"))) != 0) \
{ \
if (rc < 0) \
fatal("failed to read from " $$0 ".log"); \
print line; \
}; \
printf "\n"; \
}; \
## Don't leak open file descriptors, as this could cause serious
## problems when there are many tests (yes, even on Linux).
close ($$0 ".trs"); \
close ($$0 ".log"); \
}'
# Restructured Text title.
am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; }
# Solaris 10 'make', and several other traditional 'make' implementations,
# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it
# by disabling -e (using the XSI extension "set +e") if it's set.
am__sh_e_setup = case $$- in *e*) set +e;; esac
# Default flags passed to test drivers.
am__common_driver_flags = \
--color-tests "$$am__color_tests" \
--enable-hard-errors "$$am__enable_hard_errors" \
--expect-failure "$$am__expect_failure"
# To be inserted before the command running the test. Creates the
# directory for the log if needed. Stores in $dir the directory
# containing $f, in $tst the test, in $log the log. Executes the
# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and
# passes TESTS_ENVIRONMENT. Set up options for the wrapper that
# will run the test scripts (or their associated LOG_COMPILER, if
# thy have one).
am__check_pre = \
$(am__sh_e_setup); \
$(am__vpath_adj_setup) $(am__vpath_adj) \
$(am__tty_colors); \
srcdir=$(srcdir); export srcdir; \
case "$@" in \
*/*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \
*) am__odir=.;; \
esac; \
test "x$$am__odir" = x"." || test -d "$$am__odir" \
|| $(MKDIR_P) "$$am__odir" || exit $$?; \
if test -f "./$$f"; then dir=./; \
elif test -f "$$f"; then dir=; \
else dir="$(srcdir)/"; fi; \
tst=$$dir$$f; log='$@'; \
if test -n '$(DISABLE_HARD_ERRORS)'; then \
am__enable_hard_errors=no; \
else \
am__enable_hard_errors=yes; \
fi; \
## The use of $dir below is required to account for VPATH
## rewriting done by Sun make.
case " $(XFAIL_TESTS) " in \
*[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
am__expect_failure=yes;; \
*) \
am__expect_failure=no;; \
esac; \
$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT)
# A shell command to get the names of the tests scripts with any registered
# extension removed (i.e., equivalently, the names of the test logs, with
# the '.log' extension removed). The result is saved in the shell variable
# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly,
# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)",
# since that might cause problem with VPATH rewrites for suffix-less tests.
# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'.
am__set_TESTS_bases = \
bases='$(TEST_LOGS)'; \
bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
## Trim away any extra whitespace. This has already proved useful
## in avoiding weird bug on lesser make implementations. It also
## works around the GNU make 3.80 bug where trailing whitespace in
## "TESTS = foo.test $(empty)" causes $(TESTS_LOGS) to erroneously
## expand to "foo.log .log".
bases=`echo $$bases`
# Recover from deleted '.trs' file; this should ensure that
# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create
# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells
# to avoid problems with "make -n".
.log.trs:
rm -f $< $@
$(MAKE) $(AM_MAKEFLAGS) $<
# Leading 'am--fnord' is there to ensure the list of targets does not
# expand to empty, as could happen e.g. with make check TESTS=''.
am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck)
am--force-recheck:
@:
$(TEST_SUITE_LOG): $(TEST_LOGS)
@$(am__set_TESTS_bases); \
## Helper shell function, tells whether a path refers to an existing,
## regular, readable file.
am__f_ok () { test -f "$$1" && test -r "$$1"; }; \
## We need to ensures that all the required '.trs' and '.log' files will
## be present and readable. The direct dependencies of $(TEST_SUITE_LOG)
## only ensure that all the '.log' files exists; they don't ensure that
## the '.log' files are readable, and worse, they don't ensure that the
## '.trs' files even exist.
redo_bases=`for i in $$bases; do \
am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \
done`; \
if test -n "$$redo_bases"; then \
## Uh-oh, either some '.log' files were unreadable, or some '.trs' files
## were missing (or unreadable). We need to re-run the corresponding
## tests in order to re-create them.
redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \
redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \
if $(am__make_dryrun); then :; else \
## Break "rm -f" into two calls to minimize the possibility of exceeding
## command line length limits.
rm -f $$redo_logs && rm -f $$redo_results || exit 1; \
fi; \
fi; \
## Use a trick to to ensure that we don't go into an infinite recursion
## in case a test log in $(TEST_LOGS) is the same as $(TEST_SUITE_LOG).
## Yes, this has already happened in practice. Sigh!
if test -n "$$am__remaking_logs"; then \
echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \
"recursion detected" >&2; \
## Invoking this unconditionally could cause a useless "make all" to
## be invoked when '$redo_logs' expands to empty (automake bug#16302).
elif test -n "$$redo_logs"; then \
am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \
fi; \
if $(am__make_dryrun); then :; else \
## Sanity check: each unreadable or non-existent test result file should
## has been properly remade at this point, as should the corresponding log
## file.
st=0; \
errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \
for i in $$redo_bases; do \
test -f $$i.trs && test -r $$i.trs \
|| { echo "$$errmsg $$i.trs" >&2; st=1; }; \
test -f $$i.log && test -r $$i.log \
|| { echo "$$errmsg $$i.log" >&2; st=1; }; \
done; \
test $$st -eq 0 || exit 1; \
fi
## We need a new subshell to work portably with "make -n", since the
## previous part of the recipe contained a $(MAKE) invocation.
@$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \
ws='[ ]'; \
## List of test result files.
results=`for b in $$bases; do echo $$b.trs; done`; \
test -n "$$results" || results=/dev/null; \
## Prepare data for the test suite summary. These do not take into account
## unreadable test results, but they'll be appropriately updated later if
## needed.
all=` grep "^$$ws*:test-result:" $$results | wc -l`; \
pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \
fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \
skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \
xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \
xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \
error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \
## Whether the testsuite was successful or not.
if test `expr $$fail + $$xpass + $$error` -eq 0; then \
success=true; \
else \
success=false; \
fi; \
## Make $br a line of exactly 76 '=' characters, that will be used to
## enclose the testsuite summary report when displayed on the console.
br='==================='; br=$$br$$br$$br$$br; \
## When writing the test summary to the console, we want to color a line
## reporting the count of some result *only* if at least one test
## experienced such a result. This function is handy in this regard.
result_count () \
{ \
if test x"$$1" = x"--maybe-color"; then \
maybe_colorize=yes; \
elif test x"$$1" = x"--no-color"; then \
maybe_colorize=no; \
else \
echo "$@: invalid 'result_count' usage" >&2; exit 4; \
fi; \
shift; \
desc=$$1 count=$$2; \
if test $$maybe_colorize = yes && test $$count -gt 0; then \
color_start=$$3 color_end=$$std; \
else \
color_start= color_end=; \
fi; \
echo "$${color_start}# $$desc $$count$${color_end}"; \
}; \
## A shell function that creates the testsuite summary. We need it
## because we have to create *two* summaries, one for test-suite.log,
## and a possibly-colorized one for console output.
create_testsuite_report () \
{ \
result_count $$1 "TOTAL:" $$all "$$brg"; \
result_count $$1 "PASS: " $$pass "$$grn"; \
result_count $$1 "SKIP: " $$skip "$$blu"; \
result_count $$1 "XFAIL:" $$xfail "$$lgn"; \
result_count $$1 "FAIL: " $$fail "$$red"; \
result_count $$1 "XPASS:" $$xpass "$$red"; \
result_count $$1 "ERROR:" $$error "$$mgn"; \
}; \
## Write "global" testsuite log.
{ \
echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
$(am__rst_title); \
create_testsuite_report --no-color; \
echo; \
echo ".. contents:: :depth: 2"; \
echo; \
for b in $$bases; do echo $$b; done \
| $(am__create_global_log); \
} >$(TEST_SUITE_LOG).tmp || exit 1; \
mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
## Emit the test summary on the console.
if $$success; then \
col="$$grn"; \
else \
col="$$red"; \
test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \
fi; \
## Multi line coloring is problematic with "less -R", so we really need
## to color each line individually.
echo "$${col}$$br$${std}"; \
echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \
echo "$${col}$$br$${std}"; \
## This is expected to go to the console, so it might have to be colorized.
create_testsuite_report --maybe-color; \
echo "$$col$$br$$std"; \
if $$success; then :; else \
echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \
if test -n "$(PACKAGE_BUGREPORT)"; then \
echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \
fi; \
echo "$$col$$br$$std"; \
fi; \
## Be sure to exit with the proper exit status. The use of "exit 1" below
## is required to work around a FreeBSD make bug (present only when running
## in concurrent mode). See automake bug#9245:
## <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=9245>
## and FreeBSD PR bin/159730:
## <http://www.freebsd.org/cgi/query-pr.cgi?pr=159730>.
$$success || exit 1
RECHECK_LOGS = $(TEST_LOGS)
## ------------------------------------------ ##
## Running all tests, or rechecking failures. ##
## ------------------------------------------ ##
check-TESTS: %CHECK_DEPS%
@list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
@list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list
## We always have to remove $(TEST_SUITE_LOG), to ensure its rule is run
## in any case even in lazy mode: otherwise, if no test needs rerunning,
## or a prior run plus reruns all happen within the same timestamp (can
## happen with a prior "make TESTS=<subset>"), then we get no log output.
## OTOH, this means that, in the rule for '$(TEST_SUITE_LOG)', we
## cannot use '$?' to compute the set of lazily rerun tests, lest
## we rely on .PHONY to work portably.
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
@set +e; $(am__set_TESTS_bases); \
log_list=`for i in $$bases; do echo $$i.log; done`; \
trs_list=`for i in $$bases; do echo $$i.trs; done`; \
## Remove newlines and normalize whitespace. Trailing (and possibly
## leading) whitespace is known to cause segmentation faults on
## Solaris 10 XPG4 make.
log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \
$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \
## Be sure to exit with the proper exit status (automake bug#9245). See
## comments in the recipe of $(TEST_SUITE_LOG) above for more information.
exit $$?;
## Recheck must depend on $(check_SCRIPTS), $(check_PROGRAMS), etc.
## It must also depend on the 'all' target. See automake bug#11252.
recheck: all %CHECK_DEPS%
## See comments above in the check-TESTS recipe for why remove
## $(TEST_SUITE_LOG) here.
@test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
@set +e; $(am__set_TESTS_bases); \
## We must only consider tests that had an unexpected outcome (FAIL
## or XPASS) in the earlier run.
bases=`for i in $$bases; do echo $$i; done \
| $(am__list_recheck_tests)` || exit 1; \
log_list=`for i in $$bases; do echo $$i.log; done`; \
## Remove newlines and normalize whitespace. Trailing (and possibly
## leading) whitespace is known to cause segmentation faults on
## Solaris 10 XPG4 make.
log_list=`echo $$log_list`; \
## Move the '.log' and '.trs' files associated with the tests to be
## re-run out of the way, so that those tests will be re-run by the
## "make test-suite.log" recursive invocation below.
## Two tricky requirements:
## - we must avoid extra files removal when running under "make -n";
## - in case the test is a compiled program whose compilation fails,
## we must ensure that any '.log' and '.trs' file referring to such
## test are preserved, so that future "make recheck" invocations
## will still try to re-compile and re-run it (automake bug#11791).
## The tricky recursive make invocation below should cater to such
## requirements.
$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \
am__force_recheck=am--force-recheck \
TEST_LOGS="$$log_list"; \
## Be sure to exit with the proper exit status (automake bug#9245). See
## comments in the recipe of $(TEST_SUITE_LOG) above for more information.
exit $$?
AM_RECURSIVE_TARGETS += check recheck
.PHONY: recheck
else %?SERIAL_TESTS%
## Obsolescent serial testsuite driver.
check-TESTS: $(TESTS)
@failed=0; all=0; xfail=0; xpass=0; skip=0; \
srcdir=$(srcdir); export srcdir; \
## Make sure Solaris VPATH-expands all members of this list, even
## the first and the last one; thus the spaces around $(TESTS)
list=' $(TESTS) '; \
$(am__tty_colors); \
if test -n "$$list"; then \
for tst in $$list; do \
if test -f ./$$tst; then dir=./; \
## Note: Solaris 2.7 seems to expand TESTS using VPATH. That's
## why we also try 'dir='.
elif test -f $$tst; then dir=; \
else dir="$(srcdir)/"; fi; \
if $(TESTS_ENVIRONMENT) $${dir}$$tst $(AM_TESTS_FD_REDIRECT); then \
## Success
all=`expr $$all + 1`; \
case " $(XFAIL_TESTS) " in \
*[\ \ ]$$tst[\ \ ]*) \
xpass=`expr $$xpass + 1`; \
failed=`expr $$failed + 1`; \
col=$$red; res=XPASS; \
;; \
*) \
col=$$grn; res=PASS; \
;; \
esac; \
elif test $$? -ne 77; then \
## Failure
all=`expr $$all + 1`; \
case " $(XFAIL_TESTS) " in \
*[\ \ ]$$tst[\ \ ]*) \
xfail=`expr $$xfail + 1`; \
col=$$lgn; res=XFAIL; \
;; \
*) \
failed=`expr $$failed + 1`; \
col=$$red; res=FAIL; \
;; \
esac; \
else \
## Skipped
skip=`expr $$skip + 1`; \
col=$$blu; res=SKIP; \
fi; \
echo "$${col}$$res$${std}: $$tst"; \
done; \
## Prepare the banner
if test "$$all" -eq 1; then \
tests="test"; \
All=""; \
else \
tests="tests"; \
All="All "; \
fi; \
if test "$$failed" -eq 0; then \
if test "$$xfail" -eq 0; then \
banner="$$All$$all $$tests passed"; \
else \
if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
fi; \
else \
if test "$$xpass" -eq 0; then \
banner="$$failed of $$all $$tests failed"; \
else \
if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
fi; \
fi; \
## DASHES should contain the largest line of the banner.
dashes="$$banner"; \
skipped=""; \
if test "$$skip" -ne 0; then \
if test "$$skip" -eq 1; then \
skipped="($$skip test was not run)"; \
else \
skipped="($$skip tests were not run)"; \
fi; \
test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
dashes="$$skipped"; \
fi; \
report=""; \
if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
report="Please report to $(PACKAGE_BUGREPORT)"; \
test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
dashes="$$report"; \
fi; \
dashes=`echo "$$dashes" | sed s/./=/g`; \
if test "$$failed" -eq 0; then \
col="$$grn"; \
else \
col="$$red"; \
fi; \
## Multi line coloring is problematic with "less -R", so we really need
## to color each line individually.
echo "$${col}$$dashes$${std}"; \
echo "$${col}$$banner$${std}"; \
test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
test -z "$$report" || echo "$${col}$$report$${std}"; \
echo "$${col}$$dashes$${std}"; \
test "$$failed" -eq 0; \
else :; fi
endif %?SERIAL_TESTS%
PK (��\jyJ�� � am/check2.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 2008-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
if %?FIRST%
## When BSD make is run in parallel mode, it apparently strips any
## leading directory component from the automatic variable '$*' (of
## course, against what POSIX mandates). Try to detect and work
## around this incompatibility.
am__set_b = \
case '$@' in \
*/*) \
case '$*' in \
*/*) b='$*';; \
*) b=`echo '$@' | sed 's/\.log$$//'`; \
esac;; \
*) \
b='$*';; \
esac
endif %?FIRST%
## From a test file to a .log and .trs file.
?GENERIC?%EXT%.log:
?!GENERIC?%OBJ%: %SOURCE%
@p='%SOURCE%'; \
## Another hack to support BSD make in parallel mode.
?!GENERIC? b='%BASE%'; \
?GENERIC? $(am__set_b); \
$(am__check_pre) %DRIVER% --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) %DRIVER_FLAGS% -- %COMPILE% \
"$$tst" $(AM_TESTS_FD_REDIRECT)
## If no programs are built in this package, then this rule is removed
## at automake time. Otherwise, %am__EXEEXT% expands to a configure time
## conditional, true if $(EXEEXT) is nonempty, thus this rule does not
## conflict with the previous one.
if %am__EXEEXT%
?GENERIC?%EXT%$(EXEEXT).log:
@p='%SOURCE%'; \
## Another hack to support BSD make in parallel mode.
?!GENERIC? b='%BASE%'; \
?GENERIC? $(am__set_b); \
$(am__check_pre) %DRIVER% --test-name "$$f" \
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) %DRIVER_FLAGS% -- %COMPILE% \
"$$tst" $(AM_TESTS_FD_REDIRECT)
endif %am__EXEEXT%
PK (��\s"��3 3 am/clean-hdr.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
.PHONY: distclean-hdr
distclean-am: distclean-hdr
distclean-hdr:
-rm -f %FILES%
PK (��\̫; am/clean.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
## We must test each macro because it might be empty, and an empty "rm
## -rf" command looks disturbing. Also, the Solaris 2.4 "rm" will
## return an error if there are no arguments other than "-f".
mostlyclean-am: mostlyclean-generic
mostlyclean-generic:
%MOSTLYCLEAN_RMS%
clean-am: clean-generic mostlyclean-am
clean-generic:
%CLEAN_RMS%
distclean-am: distclean-generic clean-am
distclean-generic:
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
%DISTCLEAN_RMS%
## Makefiles and their dependencies cannot be cleaned by
## an -am dependency, because that would prevent other distclean
## dependencies from calling make recursively. (The multilib
## cleaning rules do this.)
##
## If you change distclean here, you probably also want to change
## maintainer-clean below.
distclean:
-rm -f %MAKEFILE%
maintainer-clean-am: maintainer-clean-generic distclean-am
maintainer-clean-generic:
## FIXME: shouldn't we really print these messages before running
## the dependencies?
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
%MAINTAINER_CLEAN_RMS%
## See comment for distclean.
maintainer-clean:
-rm -f %MAKEFILE%
.PHONY: clean mostlyclean distclean maintainer-clean \
clean-generic mostlyclean-generic distclean-generic maintainer-clean-generic
?!SUBDIRS?clean: clean-am
?!SUBDIRS?distclean: distclean-am
?!SUBDIRS?mostlyclean: mostlyclean-am
?!SUBDIRS?maintainer-clean: maintainer-clean-am
PK (��\�N � �
am/compile.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
DEFAULT_INCLUDES = %DEFAULT_INCLUDES%
mostlyclean-am: mostlyclean-compile
mostlyclean-compile:
-rm -f *.$(OBJEXT)
?MOSTLYRMS?%MOSTLYRMS%
distclean-am: distclean-compile
distclean-compile:
-rm -f *.tab.c
?DISTRMS?%DISTRMS%
.PHONY: mostlyclean-compile distclean-compile
PK (��\)�� � am/configure.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 2001-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
## This dummy rule is called from subdirectories whenever one of the
## top-level Makefile's dependencies must be updated. It does depend
## on %MAKEFILE% for the benefit of non-GNU make implementations (GNU
## make will always make sure %MAKEFILE% is updated before considering
## the am--refresh target anyway).
if %?TOPDIR_P%
.PHONY: am--refresh
am--refresh: %MAKEFILE%
@:
endif %?TOPDIR_P%
## --------------------- ##
## Building Makefile.*. ##
## --------------------- ##
## This rule remakes the Makefile.in.
%MAKEFILE-IN%: %MAINTAINER-MODE% %MAKEFILE-AM% %MAKEFILE-IN-DEPS% $(am__configure_deps)
## If configure.ac or one of configure's dependencies has changed, all
## Makefile.in are to be updated; it is then more efficient to run
## automake on all the Makefiles at once. It also allow Automake to be
## run for newly added directories.
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
?TOPDIR_P? echo ' cd $(srcdir) && $(AUTOMAKE) %AUTOMAKE-OPTIONS%'; \
?TOPDIR_P? $(am__cd) $(srcdir) && $(AUTOMAKE) %AUTOMAKE-OPTIONS% \
?TOPDIR_P? && exit 0; \
?!TOPDIR_P? ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
## If on the other hand, subdir/Makefile.in has been removed, then toplevel
## am--refresh will not be aware of any need to run. We still invoke it
## due to $? listing all prerequisites. Fix up for it by running the rebuild
## rule for this file only, below.
?!TOPDIR_P? && { if test -f $@; then exit 0; else break; fi; }; \
exit 1;; \
esac; \
done; \
## Otherwise, rebuild only this file.
echo ' cd $(top_srcdir) && $(AUTOMAKE) %AUTOMAKE-OPTIONS% %MAKEFILE-AM-SOURCES%'; \
$(am__cd) $(top_srcdir) && \
$(AUTOMAKE) %AUTOMAKE-OPTIONS% %MAKEFILE-AM-SOURCES%
## Ensure that GNU make doesn't remove Makefile if ./config.status (below)
## is interrupted. Otherwise, the user would need to know to rerun
## ./config.status to recreate the lost Makefile.
.PRECIOUS: %MAKEFILE%
## This rule remakes the Makefile.
%MAKEFILE%: %MAKEFILE-DEPS% $(top_builddir)/config.status
## If Makefile is to be updated because of config.status, then run
## config.status without argument in order to (i) rerun all the
## AC_CONFIG_COMMANDS including those that are not visible to
## Automake, and (ii) to save time by running config.status all with
## all the files, instead of once per file (iii) generate Makefiles
## in newly added directories.
@case '$?' in \
## Don't prefix $(top_builddir), because GNU make will strip it out
## when it's '.'.
*config.status*) \
?TOPDIR_P? echo ' $(SHELL) ./config.status'; \
?TOPDIR_P? $(SHELL) ./config.status;; \
?!TOPDIR_P? cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
*) \
## FIXME: $(am__maybe_remake_depfiles) lets us re-run the rule to create the
## .P files. Ideally we wouldn't have to do this by hand.
echo ' cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__maybe_remake_depfiles)'; \
cd $(top_builddir) && $(SHELL) ./config.status %CONFIG-MAKEFILE% $(am__maybe_remake_depfiles);; \
esac;
## Avoid the "deleted header file" problem for the dependencies.
## Add the trailing "$(am__empty)" to trick Automake into not spuriously
## complaining about "duplicated targets" in case the %MAKEFILE-IN-DEPS%
## list expands to a single target that is also declared in some
## user-defined rule.
?HAVE-MAKEFILE-IN-DEPS?%MAKEFILE-IN-DEPS% $(am__empty):
DIST_COMMON += %MAKEFILE-AM%
## --------------------------- ##
## config.status & configure. ##
## --------------------------- ##
if %?TOPDIR_P%
## Always require configure.ac and configure at top level, even if they
## don't exist. This is especially important for configure, since it
## won't be created until autoconf is run -- which might be after
## automake is run.
DIST_COMMON += $(top_srcdir)/configure $(am__configure_deps)
endif %?TOPDIR_P%
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
?TOPDIR_P? $(SHELL) ./config.status --recheck
?!TOPDIR_P? cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(top_srcdir)/configure: %MAINTAINER-MODE% $(am__configure_deps)
?TOPDIR_P? $(am__cd) $(srcdir) && $(AUTOCONF)
?!TOPDIR_P? cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
## ------------ ##
## aclocal.m4. ##
## ------------ ##
## Whenever a configure dependency changes we need to rebuild
## aclocal.m4 too. Changing configure.ac, or any file included by
## aclocal.m4 might require adding more files to aclocal.m4. Hence
## the $(am__configure_deps) dependency.
## We still need $(ACLOCAL_AMFLAGS) for sake of backward-compatibility;
## we should hopefully be able to get rid of it in a not-so-distant
## future.
if %?REGEN-ACLOCAL-M4%
$(ACLOCAL_M4): %MAINTAINER-MODE% $(am__aclocal_m4_deps)
?TOPDIR_P? $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
?!TOPDIR_P? cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
## Avoid the "deleted header file" problem for the dependencies.
$(am__aclocal_m4_deps):
endif %?REGEN-ACLOCAL-M4%
## --------- ##
## cleanup. ##
## --------- ##
## We special-case config.status here. If we do it as part of the
## normal clean processing for this directory, then it might be
## removed before some subdir is cleaned. However, that subdir's
## Makefile depends on config.status.
if %?TOPDIR_P%
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
distclean:
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
## Note: you might think we should remove Makefile.in, configure, or
## aclocal.m4 here in a maintainer-clean rule. However, the GNU
## Coding Standards explicitly prohibit this.
maintainer-clean:
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
## autom4te.cache is created by Autoconf; the only valid target to
## remove it is maintainer-clean, not distclean.
## If you have an autom4te.cache that cause distcheck to fail, then
## it is good news: you finally discovered that autoconf and/or
## autoheader is needed to use your tarball, which is wrong.
-rm -rf $(top_srcdir)/autom4te.cache
endif %?TOPDIR_P%
PK (��\@ֽ�G
G
am/data.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
if %?INSTALL%
include inst-vars.am
endif %?INSTALL%
## ------------ ##
## Installing. ##
## ------------ ##
if %?INSTALL%
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
?EXEC?.PHONY install-exec-am: install-%DIR%%PRIMARY%
?!EXEC?.PHONY install-data-am: install-%DIR%%PRIMARY%
install-%DIR%%PRIMARY%: $(%DIR%_%PRIMARY%)
@$(NORMAL_INSTALL)
if %?BASE%
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
@list='$(%DIR%_%PRIMARY%)'; test -n "$(%NDIR%dir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
fi; \
for p in $$list; do \
## A file can be in the source directory or the build directory.
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
## If the _%PRIMARY% variable has an entry like foo/bar, install it as
## $(destdir)/bar, not $(destdir)/foo/bar. The user can make a
## new dir variable or use a nobase_ target for the latter case.
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_%ONE_PRIMARY%) $$files '$(DESTDIR)$(%NDIR%dir)'"; \
$(INSTALL_%ONE_PRIMARY%) $$files "$(DESTDIR)$(%NDIR%dir)" || exit $$?; \
done
else !%?BASE%
@list='$(%DIR%_%PRIMARY%)'; test -n "$(%NDIR%dir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
fi; \
$(am__nobase_list) | while read dir files; do \
xfiles=; for file in $$files; do \
if test -f "$$file"; then xfiles="$$xfiles $$file"; \
else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
test -z "$$xfiles" || { \
test "x$$dir" = x. || { \
echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
$(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir"; }; \
echo " $(INSTALL_%ONE_PRIMARY%) $$xfiles '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
$(INSTALL_%ONE_PRIMARY%) $$xfiles "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?; }; \
done
endif !%?BASE%
endif %?INSTALL%
## -------------- ##
## Uninstalling. ##
## -------------- ##
if %?INSTALL%
.PHONY uninstall-am: uninstall-%DIR%%PRIMARY%
uninstall-%DIR%%PRIMARY%:
@$(NORMAL_UNINSTALL)
@list='$(%DIR%_%PRIMARY%)'; test -n "$(%NDIR%dir)" || list=; \
?BASE? files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
?!BASE? $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
dir='$(DESTDIR)$(%NDIR%dir)'; $(am__uninstall_files_from_dir)
endif %?INSTALL%
## ---------- ##
## Cleaning. ##
## ---------- ##
## Nothing.
## -------------- ##
## Distributing. ##
## -------------- ##
if %?DIST%
DIST_COMMON += %DISTVAR%
endif %?DIST%
PK (��\�B-�T T
am/dejagnu.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
## Name of tool to use. Default is the same as the package.
DEJATOOL = $(PACKAGE)
## Default flags to pass to dejagnu. The user can override this.
RUNTESTDEFAULTFLAGS = --tool $$tool --srcdir $$srcdir
EXPECT = expect
RUNTEST = runtest
.PHONY: check-DEJAGNU
check-DEJAGNU: site.exp
## Life is easiest with an absolute srcdir, so do that.
srcdir='$(srcdir)'; export srcdir; \
EXPECT=$(EXPECT); export EXPECT; \
## If runtest can't be found, print a warning but don't die. It is
## pointless to cause a failure if the tests cannot be run at all.
if $(SHELL) -c "$(RUNTEST) --version" > /dev/null 2>&1; then \
exit_status=0; l='$(DEJATOOL)'; for tool in $$l; do \
if $(RUNTEST) $(RUNTESTDEFAULTFLAGS) $(AM_RUNTESTFLAGS) $(RUNTESTFLAGS); \
then :; else exit_status=1; fi; \
done; \
else echo "WARNING: could not find '$(RUNTEST)'" 1>&2; :;\
fi; \
exit $$exit_status
## ------------------- ##
## Building site.exp. ##
## ------------------- ##
## Note that in the rule we don't directly generate site.exp to avoid
## the possibility of a corrupted site.exp if make is interrupted.
## Jim Meyering has some useful text on this topic.
site.exp: Makefile $(EXTRA_DEJAGNU_SITE_CONFIG)
@echo 'Making a new site.exp file ...'
@echo '## these variables are automatically generated by make ##' >site.tmp
@echo '# Do not edit here. If you wish to override these values' >>site.tmp
@echo '# edit the last section' >>site.tmp
@echo 'set srcdir "$(srcdir)"' >>site.tmp
@echo "set objdir `pwd`" >>site.tmp
## Quote the *_alias variables because they might be empty.
?BUILD? @echo 'set build_alias "$(build_alias)"' >>site.tmp
?BUILD? @echo 'set build_triplet $(build_triplet)' >>site.tmp
?HOST? @echo 'set host_alias "$(host_alias)"' >>site.tmp
?HOST? @echo 'set host_triplet $(host_triplet)' >>site.tmp
?TARGET? @echo 'set target_alias "$(target_alias)"' >>site.tmp
?TARGET? @echo 'set target_triplet $(target_triplet)' >>site.tmp
## Allow the package author to extend site.exp.
@list='$(EXTRA_DEJAGNU_SITE_CONFIG)'; for f in $$list; do \
echo "## Begin content included from file $$f. Do not modify. ##" \
&& cat `test -f "$$f" || echo '$(srcdir)/'`$$f \
&& echo "## End content included from file $$f. ##" \
|| exit 1; \
done >> site.tmp
@echo "## End of auto-generated content; you can edit from here. ##" >> site.tmp
@if test -f site.exp; then \
sed -e '1,/^## End of auto-generated content.*##/d' site.exp >> site.tmp; \
fi
@-rm -f site.bak
@test ! -f site.exp || mv site.exp site.bak
@mv site.tmp site.exp
## ---------- ##
## Cleaning. ##
## ---------- ##
.PHONY distclean-am: distclean-DEJAGNU
distclean-DEJAGNU:
## Any other cleaning must be done by the user or by the test suite
## itself. We can't predict what dejagnu or the test suite might
## generate.
-rm -f site.exp site.bak
-l='$(DEJATOOL)'; for tool in $$l; do \
rm -f $$tool.sum $$tool.log; \
done
PK (��\�.�� � am/depend.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
am__mv = mv -f
$(am__depfiles_remade):
@$(MKDIR_P) $(@D)
@echo '# dummy' >$@-t && $(am__mv) $@-t $@
am--depfiles: $(am__depfiles_remade)
.PHONY: am--depfiles
## This Makefile depends on Depdirs' files, so we should never
## erase them in -am or -recursive rules; that would prevent any other
## rules from being recursive (for instance multilib clean rules are
## recursive).
if %?DISTRMS%
distclean:
%DISTRMS%
maintainer-clean:
%DISTRMS%
endif
PK (��\���� �
am/depend2.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
## This file is read several times:
## - once per *extension* (not per language) for generic compilation rules
## - once for each file which requires specific flags.
## Note it is on purpose we wrote "if %AMDEP%", since:
##
## - if deps are turned off, %AMDEP% is mapped onto FALSE, and therefore
## the "if FALSE" chunk is removed (automake-time conditionals).
##
## - if deps are on, %AMDEP% is mapped onto AMDEP, and therefore
## the "if AMDEP" chunk is prefix with @AMDEP_TRUE@ just like for any
## other configure-time conditional.
##
## We do likewise for %FASTDEP%; this expands to an ordinary configure-time
## conditional. %FASTDEP% is used to speed up the common case of building
## a package with gcc 3.x or later. In this case we can skip the use of
## depcomp and easily inline the dependency tracking.
if %?NONLIBTOOL%
?GENERIC?%EXT%.o:
?!GENERIC?%OBJ%: %SOURCE%
if %FASTDEP%
## In fast-dep mode, we can always use -o.
## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
?!GENERIC? %VERBOSE%%COMPILE% -MT %OBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %OBJ% %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
?!GENERIC? %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
?GENERIC??!SUBDIROBJ? %VERBOSE%%COMPILE% -MT %OBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %OBJ% %SOURCEFLAG%%SOURCE%
?GENERIC??!SUBDIROBJ? %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
?GENERIC??SUBDIROBJ? %VERBOSE%depbase=`echo %OBJ% | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
?GENERIC??SUBDIROBJ? %COMPILE% -MT %OBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %OBJ% %SOURCEFLAG%%SOURCE% &&\
?GENERIC??SUBDIROBJ? $(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
else !%FASTDEP%
if %AMDEP%
%VERBOSE%source='%SOURCE%' object='%OBJ%' libtool=no @AMDEPBACKSLASH@
DEPDIR=$(DEPDIR) $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
endif %AMDEP%
if %?GENERIC%
?-o? %VERBOSE-NODEP%%COMPILE% %-c% %-o% %OBJ% %SOURCEFLAG%%SOURCE%
?!-o? %VERBOSE-NODEP%%COMPILE% %-c% %SOURCEFLAG%%SOURCE%
else !%?GENERIC%
## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
?-o? %VERBOSE-NODEP%%COMPILE% %-c% %-o% %OBJ% %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
?!-o? %VERBOSE-NODEP%%COMPILE% %-c% %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
endif !%?GENERIC%
endif !%FASTDEP%
?GENERIC?%EXT%.obj:
?!GENERIC?%OBJOBJ%: %SOURCE%
if %FASTDEP%
## In fast-dep mode, we can always use -o.
## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
?!GENERIC? %VERBOSE%%COMPILE% -MT %OBJOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %OBJOBJ% %SOURCEFLAG%`if test -f '%SOURCE%'; then $(CYGPATH_W) '%SOURCE%'; else $(CYGPATH_W) '$(srcdir)/%SOURCE%'; fi`
?!GENERIC? %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
?GENERIC??!SUBDIROBJ? %VERBOSE%%COMPILE% -MT %OBJOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %OBJOBJ% %SOURCEFLAG%`$(CYGPATH_W) '%SOURCE%'`
?GENERIC??!SUBDIROBJ? %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
?GENERIC??SUBDIROBJ? %VERBOSE%depbase=`echo %OBJ% | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
?GENERIC??SUBDIROBJ? %COMPILE% -MT %OBJOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %OBJOBJ% %SOURCEFLAG%`$(CYGPATH_W) '%SOURCE%'` &&\
?GENERIC??SUBDIROBJ? $(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
else !%FASTDEP%
if %AMDEP%
%VERBOSE%source='%SOURCE%' object='%OBJOBJ%' libtool=no @AMDEPBACKSLASH@
DEPDIR=$(DEPDIR) $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
endif %AMDEP%
if %?GENERIC%
?-o? %VERBOSE-NODEP%%COMPILE% %-c% %-o% %OBJOBJ% %SOURCEFLAG%`$(CYGPATH_W) '%SOURCE%'`
?!-o? %VERBOSE-NODEP%%COMPILE% %-c% `$(CYGPATH_W) %SOURCEFLAG%'%SOURCE%'`
else !%?GENERIC%
## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
?-o? %VERBOSE-NODEP%%COMPILE% %-c% %-o% %OBJOBJ% %SOURCEFLAG%`if test -f '%SOURCE%'; then $(CYGPATH_W) '%SOURCE%'; else $(CYGPATH_W) '$(srcdir)/%SOURCE%'; fi`
?!-o? %VERBOSE-NODEP%%COMPILE% %-c% %SOURCEFLAG%`if test -f '%SOURCE%'; then $(CYGPATH_W) '%SOURCE%'; else $(CYGPATH_W) '$(srcdir)/%SOURCE%'; fi`
endif !%?GENERIC%
endif !%FASTDEP%
endif %?NONLIBTOOL%
if %?LIBTOOL%
?GENERIC?%EXT%.lo:
?!GENERIC?%LTOBJ%: %SOURCE%
if %FASTDEP%
## In fast-dep mode, we can always use -o.
## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
?!GENERIC? %VERBOSE%%LTCOMPILE% -MT %LTOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %LTOBJ% %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
?!GENERIC? %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Plo
?GENERIC??!SUBDIROBJ? %VERBOSE%%LTCOMPILE% -MT %LTOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %LTOBJ% %SOURCEFLAG%%SOURCE%
?GENERIC??!SUBDIROBJ? %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Plo
?GENERIC??SUBDIROBJ? %VERBOSE%depbase=`echo %OBJ% | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
?GENERIC??SUBDIROBJ? %LTCOMPILE% -MT %LTOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %LTOBJ% %SOURCEFLAG%%SOURCE% &&\
?GENERIC??SUBDIROBJ? $(am__mv) %DEPBASE%.Tpo %DEPBASE%.Plo
else !%FASTDEP%
if %AMDEP%
%VERBOSE%source='%SOURCE%' object='%LTOBJ%' libtool=yes @AMDEPBACKSLASH@
DEPDIR=$(DEPDIR) $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
endif %AMDEP%
## We can always use '-o' with Libtool.
?GENERIC? %VERBOSE-NODEP%%LTCOMPILE% %-c% -o %LTOBJ% %SOURCEFLAG%%SOURCE%
## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
?!GENERIC? %VERBOSE-NODEP%%LTCOMPILE% %-c% -o %LTOBJ% %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
endif !%FASTDEP%
endif %?LIBTOOL%
PK (��\h�@XW W
am/distdir.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 2001-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
DIST_COMMON += $(am__DIST_COMMON)
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
if %?TOPDIR_P%
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
if test -d "$(distdir)"; then \
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
&& rm -rf "$(distdir)" \
## On MSYS (1.0.17) it is not possible to remove a directory that is in
## use; so, if the first rm fails, we sleep some seconds and retry, to
## give pending processes some time to exit and "release" the directory
## before we remove it. The value of "some seconds" is 5 for the moment,
## which is mostly an arbitrary value, but seems high enough in practice.
## See automake bug#10470.
|| { sleep 5 && rm -rf "$(distdir)"; }; \
else :; fi
am__post_remove_distdir = $(am__remove_distdir)
endif %?TOPDIR_P%
if %?SUBDIRS%
## computes a relative pathname RELDIR such that DIR1/RELDIR = DIR2.
## Input:
## - DIR1 relative pathname, relative to the current directory
## - DIR2 relative pathname, relative to the current directory
## Output:
## - reldir relative pathname of DIR2, relative to DIR1
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
sed_rest='s,^[^/]*/*,,'; \
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
sed_butlast='s,/*[^/]*$$,,'; \
while test -n "$$dir1"; do \
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
if test "$$first" != "."; then \
if test "$$first" = ".."; then \
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
else \
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
if test "$$first2" = "$$first"; then \
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
else \
dir2="../$$dir2"; \
fi; \
dir0="$$dir0"/"$$first"; \
fi; \
fi; \
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
done; \
reldir="$$dir2"
endif %?SUBDIRS%
.PHONY: distdir
if %?SUBDIRS%
AM_RECURSIVE_TARGETS += distdir distdir-am
endif %?SUBDIRS%
distdir: $(BUILT_SOURCES)
$(MAKE) $(AM_MAKEFLAGS) distdir-am
distdir-am: $(DISTFILES)
##
## For Gnits users, this is pretty handy. Look at 15 lines
## in case some explanatory text is desirable.
##
if %?TOPDIR_P%
if %?CK-NEWS%
@case `sed 15q $(srcdir)/NEWS` in \
*"$(VERSION)"*) : ;; \
*) \
echo "NEWS not updated; not releasing" 1>&2; \
exit 1;; \
esac
endif %?CK-NEWS%
endif %?TOPDIR_P%
##
## Only for the top dir.
##
if %?TOPDIR_P%
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
endif %?TOPDIR_P%
##
##
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
##
## Yet another hack to support SUN make.
##
## Let's assume 'foo' appears in DISTFILES and is not a built file.
## When building with VPATH=$(srcdir), SUN make and OSF1/Tru64 will
## rewrite 'foo' as '$(srcdir)/foo'. An attempt to install the file
## with
## cp $file $(distdir)/$file
## will thus install $(srcdir)/foo as $(distdir)/$(srcdir)/foo
## instead of $(distdir)/foo.
##
## So let's strip this leading $(srcdir)/ when it exists. (As far we
## know, only SUN make and OSF1/Tru64 make add it.) Searching whether
## the file is to be found in the source or build directory will be
## done later.
##
## In case we are _not_ using SUN or OSF1/Tru64 make, how can we be sure
## we are not stripping a legitimate filename that starts with the
## same pattern as $(srcdir)?
## Well, it can't happen without the Makefile author distributing
## something out of the distribution (which is bad). As an example,
## consider "EXTRA_DIST = ../bar". This is an issue if $srcdir is
## '..', however getting this value for srcdir is impossible:
## "EXTRA_DIST = ../bar" implies we are in a subdirectory (so '../bar'
## is within the package), hence '$srcdir' is something like
## '../../subdir'.
##
## There is more to say about files which are above the current directory,
## like '../bar' in the previous example. The OSF1/Tru64 make
## implementation can simplify filenames resulting from a VPATH lookup.
## For instance if "VPATH = ../../subdir" and '../bar' is found in that
## VPATH directory, then occurrences of '../bar' will be replaced by
## '../../bar' (instead of '../../subdir/../bar'). This obviously defeats
## any attempt to strip a leading $srcdir. Presently we have no workaround
## for this. We avoid this issue by writing "EXTRA_DIST = $(srcdir)/../bar"
## instead of "EXTRA_DIST = ../bar". This prefixing is needed only for files
## above the current directory. Fortunately, apart from auxdir files which
## can be located in .. or ../.., this situation hardly occurs in practice.
##
## Also rewrite $(top_srcdir) (which sometimes appears in DISTFILES, and can
## be absolute) by $(top_builddir) (which is always relative). $(srcdir) will
## be prepended later.
list='$(DISTFILES)'; \
dist_files=`for file in $$list; do echo $$file; done | \
sed -e "s|^$$srcdirstrip/||;t" \
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
## (The second 't' command clears the flag for the next round.)
##
## Make the subdirectories for the files.
##
case $$dist_files in \
*/*) $(MKDIR_P) `echo "$$dist_files" | \
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
sort -u` ;; \
esac; \
##
##
for file in $$dist_files; do \
##
## Always look for the file in the build directory first. That way
## for something like yacc output we will correctly pick up the latest
## version. Also check for directories in the build directory first,
## so one can ship generated directories.
##
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
##
## Use cp, not ln. There are situations in which "ln" can fail. For
## instance a file to distribute could actually be a cross-filesystem
## symlink -- this can easily happen if "gettextize" was run on the
## distribution.
##
if test -d $$d/$$file; then \
## Don't mention $$file in the destination argument, since this fails if
## the destination directory already exists. Also, use '-R' and not '-r'.
## '-r' is almost always incorrect.
##
## If a directory exists both in '.' and $(srcdir), then we copy the
## files from $(srcdir) first and then install those from '.'. This
## can help people who distribute directories made of source files
## *and* generated files. It is also important when the directory
## exists only in $(srcdir), because some vendor Make (such as Tru64)
## will magically create an empty directory in '.'.
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
## If the destination directory already exists, it may contain read-only
## files, e.g., during "make distcheck".
if test -d "$(distdir)/$$file"; then \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
fi; \
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
else \
## Test for file existence because sometimes a file gets included in
## DISTFILES twice. For example this happens when a single source
## file is used in building more than one program.
## See also test 'dist-repeated.sh'.
test -f "$(distdir)/$$file" \
|| cp -p $$d/$$file "$(distdir)/$$file" \
|| exit 1; \
fi; \
done
##
## Test for directory existence here because previous automake
## invocation might have created some directories. Note that we
## explicitly set distdir for the subdir make; that lets us mix-n-match
## many automake-using packages into one large package, and have "dist"
## at the top level do the right thing. If we're in the topmost
## directory, then we use 'distdir' instead of 'top_distdir'; this lets
## us work correctly with an enclosing package.
if %?SUBDIRS%
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
$(am__make_dryrun) \
|| test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
dir1=$$subdir; dir2="$(top_distdir)"; \
$(am__relativize); \
new_top_distdir=$$reldir; \
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
($(am__cd) $$subdir && \
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$$new_top_distdir" \
distdir="$$new_distdir" \
## Disable am__remove_distdir so that sub-packages do not clear a
## directory we have already cleared and might even have populated
## (e.g. shared AUX dir in the sub-package).
am__remove_distdir=: \
## Disable filename length check:
am__skip_length_check=: \
## No need to fix modes more than once:
am__skip_mode_fix=: \
distdir) \
|| exit 1; \
fi; \
done
endif %?SUBDIRS%
##
## We might have to perform some last second updates, such as updating
## info files.
## We must explicitly set distdir and top_distdir for these sub-makes.
##
if %?DIST-TARGETS%
$(MAKE) $(AM_MAKEFLAGS) \
top_distdir="$(top_distdir)" distdir="$(distdir)" \
%DIST-TARGETS%
endif %?DIST-TARGETS%
##
## This complex find command will try to avoid changing the modes of
## links into the source tree, in case they're hard-linked.
##
## Ignore return result from chmod, because it might give an error
## if we chmod a symlink.
##
## Another nastiness: if the file is unreadable by us, we make it
## readable regardless of the number of links to it. This only
## happens in perverse cases.
##
## We use $(install_sh) because that is a known-portable way to modify
## the file in place in the source tree.
##
## If we are being invoked recursively, then there is no need to walk
## the whole subtree again. This is a complexity reduction for a deep
## hierarchy of subpackages.
##
if %?TOPDIR_P%
-test -n "$(am__skip_mode_fix)" \
|| find "$(distdir)" -type d ! -perm -755 \
-exec chmod u+rwx,go+rx {} \; -o \
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|| chmod -R a+r "$(distdir)"
if %?FILENAME_FILTER%
@if test -z "$(am__skip_length_check)" && find "$(distdir)" -type f -print | \
grep '^%FILENAME_FILTER%' 1>&2; then \
echo 'error: the above filenames are too long' 1>&2; \
exit 1; \
else :; fi
endif %?FILENAME_FILTER%
endif %?TOPDIR_P%
## --------------------------------------- ##
## Building various distribution flavors. ##
## --------------------------------------- ##
## Note that we don't use GNU tar's '-z' option. One reason (but not
## the only reason) is that some versions of tar (e.g., OSF1)
## interpret '-z' differently.
##
## The -o option of GNU tar used to exclude empty directories. This
## behavior was fixed in tar 1.12 (released on 1997-04-25). But older
## versions of tar are still used (for instance NetBSD 1.6.1 ships
## with tar 1.11.2). We do not do anything specific w.r.t. this
## incompatibility since packages where empty directories need to be
## present in the archive are really unusual.
##
## We order DIST_TARGETS by expected duration of the compressors,
## slowest first, for better parallelism in "make dist". Do not
## reorder DIST_ARCHIVES, users may expect gzip to be first.
##
## Traditionally, gzip prepended the contents of the GZIP environment
## variable to its arguments, and the commands below formerly used
## this by invoking 'GZIP=$(GZIP_ENV) gzip'. The GZIP environment
## variable is now considered to be obsolescent, so the commands below
## now use 'eval GZIP= gzip $(GZIP_ENV)' instead; this should work
## with both older and newer gzip implementations. The 'eval' is to
## support makefile assignments like 'GZIP_ENV = "-9 -n"' that quote
## the GZIP_ENV right-hand side because that was needed with the
## former invocation pattern.
if %?TOPDIR_P%
?GZIP?DIST_ARCHIVES += $(distdir).tar.gz
GZIP_ENV = --best
.PHONY: dist-gzip
dist-gzip: distdir
tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz
$(am__post_remove_distdir)
?BZIP2?DIST_ARCHIVES += $(distdir).tar.bz2
.PHONY: dist-bzip2
dist-bzip2: distdir
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
$(am__post_remove_distdir)
?LZIP?DIST_ARCHIVES += $(distdir).tar.lz
.PHONY: dist-lzip
dist-lzip: distdir
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__post_remove_distdir)
?XZ?DIST_ARCHIVES += $(distdir).tar.xz
.PHONY: dist-xz
dist-xz: distdir
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__post_remove_distdir)
?COMPRESS?DIST_ARCHIVES += $(distdir).tar.Z
.PHONY: dist-tarZ
dist-tarZ: distdir
@echo WARNING: "Support for distribution archives compressed with" \
"legacy program 'compress' is deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
$(am__post_remove_distdir)
?SHAR?DIST_ARCHIVES += $(distdir).shar.gz
.PHONY: dist-shar
dist-shar: distdir
@echo WARNING: "Support for shar distribution archives is" \
"deprecated." >&2
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz
$(am__post_remove_distdir)
?ZIP?DIST_ARCHIVES += $(distdir).zip
.PHONY: dist-zip
dist-zip: distdir
-rm -f $(distdir).zip
zip -rq $(distdir).zip $(distdir)
$(am__post_remove_distdir)
?LZIP?DIST_TARGETS += dist-lzip
?XZ?DIST_TARGETS += dist-xz
?SHAR?DIST_TARGETS += dist-shar
?BZIP2?DIST_TARGETS += dist-bzip2
?GZIP?DIST_TARGETS += dist-gzip
?ZIP?DIST_TARGETS += dist-zip
?COMPRESS?DIST_TARGETS += dist-tarZ
endif %?TOPDIR_P%
## ------------------------------------------------- ##
## Building all the requested distribution flavors. ##
## ------------------------------------------------- ##
## Currently we cannot use if/endif inside a rule. The file_contents
## parser needs work.
if %?TOPDIR_P%
.PHONY: dist dist-all
if %?SUBDIRS%
AM_RECURSIVE_TARGETS += dist dist-all
endif %?SUBDIRS%
dist dist-all:
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
$(am__post_remove_distdir)
endif %?TOPDIR_P%
## ------------------------- ##
## Checking a distribution. ##
## ------------------------- ##
if %?TOPDIR_P%
if %?SUBDIRS%
AM_RECURSIVE_TARGETS += distcheck
endif %?SUBDIRS%
# This target untars the dist file and tries a VPATH configuration. Then
# it guarantees that the distribution is self-contained by making another
# tarfile.
.PHONY: distcheck
distcheck: dist
case '$(DIST_ARCHIVES)' in \
*.tar.gz*) \
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\
*.tar.bz2*) \
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lz*) \
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
*.shar.gz*) \
eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\
*.zip*) \
unzip $(distdir).zip ;;\
esac
## Make the new source tree read-only. Distributions ought to work in
## this case. However, make the top-level directory writable so we
## can make our new subdirs.
chmod -R a-w $(distdir)
chmod u+w $(distdir)
mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst
## Undo the write access.
chmod a-w $(distdir)
## With GNU make, the following command will be executed even with "make -n",
## due to the presence of '$(MAKE)'. That is normally all well (and '$(MAKE)'
## is necessary for things like parallel distcheck), but here we don't want
## execution. To avoid MAKEFLAGS parsing hassles, use a witness file that a
## non-'-n' run would have just created.
test -d $(distdir)/_build || exit 0; \
## Compute the absolute path of '_inst'. Strip any leading DOS drive
## to allow DESTDIR installations. Otherwise "$(DESTDIR)$(prefix)" would
## expand to "c:/temp/am-dc-5668/c:/src/package/package-1.0/_inst".
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
## We will attempt a DESTDIR install in $dc_destdir. We don't
## create this directory under $dc_install_base, because it would
## create very long directory names.
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
?DISTCHECK-HOOK? && $(MAKE) $(AM_MAKEFLAGS) distcheck-hook \
## Parallel BSD make may not start a new shell for each command in a recipe,
## so be sure to 'cd' back to the original directory after this.
&& am__cwd=`pwd` \
## If we merely used '$(distdir)/_build' here, "make distcheck" could
## sometimes fail to detect missing files in the distribution tarball,
## especially in those cases where both the generated files and their
## dependencies are explicitly in $(srcdir). See automake bug#18286.
&& $(am__cd) $(distdir)/_build/sub \
&& ../../configure \
?GETTEXT? --with-included-gettext \
## Additional flags for configure.
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
## At the moment, the code doesn't actually support changes in these --srcdir
## and --prefix values, so don't allow them to be overridden by the user or
## the developer. That used to be allowed, and caused issues in practice
## (in corner-case usages); see automake bug#14991.
--srcdir=../.. --prefix="$$dc_install_base" \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
&& $(MAKE) $(AM_MAKEFLAGS) check \
&& $(MAKE) $(AM_MAKEFLAGS) install \
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
distuninstallcheck \
## Make sure the package has proper DESTDIR support (we could not test this
## in the previous install/installcheck/uninstall test, because it's reasonable
## for installcheck to fail in a DESTDIR install).
## We make the '$dc_install_base' read-only because this is where files
## with missing DESTDIR support are likely to be installed.
&& chmod -R a-w "$$dc_install_base" \
## The logic here is quite convoluted because we must clean $dc_destdir
## whatever happens (it won't be erased by the next run of distcheck like
## $(distdir) is).
&& ({ \
## Build the directory, so we can cd into it even if "make install"
## didn't create it. Use mkdir, not $(MKDIR_P) because we want to
## fail if the directory already exists (PR/413).
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
} || { rm -rf "$$dc_destdir"; exit 1; }) \
&& rm -rf "$$dc_destdir" \
&& $(MAKE) $(AM_MAKEFLAGS) dist \
## Make sure to remove the dists we created in the test build directory.
&& rm -rf $(DIST_ARCHIVES) \
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
## Cater to parallel BSD make (see above).
&& cd "$$am__cwd" \
|| exit 1
$(am__post_remove_distdir)
@(echo "$(distdir) archives ready for distribution: "; \
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
## Define distuninstallcheck_listfiles and distuninstallcheck separately
## from distcheck, so that they can be overridden by the user.
.PHONY: distuninstallcheck
distuninstallcheck_listfiles = find . -type f -print
## The 'dir' file (created by install-info) might still exist after
## uninstall, so we must be prepared to account for it. The following
## check is not 100% strict, but is definitely good enough, and even
## accounts for overridden $(infodir).
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distuninstallcheck:
@test -n '$(distuninstallcheck_dir)' || { \
echo 'ERROR: trying to run $@ with an empty' \
'$$(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
$(am__cd) '$(distuninstallcheck_dir)' || { \
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
exit 1; \
}; \
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
fi ; \
$(distuninstallcheck_listfiles) ; \
exit 1; } >&2
## Define distcleancheck_listfiles and distcleancheck separately
## from distcheck, so that they can be overridden by the user.
.PHONY: distcleancheck
distcleancheck_listfiles = find . -type f -print
distcleancheck: distclean
@if test '$(srcdir)' = . ; then \
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
exit 1 ; \
fi
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left in build directory after distclean:" ; \
$(distcleancheck_listfiles) ; \
exit 1; } >&2
endif %?TOPDIR_P%
PK (��\]�qr r am/footer.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
PK (��\I��� � am/header-vars.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
VPATH = @srcdir@
@SET_MAKE@
## We used to define this. However, we don't because vendor makes
## (e.g., Solaris, Irix) won't correctly propagate variables that are
## defined in Makefile. This particular variable can't be correctly
## defined by configure (at least, not the current configure), so we
## simply avoid defining it to allow the user to use this feature with
## a vendor make.
## DESTDIR =
## Shell code that determines whether we are running under GNU make.
##
## Why the this needs to be so convoluted?
##
## (1) We can't unconditionally use make functions or special variables
## starting with a dot, as those cause non-GNU implmentations to
## crash hard.
##
## (2) We can't use $(MAKE_VERSION) here, as it is also defined in some
## non-GNU make implementations (e.g., FreeBSD make). But at least
## BSD make does *not* define the $(CURDIR) variable -- it uses
## $(.CURDIR) instead.
##
## (3) We can't use $(MAKEFILE_LIST) here, as in some situations it
## might cause the shell to die with "Arg list too long" (see
## automake bug#18744).
##
## (4) We can't use $(MAKE_HOST) unconditionally, as it is only
## defined in GNU make 4.0 or later.
##
am__is_gnu_make = { \
if test -z '$(MAKELEVEL)'; then \
false; \
elif test -n '$(MAKE_HOST)'; then \
true; \
elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \
true; \
else \
false; \
fi; \
}
## Shell code that determines whether the current make instance is
## running with a given one-letter option (e.g., -k, -n) that takes
## no argument.
am__make_running_with_option = \
case $${target_option-} in \
?) ;; \
*) echo "am__make_running_with_option: internal error: invalid" \
"target option '$${target_option-}' specified" >&2; \
exit 1;; \
esac; \
has_opt=no; \
sane_makeflags=$$MAKEFLAGS; \
if $(am__is_gnu_make); then \
## The format of $(MAKEFLAGS) is quite tricky with GNU make; the
## variable $(MFLAGS) behaves much better in that regard. So use it.
sane_makeflags=$$MFLAGS; \
else \
## Non-GNU make: we must rely on $(MAKEFLAGS). This is tricker and more
## brittle, but is the best we can do.
case $$MAKEFLAGS in \
## If we run "make TESTS='snooze nap'", FreeBSD make will export MAKEFLAGS
## to " TESTS=foo\ nap", so that the simpler loop below (on word-split
## $$MAKEFLAGS) would see a "make flag" equal to "nap", and would wrongly
## misinterpret that as and indication that make is running in dry mode.
## This has already happened in practice. So we need this hack.
*\\[\ \ ]*) \
## Extra indirection with ${bs} required by FreeBSD 8.x make.
## Not sure why (so sorry for the cargo-cult programming here).
bs=\\; \
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
esac; \
fi; \
skip_next=no; \
strip_trailopt () \
{ \
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
}; \
for flg in $$sane_makeflags; do \
test $$skip_next = yes && { skip_next=no; continue; }; \
case $$flg in \
*=*|--*) continue;; \
##
## GNU make 4.0 has changed the format of $MFLAGS, and removed the space
## between an option and its argument (e.g., from "-I dir" to "-Idir").
## So we need to handle both formats, at least for options valid in GNU
## make. OTOH, BSD make formats $(MAKEFLAGS) by separating all options,
## and separating any option from its argument, so things are easier
## there.
##
## For GNU make and BSD make.
-*I) strip_trailopt 'I'; skip_next=yes;; \
-*I?*) strip_trailopt 'I';; \
## For GNU make >= 4.0.
-*O) strip_trailopt 'O'; skip_next=yes;; \
-*O?*) strip_trailopt 'O';; \
## For GNU make (possibly overkill, this one).
-*l) strip_trailopt 'l'; skip_next=yes;; \
-*l?*) strip_trailopt 'l';; \
## For BSD make.
-[dEDm]) skip_next=yes;; \
## For NetBSD make.
-[JT]) skip_next=yes;; \
esac; \
case $$flg in \
*$$target_option*) has_opt=yes; break;; \
esac; \
done; \
test $$has_opt = yes
## Shell code that determines whether make is running in "dry mode"
## ("make -n") or not. Useful in rules that invoke make recursively,
## and are thus executed also with "make -n" -- either because they
## are declared as dependencies to '.MAKE' (NetBSD make), or because
## their recipes contain the "$(MAKE)" string (GNU and Solaris make).
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
## Shell code that determines whether make is running in "keep-going mode"
## ("make -k") or not. Useful in rules that must recursively descend into
## subdirectories, and decide whether to stop at the first error or not.
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
## Some derived variables that have been found to be useful.
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
pkglibexecdir = $(libexecdir)/@PACKAGE@
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
install_sh_DATA = $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name)
## These are defined because otherwise make on NetBSD V1.1 will print
## (eg): $(NORMAL_INSTALL) expands to empty string.
NORMAL_INSTALL = :
PRE_INSTALL = :
POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
## dejagnu.am uses these variables. Some users might rely on them too.
?BUILD?build_triplet = @build@
?HOST?host_triplet = @host@
?TARGET?target_triplet = @target@
PK (��\�T�o am/header.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
## Exactly the same as data.am.
include data.am
PK (��\��%�
�
am/inst-vars.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 2004-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
if %?FIRST%
## These variables help stripping any $(VPATH) that some
## Make implementations prepend before VPATH-found files.
## The issue is discussed at length in distdir.am.
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
*) f=$$p;; \
esac;
## Strip all directories.
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
## Number of files to install concurrently.
am__install_max = 40
## Take a $list of nobase files, strip $(srcdir) from them.
## Split apart in setup variable and an action that can be used
## in backticks or in a pipe.
am__nobase_strip_setup = \
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
am__nobase_strip = \
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
## Take a $list of nobase files, collect them, indexed by their
## srcdir-stripped dirnames. For up to am__install_max files, output
## a line containing the dirname and the files, space-separated.
## The arbitrary limit helps avoid the quadratic scaling exhibited by
## string concatenation in most shells, and should avoid line length
## limitations, while still offering only negligible performance impact
## through spawning more install commands than absolutely needed.
am__nobase_list = $(am__nobase_strip_setup); \
for p in $$list; do echo "$$p $$p"; done | \
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
if (++n[$$2] == $(am__install_max)) \
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
END { for (dir in files) print dir, files[dir] }'
## Collect up to 40 files per line from stdin.
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
## A shell code fragment to uninstall files from a given directory.
## It expects the $dir and $files shell variables to be defined respectively
## to the directory where the files to be removed are, and to the list of
## such files.
am__uninstall_files_from_dir = { \
## Some rm implementations complain if 'rm -f' is used without arguments.
test -z "$$files" \
## At least Solaris /bin/sh still lacks 'test -e', so we use the multiple
## tests below instead. We expect $dir to be either non-existent or a
## directory, so the failure we'll experience if it is a regular file
## is indeed desired and welcome (better to fail loudly thasn silently).
|| { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
|| { echo " ( cd '$$dir' && rm -f" $$files ")"; \
$(am__cd) "$$dir" && rm -f $$files; }; \
}
endif %?FIRST%
PK (��\��=!� �
am/install.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 2001-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
## ----------------------------------------- ##
## installdirs -- Creating the installdirs. ##
## ----------------------------------------- ##
## The reason we loop over %am__installdirs% (instead of simply running
## $(MKDIR_P) %am__installdirs%) is that directories variable such as
## "$(DESTDIR)$(mydir)" can potentially expand to "" if $(mydir) is
## conditionally defined. BTW, those directories are quoted in order
## to support installation paths with spaces.
if %?SUBDIRS%
.PHONY: installdirs installdirs-am
RECURSIVE_TARGETS += installdirs-recursive
installdirs: installdirs-recursive
installdirs-am:%installdirs-local%
?am__installdirs? for dir in %am__installdirs%; do \
?am__installdirs? test -z "$$dir" || $(MKDIR_P) "$$dir"; \
?am__installdirs? done
else !%?SUBDIRS%
.PHONY: installdirs
installdirs:%installdirs-local%
?am__installdirs? for dir in %am__installdirs%; do \
?am__installdirs? test -z "$$dir" || $(MKDIR_P) "$$dir"; \
?am__installdirs? done
endif !%?SUBDIRS%
## ----------------- ##
## Install targets. ##
## ----------------- ##
.PHONY: install install-exec install-data uninstall
.PHONY: install-exec-am install-data-am uninstall-am
if %?SUBDIRS%
RECURSIVE_TARGETS += install-data-recursive install-exec-recursive \
install-recursive uninstall-recursive
install:%maybe_BUILT_SOURCES% install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
uninstall: uninstall-recursive
else !%?SUBDIRS%
install:%maybe_BUILT_SOURCES% install-am
install-exec: install-exec-am
install-data: install-data-am
uninstall: uninstall-am
endif !%?SUBDIRS%
if %?maybe_BUILT_SOURCES%
.MAKE: install
endif %?maybe_BUILT_SOURCES%
.MAKE .PHONY: install-am
install-am: all-am
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
.PHONY: installcheck
?SUBDIRS?installcheck: installcheck-recursive
?!SUBDIRS?installcheck: installcheck-am
?!SUBDIRS?.PHONY: installcheck-am
?!SUBDIRS?installcheck-am:
## If you ever modify this, keep in mind that INSTALL_PROGRAM is used
## in subdirectories, so never set it to a value relative to the top
## directory.
.MAKE .PHONY: install-strip
install-strip:
## Beware that there are two variables used to install programs:
## INSTALL_PROGRAM is used for ordinary *_PROGRAMS
## install_sh_PROGRAM is used for nobase_*_PROGRAMS (because install-sh
## creates directories)
## It's OK to override both with INSTALL_STRIP_PROGRAM, because
## INSTALL_STRIP_PROGRAM uses install-sh (see m4/strip.m4 for a rationale).
##
## Use double quotes for the *_PROGRAM settings because we might need to
## interpolate some backquotes at runtime.
##
## The case for empty $(STRIP) is separate so that it is quoted correctly for
## multiple words, but does not expand to an empty words if STRIP is empty.
if test -z '$(STRIP)'; then \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
install; \
else \
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
fi
PK (��\��'- -
am/java.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1998-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
## ---------- ##
## Building. ##
## ---------- ##
if %?FIRST%
JAVAC = javac
CLASSPATH_ENV = CLASSPATH=$(JAVAROOT):$(srcdir)/$(JAVAROOT)$${CLASSPATH:+":$$CLASSPATH"}
JAVAROOT = $(top_builddir)
endif %?FIRST%
class%NDIR%.stamp: $(am__java_sources)
@list1='$?'; list2=; if test -n "$$list1"; then \
for p in $$list1; do \
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
list2="$$list2 $$d$$p"; \
done; \
echo '$(CLASSPATH_ENV) $(JAVAC) -d $(JAVAROOT) $(AM_JAVACFLAGS) $(JAVACFLAGS) '"$$list2"; \
$(CLASSPATH_ENV) $(JAVAC) -d $(JAVAROOT) $(AM_JAVACFLAGS) $(JAVACFLAGS) $$list2; \
else :; fi
echo timestamp > $@
## ------------ ##
## Installing. ##
## ------------ ##
if %?INSTALL%
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
?EXEC?.PHONY install-exec-am: install-%DIR%JAVA
?!EXEC?.PHONY install-data-am: install-%DIR%JAVA
install-%DIR%JAVA: class%NDIR%.stamp
@$(NORMAL_INSTALL)
## A single .java file can be compiled into multiple .class files. So
## we just install all the .class files that got built into this
## directory. This is not optimal, but will have to do for now.
@test -n "$(%DIR%_JAVA)" && test -n "$(%NDIR%dir)" || exit 0; \
echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"; \
set x *.class; shift; test "$$1" != "*.class" || exit 0; \
echo " $(INSTALL_DATA)" "$$@" "'$(DESTDIR)$(%NDIR%dir)/$$p'"; \
$(INSTALL_DATA) "$$@" "$(DESTDIR)$(%NDIR%dir)"
endif %?INSTALL%
## -------------- ##
## Uninstalling. ##
## -------------- ##
if %?INSTALL%
.PHONY uninstall-am: uninstall-%DIR%JAVA
uninstall-%DIR%JAVA:
@$(NORMAL_UNINSTALL)
@test -n "$(%DIR%_JAVA)" && test -n "$(%NDIR%dir)" || exit 0; \
set x *.class; shift; test "$$1" != "*.class" || exit 0; \
echo " ( cd '$(DESTDIR)$(%NDIR%dir)' && rm -f" "$$@" ")"; \
cd "$(DESTDIR)$(%NDIR%dir)" && rm -f "$$@"
endif %?INSTALL%
## ---------- ##
## Cleaning. ##
## ---------- ##
.PHONY clean-am: clean-%NDIR%JAVA
clean-%NDIR%JAVA:
-rm -f *.class class%NDIR%.stamp
## -------------- ##
## Distributing. ##
## -------------- ##
if %?DIST%
DIST_COMMON += %DISTVAR%
endif %?DIST%
PK (��\�A�H� � am/lang-compile.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 2001-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
## This file is read once per *language*, not per extension.
## ------------------------- ##
## Preprocessed Fortran 77. ##
## ------------------------- ##
## We also handle the case of preprocessing '.F' files into '.f' files.
if %?PPF77%
.F.f:
$(F77COMPILE) -F $<
endif %?PPF77%
## -------- ##
## Ratfor. ##
## -------- ##
## We also handle the case of preprocessing `.r' files into `.f' files.
if %?RATFOR%
.r.f:
$(RCOMPILE) -F $<
endif %?RATFOR%
PK (��\�ӭ�, , am/lex.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 2001-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
## See the comment about am__skipyacc in yacc.am.
if %?MAINTAINER-MODE%
if %?FIRST%
@MAINTAINER_MODE_FALSE@am__skiplex = test -f $@ ||
endif %?FIRST%
endif %?MAINTAINER-MODE%
?GENERIC?%EXT%%DERIVED-EXT%:
?!GENERIC?%OBJ%: %SOURCE%
?GENERIC? %VERBOSE%$(am__skiplex) $(SHELL) $(YLWRAP) %SOURCE% $(LEX_OUTPUT_ROOT).c %OBJ% -- %COMPILE%
?!GENERIC? %VERBOSE% \
?!GENERIC??DIST_SOURCE? $(am__skiplex) \
## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
?!GENERIC? $(SHELL) $(YLWRAP) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% $(LEX_OUTPUT_ROOT).c %OBJ% -- %COMPILE%
PK (��\���� �
am/library.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
%LIBRARY%: $(%XLIBRARY%_OBJECTS) $(%XLIBRARY%_DEPENDENCIES) $(EXTRA_%XLIBRARY%_DEPENDENCIES) %DIRSTAMP%
%SILENT%-rm -f %LIBRARY%
%VERBOSE%$(%XLIBRARY%_AR) %LIBRARY% $(%XLIBRARY%_OBJECTS) $(%XLIBRARY%_LIBADD)
%SILENT%$(RANLIB) %LIBRARY%
PK (��\Q�B22 2
am/libs.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
if %?INSTALL%
include inst-vars.am
endif %?INSTALL%
## ------------ ##
## Installing. ##
## ------------ ##
if %?INSTALL%
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
?EXEC?.PHONY install-exec-am: install-%DIR%LIBRARIES
?!EXEC?.PHONY install-data-am: install-%DIR%LIBRARIES
install-%DIR%LIBRARIES: $(%DIR%_LIBRARIES)
@$(NORMAL_INSTALL)
if %?BASE%
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
@list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
list2="$$list2 $$p"; \
else :; fi; \
done; \
test -z "$$list2" || { \
echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
echo " $(INSTALL_DATA) $$list2 '$(DESTDIR)$(%NDIR%dir)'"; \
$(INSTALL_DATA) $$list2 "$(DESTDIR)$(%NDIR%dir)" || exit $$?; }
else !%?BASE%
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
@list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
fi; \
$(am__nobase_list) | while read dir files; do \
xfiles=; for p in $$files; do \
if test -f "$$p"; then xfiles="$$xfiles $$p"; else :; fi; done; \
test -z "$$xfiles" || { \
test "x$$dir" = x. || { \
echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
$(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir"; }; \
echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
$(INSTALL_DATA) $$xfiles "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?; }; \
done
endif !%?BASE%
## We do two loops here so that $(POST_INSTALL) can be empty. If we
## merge the two loops, we get a syntax error from sh. Anyway, having
## $(POST_INSTALL) in the middle of the loop essentially renders it
## useless; sh never actually executes this command. Read the GNU
## Standards for a little enlightenment on this.
@$(POST_INSTALL)
@list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
for p in $$list; do \
if test -f $$p; then \
?BASE? $(am__strip_dir) \
?!BASE? f=$$p; \
## Must ranlib after installing because mod time changes.
## cd to target directory because AIX ranlib messes up with whitespace
## in the argument.
echo " ( cd '$(DESTDIR)$(%NDIR%dir)' && $(RANLIB) $$f )"; \
( cd "$(DESTDIR)$(%NDIR%dir)" && $(RANLIB) $$f ) || exit $$?; \
else :; fi; \
done
endif %?INSTALL%
## -------------- ##
## Uninstalling. ##
## -------------- ##
if %?INSTALL%
.PHONY uninstall-am: uninstall-%DIR%LIBRARIES
uninstall-%DIR%LIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
?BASE? files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
?!BASE? $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
dir='$(DESTDIR)$(%NDIR%dir)'; $(am__uninstall_files_from_dir)
endif %?INSTALL%
## ---------- ##
## Cleaning. ##
## ---------- ##
.PHONY clean-am: clean-%DIR%LIBRARIES
clean-%DIR%LIBRARIES:
-test -z "$(%DIR%_LIBRARIES)" || rm -f $(%DIR%_LIBRARIES)
PK (��\j�j=
am/libtool.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
.PHONY: mostlyclean-libtool clean-libtool distclean-libtool
mostlyclean-am: mostlyclean-libtool
mostlyclean-libtool:
-rm -f *.lo
clean-am: clean-libtool
clean-libtool:
?LTRMS?%LTRMS%
?TOPDIR_P?distclean-am: distclean-libtool
?TOPDIR_P?distclean-libtool:
?TOPDIR_P? -rm -f libtool config.lt
PK (��\��
am/lisp.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1996-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
if %?INSTALL%
include inst-vars.am
endif %?INSTALL%
## ---------- ##
## Building. ##
## ---------- ##
.el.elc:
## We add $(builddir) and $(srcdir) to load-path, so that any '.el' files
## that $< depends upon can be found (including generated ones).
## We prefer files from the build directory to those from the source
## directory, in true VPATH spirit.
## The destination file is normally determined by appending "c" to the
## input (which would erronously put it in $(srcdir) in VPATH builds),
## so we override that, too.
if test '$(EMACS)' != no; then \
am__dir=. am__subdir_includes=''; \
case $@ in */*) \
am__dir=`echo '$@' | sed 's,/[^/]*$$,,'`; \
am__subdir_includes="-L $$am__dir -L $(srcdir)/$$am__dir"; \
esac; \
## Emacs byte-compilation won't create this automatically, sadly.
test -d "$$am__dir" || $(MKDIR_P) "$$am__dir" || exit 1; \
$(EMACS) --batch \
$(AM_ELCFLAGS) $(ELCFLAGS) \
$$am__subdir_includes -L $(builddir) -L $(srcdir) \
--eval '(setq byte-compile-dest-file-function (lambda (_) "$@"))' \
-f batch-byte-compile '$<'; \
else :; fi
## ------------ ##
## Installing. ##
## ------------ ##
if %?INSTALL%
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
?BASE?%DIR%LISP_INSTALL = $(INSTALL_DATA)
?!BASE?%DIR%LISP_INSTALL = $(install_sh_DATA)
?EXEC?.PHONY install-exec-am: install-%DIR%LISP
?!EXEC?.PHONY install-data-am: install-%DIR%LISP
install-%DIR%LISP: $(%DIR%_LISP) $(ELCFILES)
@$(NORMAL_INSTALL)
## Do not install anything if EMACS was not found.
@if test "$(EMACS)" != no && test -n "$(%NDIR%dir)"; then \
?!BASE? $(am__vpath_adj_setup) \
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
list='$(%DIR%_LISP)'; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
fi; \
for p in $$list; do \
## A lisp file can be in the source directory or the build directory.
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
?BASE? $(am__strip_dir) \
?!BASE? $(am__vpath_adj) \
echo " $(%DIR%LISP_INSTALL) '$$d$$p' '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
$(%DIR%LISP_INSTALL) "$$d$$p" "$(DESTDIR)$(%NDIR%dir)/$$f" || exit $$?; \
## Only install .elc file if it exists.
if test -f $${p}c; then \
echo " $(%DIR%LISP_INSTALL) '$${p}c' '$(DESTDIR)$(%NDIR%dir)/$${f}c'"; \
$(%DIR%LISP_INSTALL) "$${p}c" "$(DESTDIR)$(%NDIR%dir)/$${f}c" || exit $$?; \
else : ; fi; \
done; \
else : ; fi
endif %?INSTALL%
## -------------- ##
## Uninstalling. ##
## -------------- ##
if %?INSTALL%
.PHONY uninstall-am: uninstall-%DIR%LISP
uninstall-%DIR%LISP:
@$(NORMAL_UNINSTALL)
## Do not uninstall anything if EMACS was not found.
@test "$(EMACS)" != no && test -n "$(%NDIR%dir)" || exit 0; \
list='$(%DIR%_LISP)'; \
?BASE? files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
?!BASE? $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
files="$$files "`echo "$$files" | sed 's|$$|c|'`; \
dir='$(DESTDIR)$(%NDIR%dir)'; $(am__uninstall_files_from_dir)
endif %?INSTALL%
## ---------- ##
## Cleaning. ##
## ---------- ##
.PHONY clean-am: clean-lisp
clean-lisp:
-rm -f $(ELCFILES)
## -------------- ##
## Distributing. ##
## -------------- ##
if %?DIST%
DIST_COMMON += %DISTVAR%
endif %?DIST%
PK (��\��� � am/ltlib.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
if %?INSTALL%
include inst-vars.am
endif %?INSTALL%
## ------------ ##
## Installing. ##
## ------------ ##
if %?INSTALL%
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
?EXEC?.PHONY install-exec-am: install-%DIR%LTLIBRARIES
?!EXEC?.PHONY install-data-am: install-%DIR%LTLIBRARIES
install-%DIR%LTLIBRARIES: $(%DIR%_LTLIBRARIES)
@$(NORMAL_INSTALL)
if %?BASE%
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
@list='$(%DIR%_LTLIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
list2="$$list2 $$p"; \
else :; fi; \
done; \
test -z "$$list2" || { \
echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
## Note that we explicitly set the libtool mode. This avoids any lossage
## if the program doesn't have a name that libtool expects.
## Use INSTALL and not INSTALL_DATA because libtool knows the right
## permissions to use.
?LIBTOOL? echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(%NDIR%dir)'"; \
?LIBTOOL? $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(%NDIR%dir)"; \
?!LIBTOOL? echo " $(INSTALL) $(INSTALL_STRIP_FLAG) $$list '$(DESTDIR)$(%NDIR%dir)'"; \
?!LIBTOOL? $(INSTALL) $(INSTALL_STRIP_FLAG) $$list "$(DESTDIR)$(%NDIR%dir)"; \
}
else !%?BASE%
@list='$(%DIR%_LTLIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
fi; \
for p in $$list; do if test -f "$$p"; then echo "$$p $$p"; else :; fi; done | \
sed '/ .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
$(AWK) 'BEGIN { cur = "." } \
{ if ($$2 == cur) { files = files " " $$1 } \
else { print cur, files; files = $$1; cur = $$2 } } \
END { print cur, files }' | \
while read dir files; do \
test -z "$$files" || { \
test "x$$dir" = x. || { \
echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
$(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir"; }; \
## Note that we explicitly set the libtool mode. This avoids any lossage
## if the program doesn't have a name that libtool expects.
## Use INSTALL and not INSTALL_DATA because libtool knows the right
## permissions to use.
?LIBTOOL? echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$files '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
?LIBTOOL? $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$files "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?; \
?!LIBTOOL? echo " $(INSTALL) $(INSTALL_STRIP_FLAG) $$files '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
?!LIBTOOL? $(INSTALL) $(INSTALL_STRIP_FLAG) $$files "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?; \
}; \
done
endif !%?BASE%
endif %?INSTALL%
## -------------- ##
## Uninstalling. ##
## -------------- ##
if %?INSTALL%
.PHONY uninstall-am: uninstall-%DIR%LTLIBRARIES
uninstall-%DIR%LTLIBRARIES:
@$(NORMAL_UNINSTALL)
@list='$(%DIR%_LTLIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
for p in $$list; do \
?BASE? $(am__strip_dir) \
?!BASE? f=$$p; \
?LIBTOOL? echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
?LIBTOOL? $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(%NDIR%dir)/$$f"; \
?!LIBTOOL? echo " rm -f '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
?!LIBTOOL? rm -f "$(DESTDIR)$(%NDIR%dir)/$$f"; \
done
endif %?INSTALL%
## ---------- ##
## Cleaning. ##
## ---------- ##
.PHONY clean-am: clean-%DIR%LTLIBRARIES
clean-%DIR%LTLIBRARIES:
-test -z "$(%DIR%_LTLIBRARIES)" || rm -f $(%DIR%_LTLIBRARIES)
## 'so_locations' files are created by some linkers (IRIX, OSF) when
## building a shared object. Libtool places these files in the
## directory where the shared object is created.
@list='$(%DIR%_LTLIBRARIES)'; \
locs=`for p in $$list; do echo $$p; done | \
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
sort -u`; \
test -z "$$locs" || { \
echo rm -f $${locs}; \
rm -f $${locs}; \
}
PK (��\�Y��� � am/ltlibrary.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
%LTLIBRARY%: $(%XLTLIBRARY%_OBJECTS) $(%XLTLIBRARY%_DEPENDENCIES) $(EXTRA_%XLTLIBRARY%_DEPENDENCIES) %DIRSTAMP%
%VERBOSE%$(%XLINK%) %RPATH% $(%XLTLIBRARY%_OBJECTS) $(%XLTLIBRARY%_LIBADD) $(LIBS)
PK (��\��Z Z am/mans-vars.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
NROFF = nroff
## We don't really need this, but we use it in case we ever want to
## support noinst_MANS.
MANS = %MANS%
PK (��\�$:l^ ^
am/mans.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1998-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
include inst-vars.am
man%SECTION%dir = $(mandir)/man%SECTION%
## ------------ ##
## Installing. ##
## ------------ ##
## MANS primary are always installed in mandir, hence install-data
## is hard coded.
.PHONY: install-man
?INSTALL-MAN?install-data-am: install-man
?INSTALL-MAN?am__installdirs += "$(DESTDIR)$(man%SECTION%dir)"
.PHONY install-man: install-man%SECTION%
install-man%SECTION%: %DEPS%
@$(NORMAL_INSTALL)
if %?NOTRANS_MANS%
## Handle MANS with notrans_ prefix
@list1='%NOTRANS_SECT_LIST%'; \
?!HAVE_NOTRANS? list2=''; \
?HAVE_NOTRANS? list2='%NOTRANS_LIST%'; \
test -n "$(man%SECTION%dir)" \
&& test -n "`echo $$list1$$list2`" \
|| exit 0; \
echo " $(MKDIR_P) '$(DESTDIR)$(man%SECTION%dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(man%SECTION%dir)" || exit 1; \
{ for i in $$list1; do echo "$$i"; done; \
## Extract all items from notrans_man_MANS that should go in this section.
## This must be done dynamically to support conditionals.
if test -n "$$list2"; then \
for i in $$list2; do echo "$$i"; done \
## Accept for 'man1' files like 'foo.1c' but not 'sub.1/foo.2' or 'foo-2.1.4'.
| sed -n '/\.%SECTION%[a-z]*$$/p'; \
fi; \
## Extract basename of manpage, change the extension if needed.
} | while read p; do \
## Find the file.
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
done | \
## Extract the basename of the man page and change the extension if needed.
sed 'n;s,.*/,,;p;s,\.[^%SECTION%][0-9a-z]*$$,.%SECTION%,' | \
sed 'N;N;s,\n, ,g' | { \
## We now have a list "sourcefile basename installed-name".
list=; while read file base inst; do \
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man%SECTION%dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man%SECTION%dir)/$$inst" || exit $$?; \
fi; \
done; \
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
while read files; do \
test -z "$$files" || { \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man%SECTION%dir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(man%SECTION%dir)" || exit $$?; }; \
done; }
endif %?NOTRANS_MANS%
if %?TRANS_MANS%
## Handle MANS without notrans_ prefix
@list1='%TRANS_SECT_LIST%'; \
?!HAVE_TRANS? list2=''; \
?HAVE_TRANS? list2='%TRANS_LIST%'; \
test -n "$(man%SECTION%dir)" \
&& test -n "`echo $$list1$$list2`" \
|| exit 0; \
echo " $(MKDIR_P) '$(DESTDIR)$(man%SECTION%dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(man%SECTION%dir)" || exit 1; \
{ for i in $$list1; do echo "$$i"; done; \
## Extract all items from notrans_man_MANS that should go in this section.
## This must be done dynamically to support conditionals.
if test -n "$$list2"; then \
for i in $$list2; do echo "$$i"; done \
## Accept for 'man1' files like `foo.1c' but not 'sub.1/foo.2' or 'foo-2.1.4'.
| sed -n '/\.%SECTION%[a-z]*$$/p'; \
fi; \
## Extract basename of manpage, change the extension if needed.
} | while read p; do \
## Find the file.
if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; echo "$$p"; \
done | \
## Extract the basename of the man page and change the extension if needed.
sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^%SECTION%][0-9a-z]*$$,%SECTION%,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
sed 'N;N;s,\n, ,g' | { \
## We now have a list "sourcefile basename installed-name".
list=; while read file base inst; do \
if test "$$base" = "$$inst"; then list="$$list $$file"; else \
echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man%SECTION%dir)/$$inst'"; \
$(INSTALL_DATA) "$$file" "$(DESTDIR)$(man%SECTION%dir)/$$inst" || exit $$?; \
fi; \
done; \
for i in $$list; do echo "$$i"; done | $(am__base_list) | \
while read files; do \
test -z "$$files" || { \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man%SECTION%dir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(man%SECTION%dir)" || exit $$?; }; \
done; }
endif %?TRANS_MANS%
## -------------- ##
## Uninstalling. ##
## -------------- ##
.PHONY: uninstall-man
?INSTALL-MAN?uninstall-am: uninstall-man
.PHONY uninstall-man: uninstall-man%SECTION%
uninstall-man%SECTION%:
@$(NORMAL_UNINSTALL)
if %?NOTRANS_MANS%
## Handle MANS with notrans_ prefix
@list='%NOTRANS_SECT_LIST%'; test -n "$(man%SECTION%dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
## Extract all items from notrans_man_MANS that should go in this section.
## This must be done dynamically to support conditionals.
?HAVE_NOTRANS? l2='%NOTRANS_LIST%'; for i in $$l2; do echo "$$i"; done | \
## Accept for 'man1' files like 'foo.1c' but not 'sub.1/foo.2' or 'foo-2.1.4'.
?HAVE_NOTRANS? sed -n '/\.%SECTION%[a-z]*$$/p'; \
## Extract basename of manpage, change the extension if needed.
} | sed 's,.*/,,;s,\.[^%SECTION%][0-9a-z]*$$,.%SECTION%,'`; \
dir='$(DESTDIR)$(man%SECTION%dir)'; $(am__uninstall_files_from_dir)
endif %?NOTRANS_MANS%
if %?TRANS_MANS%
## Handle MANS without notrans_ prefix
@list='%TRANS_SECT_LIST%'; test -n "$(man%SECTION%dir)" || exit 0; \
files=`{ for i in $$list; do echo "$$i"; done; \
## Extract all items from man_MANS that should go in this section.
## This must be done dynamically to support conditionals.
?HAVE_TRANS? l2='%TRANS_LIST%'; for i in $$l2; do echo "$$i"; done | \
## Accept for 'man1' files like 'foo.1c' but not 'sub.1/foo.2' or 'foo-2.1.4'.
?HAVE_TRANS? sed -n '/\.%SECTION%[a-z]*$$/p'; \
## Extract basename of manpage, run it through the program rename
## transform, and change the extension if needed.
} | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^%SECTION%][0-9a-z]*$$,%SECTION%,;x' \
-e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
dir='$(DESTDIR)$(man%SECTION%dir)'; $(am__uninstall_files_from_dir)
endif %?TRANS_MANS%
PK (��\,���� �
am/program.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
%PROGRAM%%EXEEXT%: $(%XPROGRAM%_OBJECTS) $(%XPROGRAM%_DEPENDENCIES) $(EXTRA_%XPROGRAM%_DEPENDENCIES) %DIRSTAMP%
## Remove program before linking. Otherwise the link will fail if the
## program is running somewhere. FIXME: this could be a loss if
## you're using an incremental linker. Maybe we should think twice?
## Or maybe not... sadly, incremental linkers are rarer than losing
## systems.
@rm -f %PROGRAM%%EXEEXT%
%VERBOSE%$(%XLINK%) $(%XPROGRAM%_OBJECTS) $(%XPROGRAM%_LDADD) $(LIBS)
PK (��\KLi
� � am/progs.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
## ------------ ##
## Installing. ##
## ------------ ##
if %?INSTALL%
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
?EXEC?.PHONY install-exec-am: install-%DIR%PROGRAMS
?!EXEC?.PHONY install-data-am: install-%DIR%PROGRAMS
install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS)
@$(NORMAL_INSTALL)
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
@list='$(%DIR%_PROGRAMS)'; test -n "$(%NDIR%dir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
fi; \
for p in $$list; do echo "$$p $$p"; done | \
## On Cygwin with libtool test won't see 'foo.exe' but instead 'foo'.
## So we check for both.
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p \
?LIBTOOL? || test -f $$p1 \
; then echo "$$p"; echo "$$p"; else :; fi; \
done | \
## We now have a list of sourcefile pairs, separated by newline.
## Turn that into "sourcefile source_base target_dir xformed_target_base",
## with newlines being turned into spaces in a second step.
sed -e 'p;s,.*/,,;n;h' \
?BASE? -e 's|.*|.|' \
?!BASE? -e 's|[^/]*$$||; s|^$$|.|' \
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
sed 'N;N;N;s,\n, ,g' | \
## The following awk script turns that into one line containing directories
## and then lines of 'type target_name_or_directory sources ...', with type
## 'd' designating directories, and 'f' files.
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) files[d] = files[d] " " $$1; \
else { print "f", $$3 "/" $$4, $$1; } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
?!BASE? case $$type in \
?!BASE? d) echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
?!BASE? $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?;; \
?!BASE? f) \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
?!LIBTOOL? echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(%NDIR%dir)$$dir'"; \
?!LIBTOOL? $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(%NDIR%dir)$$dir" || exit $$?; \
## Note that we explicitly set the libtool mode. This avoids any
## lossage if the install program doesn't have a name that libtool
## expects.
?LIBTOOL? echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(%NDIR%dir)$$dir'"; \
?LIBTOOL? $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(%NDIR%dir)$$dir" || exit $$?; \
} \
?!BASE? ;; esac \
; done
endif %?INSTALL%
## -------------- ##
## Uninstalling. ##
## -------------- ##
if %?INSTALL%
.PHONY uninstall-am: uninstall-%DIR%PROGRAMS
uninstall-%DIR%PROGRAMS:
@$(NORMAL_UNINSTALL)
@list='$(%DIR%_PROGRAMS)'; test -n "$(%NDIR%dir)" || list=; \
files=`for p in $$list; do echo "$$p"; done | \
## Remove any leading directory before applying $(transform),
## but keep the directory part in the hold buffer, in order to
## reapply it again afterwards in the nobase case. Append $(EXEEXT).
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
-e 's/$$/$(EXEEXT)/' \
?!BASE? -e 'x;s,[^/]*$$,,;G;s,\n,,' \
`; \
test -n "$$list" || exit 0; \
echo " ( cd '$(DESTDIR)$(%NDIR%dir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(%NDIR%dir)" && rm -f $$files
endif %?INSTALL%
## ---------- ##
## Cleaning. ##
## ---------- ##
.PHONY clean-am: clean-%DIR%PROGRAMS
clean-%DIR%PROGRAMS:
?!LIBTOOL? -test -z "$(%DIR%_PROGRAMS)" || rm -f $(%DIR%_PROGRAMS)
## Under Cygwin, we build 'program$(EXEEXT)'. However, if this
## program uses a Libtool library, Libtool will move it in
## '_libs/program$(EXEEXT)' and create a 'program' wrapper (without
## '$(EXEEXT)'). Therefore, if Libtool is used, we must try to erase
## both 'program$(EXEEXT)' and 'program'.
## Cleaning the '_libs/' or '.libs/' directory is done from clean-libtool.
## FIXME: In the future (i.e., when it works) it would be nice to delegate
## this task to "libtool --mode=clean".
?LIBTOOL? @list='$(%DIR%_PROGRAMS)'; test -n "$$list" || exit 0; \
?LIBTOOL? echo " rm -f" $$list; \
?LIBTOOL? rm -f $$list || exit $$?; \
?LIBTOOL? test -n "$(EXEEXT)" || exit 0; \
?LIBTOOL? list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
?LIBTOOL? echo " rm -f" $$list; \
?LIBTOOL? rm -f $$list
## ---------- ##
## Checking. ##
## ---------- ##
if %?CK-OPTS%
.PHONY installcheck-am: installcheck-%DIR%PROGRAMS
installcheck-%DIR%PROGRAMS: $(%DIR%_PROGRAMS)
bad=0; pid=$$$$; list="$(%DIR%_PROGRAMS)"; for p in $$list; do \
case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
## Match $(srcdir)/$$p in addition to $$p because Sun make might rewrite
## filenames in AM_INSTALLCHECK_STD_OPTIONS_EXEMPT during VPATH builds.
*" $$p "* | *" $(srcdir)/$$p "*) continue;; \
esac; \
## Strip the directory and $(EXEEXT) before applying $(transform).
f=`echo "$$p" | \
sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \
## Insert the directory back if nobase_ is used.
?!BASE? f=`echo "$$p" | sed 's|[^/]*$$||'`"$$f"; \
for opt in --help --version; do \
if "$(DESTDIR)$(%NDIR%dir)/$$f" $$opt >c$${pid}_.out \
2>c$${pid}_.err </dev/null \
&& test -n "`cat c$${pid}_.out`" \
&& test -z "`cat c$${pid}_.err`"; then :; \
else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
done; \
done; rm -f c$${pid}_.???; exit $$bad
endif %?CK-OPTS%
PK (��\�r��_ _ am/python.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1999-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
if %?INSTALL%
include inst-vars.am
endif %?INSTALL%
?FIRST?am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile)
## ------------ ##
## Installing. ##
## ------------ ##
if %?INSTALL%
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
?EXEC?.PHONY install-exec-am: install-%DIR%PYTHON
?!EXEC?.PHONY install-data-am: install-%DIR%PYTHON
install-%DIR%PYTHON: $(%DIR%_PYTHON)
@$(NORMAL_INSTALL)
if %?BASE%
@list='$(%DIR%_PYTHON)'; dlist=; list2=; test -n "$(%NDIR%dir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
fi; \
for p in $$list; do \
## A file can be in the source directory or the build directory.
if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
if test -f $$b$$p; then \
## Compute basename of source file. Unless this is a nobase_ target, we
## want to install 'python/foo.py' as '$(DESTDIR)$(%NDIR%dir)/foo.py',
## not '$(DESTDIR)$(%NDIR%dir)/python/foo.py'.
$(am__strip_dir) \
dlist="$$dlist $$f"; \
list2="$$list2 $$b$$p"; \
else :; fi; \
done; \
for file in $$list2; do echo $$file; done | $(am__base_list) | \
while read files; do \
## Don't perform translation, since script name is important.
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(%NDIR%dir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(%NDIR%dir)" || exit $$?; \
done || exit $$?; \
## Byte-compile must be done at install time, since file times are
## encoded in the actual files.
if test -n "$$dlist"; then \
$(am__py_compile) --destdir "$(DESTDIR)" \
--basedir "$(%NDIR%dir)" $$dlist; \
else :; fi
else !%?BASE%
@list='$(%DIR%_PYTHON)'; test -n "$(%NDIR%dir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
fi; \
$(am__nobase_list) | { while read dir files; do \
xfiles=; for p in $$files; do \
## A file can be in the source directory or the build directory.
if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
if test -f "$$b$$p"; then xfiles="$$xfiles $$b$$p"; dlist="$$dlist $$p"; \
else :; fi; done; \
test -z "$$xfiles" || { \
test "x$$dir" = x. || { \
echo "$(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
$(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir"; }; \
## Don't perform translation, since script name is important.
echo " $(INSTALL_DATA) $$xfiles '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
$(INSTALL_DATA) $$xfiles "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?; }; \
done; \
## Byte-compile must be done at install time, since file times are
## encoded in the actual files.
if test -n "$$dlist"; then \
$(am__py_compile) --destdir "$(DESTDIR)" \
--basedir "$(%NDIR%dir)" $$dlist; \
else :; fi; }
endif !%?BASE%
endif %?INSTALL%
## -------------- ##
## Uninstalling. ##
## -------------- ##
if %?INSTALL%
?FIRST?am__pep3147_tweak = \
?FIRST? sed -e 's|\.py$$||' -e 's|[^/]*$$|__pycache__/&.*.py|'
.PHONY uninstall-am: uninstall-%DIR%PYTHON
uninstall-%DIR%PYTHON:
@$(NORMAL_UNINSTALL)
@list='$(%DIR%_PYTHON)'; test -n "$(%NDIR%dir)" || list=; \
?BASE? py_files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
?!BASE? $(am__nobase_strip_setup); py_files=`$(am__nobase_strip)`; \
test -n "$$py_files" || exit 0; \
dir='$(DESTDIR)$(%NDIR%dir)'; \
## Also remove the .pyc and .pyo byte compiled versions.
## This is somewhat tricky, because for newer pythons we have to take
## PEP-3147 into account.
pyc_files=`echo "$$py_files" | sed 's|$$|c|'`; \
pyo_files=`echo "$$py_files" | sed 's|$$|o|'`; \
py_files_pep3147=`echo "$$py_files" | $(am__pep3147_tweak)`; \
echo "$$py_files_pep3147";\
pyc_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|c|'`; \
pyo_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|o|'`; \
st=0; \
for files in \
"$$py_files" \
"$$pyc_files" \
"$$pyo_files" \
## Installation of '.py' files is not influenced by PEP-3147, so it
## is correct *not* to have $pyfiles_pep3147 here.
"$$pyc_files_pep3147" \
"$$pyo_files_pep3147" \
; do \
$(am__uninstall_files_from_dir) || st=$$?; \
done; \
exit $$st
endif %?INSTALL%
## ---------- ##
## Cleaning. ##
## ---------- ##
## There is nothing to clean here since files are
## byte-compiled when (and where) they are installed.
## -------------- ##
## Distributing. ##
## -------------- ##
if %?DIST%
DIST_COMMON += %DISTVAR%
endif %?DIST%
PK (��\�^(� � am/remake-hdr.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
%CONFIG_H%: %STAMP%
## Recover from removal of CONFIG_HEADER.
@test -f $@ || rm -f %STAMP%
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) %STAMP%
%STAMP%: %CONFIG_H_DEPS% $(top_builddir)/config.status
@rm -f %STAMP%
cd $(top_builddir) && $(SHELL) ./config.status %CONFIG_H_PATH%
## Only the first file of AC_CONFIG_HEADERS is assumed to be generated
## by autoheader.
if %?FIRST-HDR%
%CONFIG_HIN%: %MAINTAINER-MODE% $(am__configure_deps) %FILES%
## Cater to parallel BSD make.
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
## Whenever $(AUTOHEADER) has run, we must make sure that
## ./config.status will rebuild config.h. The dependency from %STAMP%
## on %CONFIG_H_DEPS% (which contains config.hin) is not enough to
## express this.
##
## There are some tricky cases where this rule will build a
## config.hin which has the same timestamp as %STAMP%, in which case
## ./config.status will not be rerun (meaning that users will use an
## out-of-date config.h without knowing it). One situation where this
## can occur is the following:
## 1. the user updates some configure dependency (let's say foo.m4)
## and runs 'make';
## 2. the rebuild rules detect that a foo.m4 has changed,
## run aclocal, autoconf, automake, and then run ./config.status.
## (Note that autoheader hasn't been called yet, so ./config.status
## outputs a config.h from an obsolete config.hin);
## 3. once Makefile has been regenerated, make continues, and
## discovers that config.h is a dependency of the 'all' rule.
## Because config.h depends on stamp-h1, stamp-h1 depends on
## config.hin, and config.hin depends on aclocal.m4, make runs
## autoheader to rebuild config.hin.
## Now make ought to call ./config.status once again to rebuild
## config.h from the new config.hin, but if you have a sufficiently
## fast box, steps 2 and 3 will occur within the same second: the
## config.h/stamp-h1 generated from the outdated config.hin will have
## the same mtime as the new config.hin. Hence make will think that
## config.h is up to date.
##
## A solution is to erase %STAMP% here so that the %STAMP% rule
## is always triggered after the this one.
rm -f %STAMP%
## Autoheader has the bad habit of not changing the timestamp if
## config.hin is unchanged, which breaks Make targets. Since what
## must not changed gratuitously is config.h, which is already handled
## by config.status, there is no reason to make things complex for
## config.hin.
touch $@
endif %?FIRST-HDR%
PK (��\�x�j j
am/scripts.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
if %?INSTALL%
include inst-vars.am
endif %?INSTALL%
## ------------ ##
## Installing. ##
## ------------ ##
if %?INSTALL%
## if doesn't work properly for Automake variables yet.
am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
?EXEC?.PHONY install-exec-am: install-%DIR%SCRIPTS
?!EXEC?.PHONY install-data-am: install-%DIR%SCRIPTS
install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
@$(NORMAL_INSTALL)
## Funny invocation because Makefile variable can be empty, leading to
## a syntax error in sh.
@list='$(%DIR%_SCRIPTS)'; test -n "$(%NDIR%dir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
$(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
fi; \
?!BASE? $(am__nobase_strip_setup); \
for p in $$list; do \
## A file can be in the source directory or the build directory.
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
## A script may or may not exist.
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
done | \
## We now have a list of "sourcefile newline (nobase-)target" pairs.
## Turn that into "sourcefile source_base target_dir xformed_target_base",
## with newlines being turned into spaces in a second step.
sed -e 'p;s,.*/,,;n' \
?BASE? -e 'h;s|.*|.|' \
?!BASE? -e "s|$$srcdirstrip/||" -e 'h;s|[^/]*$$||; s|^$$|.|' \
-e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
if ($$2 == $$4) { files[d] = files[d] " " $$1; \
if (++n[d] == $(am__install_max)) { \
print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
else { print "f", d "/" $$4, $$1 } } \
END { for (d in files) print "f", d, files[d] }' | \
while read type dir files; do \
?!BASE? case $$type in \
?!BASE? d) echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
?!BASE? $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?;; \
?!BASE? f) \
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
test -z "$$files" || { \
echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(%NDIR%dir)$$dir'"; \
$(INSTALL_SCRIPT) $$files "$(DESTDIR)$(%NDIR%dir)$$dir" || exit $$?; \
} \
?!BASE? ;; esac \
; done
endif %?INSTALL%
## -------------- ##
## Uninstalling. ##
## -------------- ##
if %?INSTALL%
.PHONY uninstall-am: uninstall-%DIR%SCRIPTS
uninstall-%DIR%SCRIPTS:
@$(NORMAL_UNINSTALL)
@list='$(%DIR%_SCRIPTS)'; test -n "$(%NDIR%dir)" || exit 0; \
?BASE? files=`for p in $$list; do echo "$$p"; done | \
?BASE? sed -e 's,.*/,,;$(transform)'`; \
?!BASE? $(am__nobase_strip_setup); \
?!BASE? files=`$(am__nobase_strip) \
?!BASE? -e 'h;s,.*/,,;$(transform);x;s|[^/]*$$||;G;s,\n,,'`; \
dir='$(DESTDIR)$(%NDIR%dir)'; $(am__uninstall_files_from_dir)
endif %?INSTALL%
## -------------- ##
## Distributing. ##
## -------------- ##
if %?DIST%
DIST_COMMON += %DISTVAR%
endif %?DIST%
## ---------- ##
## Checking. ##
## ---------- ##
if %?CK-OPTS%
.PHONY installcheck-am: installcheck-%DIR%SCRIPTS
installcheck-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
bad=0; pid=$$$$; list="$(%DIR%_SCRIPTS)"; for p in $$list; do \
case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
## Match $(srcdir)/$$p in addition to $$p because Sun make might rewrite
## filenames in AM_INSTALLCHECK_STD_OPTIONS_EXEMPT during VPATH builds.
*" $$p "* | *" $(srcdir)/$$p "*) continue;; \
esac; \
## Strip any leading directory before applying $(transform).
f=`echo "$$p" | sed 's,^.*/,,;$(transform)'`; \
## Insert the directory back if nobase_ is used.
?!BASE? f=`echo "$$p" | sed 's|[^/]*$$||'`"$$f"; \
for opt in --help --version; do \
if "$(DESTDIR)$(%NDIR%dir)/$$f" $$opt >c$${pid}_.out \
2>c$${pid}_.err </dev/null \
&& test -n "`cat c$${pid}_.out`" \
&& test -z "`cat c$${pid}_.err`"; then :; \
else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
done; \
done; rm -f c$${pid}_.???; exit $$bad
endif %?CK-OPTS%
PK (��\Lpk4 4
am/subdirs.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
RECURSIVE_TARGETS += all-recursive check-recursive installcheck-recursive
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
distclean-recursive maintainer-clean-recursive
am__recursive_targets = \
$(RECURSIVE_TARGETS) \
$(RECURSIVE_CLEAN_TARGETS) \
$(am__extra_recursive_targets)
## All documented targets which invoke 'make' recursively, or depend
## on targets that do so. GNUmakefile from gnulib depends on this.
AM_RECURSIVE_TARGETS += $(am__recursive_targets:-recursive=)
.PHONY .MAKE: $(am__recursive_targets)
# This directory's subdirectories are mostly independent; you can cd
# into them and run 'make' without going through this Makefile.
# To change the values of 'make' variables: instead of editing Makefiles,
# (1) if the variable is set in 'config.status', edit 'config.status'
# (which will cause the Makefiles to be regenerated when you run 'make');
# (2) otherwise, pass the desired values on the 'make' command line.
$(am__recursive_targets):
## Using $failcom allows "-k" to keep its natural meaning when running a
## recursive rule.
@fail=; \
if $(am__make_keepgoing); then \
failcom='fail=yes'; \
else \
failcom='exit 1'; \
fi; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
## For distclean and maintainer-clean we make sure to use the full
## list of subdirectories. We do this so that 'configure; make
## distclean' really is a no-op, even if SUBDIRS is conditional.
case "$@" in \
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
*) list='$(SUBDIRS)' ;; \
esac; \
for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
mostlyclean: mostlyclean-recursive
clean: clean-recursive
distclean: distclean-recursive
maintainer-clean: maintainer-clean-recursive
PK (��\�Z* *
am/tags.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
# Read a list of newline-separated strings from the standard input,
# and print each of them once, without duplicates. Input order is
# *not* preserved.
am__uniquify_input = $(AWK) '\
BEGIN { nonempty = 0; } \
{ items[$$0] = 1; nonempty = 1; } \
END { if (nonempty) { for (i in items) print i; }; } \
'
# Make sure the list of sources is unique. This is necessary because,
# e.g., the same source file might be shared among _SOURCES variables
# for different programs/libraries.
am__define_uniq_tagged_files = \
list='$(am__tagged_files)'; \
unique=`for i in $$list; do \
## Handle VPATH correctly.
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
done | $(am__uniquify_input)`
## ---- ##
## ID. ##
## ---- ##
ID: $(am__tagged_files)
$(am__define_uniq_tagged_files); mkid -fID $$unique
## ------ ##
## TAGS. ##
## ------ ##
ETAGS = etags
.PHONY: TAGS tags
if %?SUBDIRS%
AM_RECURSIVE_TARGETS += TAGS
RECURSIVE_TARGETS += tags-recursive
tags: tags-recursive
else !%?SUBDIRS%
tags: tags-am
endif !%?SUBDIRS%
TAGS: tags
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
## We use the positional parameters to build the subdir list with
## absolute names, without the need to worry about white space in `pwd`.
set x; \
here=`pwd`; \
## Exuberant Ctags wants --etags-include,
## GNU Etags --include
## Furthermore Exuberant Ctags 5.5.4 fails to create TAGS files
## when no files are supplied, despite any --etags-include option.
## A workaround is to pass '.' as a file. This is what $empty_fix is for.
?SUBDIRS? if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
?SUBDIRS? include_option=--etags-include; \
?SUBDIRS? empty_fix=.; \
?SUBDIRS? else \
?SUBDIRS? include_option=--include; \
?SUBDIRS? empty_fix=; \
?SUBDIRS? fi; \
?SUBDIRS? list='$(SUBDIRS)'; for subdir in $$list; do \
## Do nothing if we're trying to look in '.'.
?SUBDIRS? if test "$$subdir" = .; then :; else \
?SUBDIRS? test ! -f $$subdir/TAGS || \
## Note that the = is mandatory for --etags-include.
?SUBDIRS? set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
?SUBDIRS? fi; \
?SUBDIRS? done; \
$(am__define_uniq_tagged_files); \
## Remove the 'x' we added first:
shift; \
## Make sure we have something to run etags on.
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
test -n "$$unique" || unique=$$empty_fix; \
if test $$# -gt 0; then \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
"$$@" $$unique; \
else \
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
$$unique; \
fi; \
fi
## --------------- ##
## vi-style tags. ##
## --------------- ##
CTAGS = ctags
.PHONY: CTAGS ctags
if %?SUBDIRS%
AM_RECURSIVE_TARGETS += CTAGS
RECURSIVE_TARGETS += ctags-recursive
ctags: ctags-recursive
else !%?SUBDIRS%
ctags: ctags-am
endif !%?SUBDIRS%
CTAGS: ctags
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
$(am__define_uniq_tagged_files); \
## Make sure we have something to run ctags on.
test -z "$(CTAGS_ARGS)$$unique" \
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
$$unique
## --------------- ##
## "Global tags". ##
## --------------- ##
.PHONY: GTAGS
GTAGS:
here=`$(am__cd) $(top_builddir) && pwd` \
&& $(am__cd) $(top_srcdir) \
&& gtags -i $(GTAGS_ARGS) "$$here"
## ------- ##
## cscope ##
## ------- ##
if %?TOPDIR_P%
CSCOPE = cscope
.PHONY: cscope clean-cscope
AM_RECURSIVE_TARGETS += cscope
cscope: cscope.files
test ! -s cscope.files \
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
clean-cscope:
-rm -f cscope.files
cscope.files: clean-cscope cscopelist
endif %?TOPDIR_P%
if %?SUBDIRS%
RECURSIVE_TARGETS += cscopelist-recursive
cscopelist: cscopelist-recursive
else !%?SUBDIRS%
cscopelist: cscopelist-am
endif !%?SUBDIRS%
cscopelist-am: $(am__tagged_files)
list='$(am__tagged_files)'; \
case "$(srcdir)" in \
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
*) sdir=$(subdir)/$(srcdir) ;; \
esac; \
for i in $$list; do \
if test -f "$$i"; then \
echo "$(subdir)/$$i"; \
else \
echo "$$sdir/$$i"; \
fi; \
done >> $(top_builddir)/cscope.files
## ---------- ##
## Cleaning. ##
## ---------- ##
.PHONY distclean-am: distclean-tags
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
if %?TOPDIR_P%
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
endif %?TOPDIR_P%
PK (��\�� � � am/texi-vers.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
DIST_COMMON += %VTEXI% %STAMPVTI%
## Don't give this rule a command (even '@:').
## %STAMPVTI% is always newer than %VTEXI%, so this rule is always
## triggered. If you equip this rule with a command, GNU make will
## assume %VTEXI% has been rebuild in the current directory and
## discard any %VTEXI% file found in a VPATH search.
%VTEXI%: %MAINTAINER-MODE% %STAMPVTI%
## Depend on configure so that version number updates cause a rebuild.
## (Not configure.ac, because not all setups define the version number
## in this file.)
%STAMPVTI%: %TEXI% $(top_srcdir)/configure
## It is wrong to have %STAMPVTI% dependent on %DIRSTAMP%, because
## %STAMPVTI% is distributed and %DIRSTAMP% isn't: a distributed file
## should never be dependent upon a non-distributed built file.
## Therefore we ensure that %DIRSTAMP% exists in the rule.
## Use cp + mv so that the update of %VTEXI% is atomic even if
## the source directory is on a different file system.
?DIRSTAMP? @test -f %DIRSTAMP% || $(MAKE) $(AM_MAKEFLAGS) %DIRSTAMP%
@(dir=.; test -f ./%TEXI% || dir=$(srcdir); \
set `$(SHELL) %MDDIR%mdate-sh $$dir/%TEXI%`; \
echo "@set UPDATED $$1 $$2 $$3"; \
echo "@set UPDATED-MONTH $$2 $$3"; \
echo "@set EDITION $(VERSION)"; \
echo "@set VERSION $(VERSION)") > %VTI%.tmp$$$$ && \
(cmp -s %VTI%.tmp$$$$ %VTEXI% \
|| (echo "Updating %VTEXI%" && \
cp %VTI%.tmp$$$$ %VTEXI%.tmp$$$$ && \
mv %VTEXI%.tmp$$$$ %VTEXI%)) && \
rm -f %VTI%.tmp$$$$ %VTEXI%.$$$$
@cp %VTEXI% $@
mostlyclean-am: mostlyclean-%VTI%
mostlyclean-%VTI%:
-rm -f %VTI%.tmp* %VTEXI%.tmp*
maintainer-clean-am: maintainer-clean-%VTI%
maintainer-clean-%VTI%:
%MAINTAINER-MODE% -rm -f %STAMPVTI% %VTEXI%
.PHONY: mostlyclean-%VTI% maintainer-clean-%VTI%
PK (��\cU� � am/texibuild.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
?GENERIC_INFO?%SOURCE_SUFFIX%%DEST_SUFFIX%:
?!GENERIC_INFO?%DEST_INFO_PREFIX%%DEST_SUFFIX%: %SOURCE_INFO% %DEPS%
## It is wrong to have 'info' files dependent on %DIRSTAMP%, because
## 'info' files are distributed and %DIRSTAMP% isn't: a distributed file
## should never be dependent upon a non-distributed built file.
## Therefore we ensure that %DIRSTAMP% exists in the rule.
?!INSRC??DIRSTAMP? @test -f %DIRSTAMP% || $(MAKE) $(AM_MAKEFLAGS) %DIRSTAMP%
## Back up the info files before running makeinfo. This is the cheapest
## way to ensure that
## 1) If the texinfo file shrinks (or if you start using --no-split),
## you'll not be left with some dead info files lying around -- dead
## files which would end up in the distribution.
## 2) If the texinfo file has some minor mistakes which cause makeinfo
## to fail, the info files are not removed. (They are needed by the
## developer while he writes documentation.)
## *.iNN files are used on DJGPP. See the comments in install-info-am
%AM_V_MAKEINFO%restore=: && backupdir="$(am__leading_dot)am$$$$" && \
?INSRC? am__cwd=`pwd` && $(am__cd) $(srcdir) && \
rm -rf $$backupdir && mkdir $$backupdir && \
## If makeinfo is not installed we must not backup the files so
## 'missing' can do its job and touch $@ if it exists.
if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
done; \
else :; fi && \
?INSRC? cd "$$am__cwd"; \
if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS% \
?!INSRC? -o $@ `test -f '%SOURCE_INFO%' || echo '$(srcdir)/'`%SOURCE_INFO%; \
?INSRC??!GENERIC_INFO? -o $@ $(srcdir)/%SOURCE_INFO%; \
?INSRC??GENERIC_INFO? -o $@ $<; \
then \
rc=0; \
?INSRC? $(am__cd) $(srcdir); \
else \
rc=$$?; \
## Beware that backup info files might come from a subdirectory.
?INSRC? $(am__cd) $(srcdir) && \
$$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
fi; \
rm -rf $$backupdir; exit $$rc
INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
?GENERIC?%SOURCE_SUFFIX%.dvi:
?!GENERIC?%DEST_PREFIX%.dvi: %SOURCE% %DEPS% %DIRSTAMP%
%AM_V_TEXI2DVI%TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
## Must set MAKEINFO like this so that version.texi will be found even
## if it is in srcdir (-I $(srcdir) is set in %MAKEINFOFLAGS%).
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS%' \
## texi2dvi doesn't silence everything with -q, redirect to /dev/null instead.
## We still want -q (%TEXIQUIET%) because it turns on batch mode.
## Use '--build-dir' so that TeX and Texinfo auxiliary files and build
## by-products are left in there, instead of cluttering the current
## directory (see automake bug#11146). Use a different build-dir for
## each file (and distinct from that of the corresponding PDF file) to
## avoid hitting a Texinfop bug that could cause low-probability racy
## failure when doing parallel builds; see:
## https://lists.gnu.org/archive/html/automake-patches/2012-06/msg00073.html
$(TEXI2DVI) %TEXIQUIET% --build-dir=$(@:.dvi=.t2d) -o $@ %TEXIDEVNULL% \
?GENERIC? %SOURCE%
?!GENERIC? `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
?GENERIC?%SOURCE_SUFFIX%.pdf:
?!GENERIC?%DEST_PREFIX%.pdf: %SOURCE% %DEPS% %DIRSTAMP%
%AM_V_TEXI2PDF%TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
## Must set MAKEINFO like this so that version.texi will be found even
## if it is in srcdir (-I $(srcdir) is set in %MAKEINFOFLAGS%).
MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS%' \
## texi2pdf doesn't silence everything with -q, redirect to /dev/null instead.
## We still want -q (%TEXIQUIET%) because it turns on batch mode.
## Use '--build-dir' so that TeX and Texinfo auxiliary files and build
## by-products are left in there, instead of cluttering the current
## directory (see automake bug#11146). Use a different build-dir for
## each file (and distinct from that of the corresponding DVI file) to
## avoid hitting a Texinfop bug that could cause low-probability racy
## failure when doing parallel builds; see:
## https://lists.gnu.org/archive/html/automake-patches/2012-06/msg00073.html
$(TEXI2PDF) %TEXIQUIET% --build-dir=$(@:.pdf=.t2p) -o $@ %TEXIDEVNULL% \
?GENERIC? %SOURCE%
?!GENERIC? `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
?GENERIC?%SOURCE_SUFFIX%.html:
?!GENERIC?%DEST_PREFIX%.html: %SOURCE% %DEPS% %DIRSTAMP%
## When --split (the default) is used, makeinfo will output a
## directory. However it will not update the time stamp of a
## previously existing directory, and when the names of the nodes
## in the manual change, it may leave unused pages. Our fix
## is to build under a temporary name, and replace the target on
## success.
%AM_V_MAKEINFO%rm -rf $(@:.html=.htp)
%SILENT%if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS% \
?GENERIC? -o $(@:.html=.htp) %SOURCE%; \
?!GENERIC? -o $(@:.html=.htp) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%; \
then \
rm -rf $@ && mv $(@:.html=.htp) $@; \
else \
rm -rf $(@:.html=.htp); exit 1; \
fi
## If we are using the generic rules, we need separate dependencies.
## (Don't wonder about %DIRSTAMP% here, this is used only by non-generic
## rules.)
if %?GENERIC_INFO%
%DEST_INFO_PREFIX%%DEST_SUFFIX%: %SOURCE_REAL% %DEPS%
endif %?GENERIC_INFO%
if %?GENERIC%
%DEST_PREFIX%.dvi: %SOURCE_REAL% %DEPS%
%DEST_PREFIX%.pdf: %SOURCE_REAL% %DEPS%
%DEST_PREFIX%.html: %SOURCE_REAL% %DEPS%
endif %?GENERIC%
PK (��\n
���4 �4 am/texinfos.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1994-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
## ----------- ##
## Variables. ##
## ----------- ##
if %?LOCAL-TEXIS%
TEXI2DVI = texi2dvi
TEXI2PDF = $(TEXI2DVI) --pdf --batch
MAKEINFOHTML = $(MAKEINFO) --html
AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
endif %?LOCAL-TEXIS%
## ---------- ##
## Building. ##
## ---------- ##
## The way to make PostScript, for those who want it.
if %?LOCAL-TEXIS%
DVIPS = dvips
.dvi.ps:
%AM_V_DVIPS%TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
$(DVIPS) %TEXIQUIET% -o $@ $<
endif %?LOCAL-TEXIS%
.PHONY: dvi dvi-am html html-am info info-am pdf pdf-am ps ps-am
if %?SUBDIRS%
RECURSIVE_TARGETS += dvi-recursive html-recursive info-recursive
RECURSIVE_TARGETS += pdf-recursive ps-recursive
dvi: dvi-recursive
html: html-recursive
info: info-recursive
pdf: pdf-recursive
ps: ps-recursive
else !%?SUBDIRS%
dvi: dvi-am
html: html-am
info: info-am
pdf: pdf-am
ps: ps-am
endif !%?SUBDIRS%
if %?LOCAL-TEXIS%
dvi-am: $(DVIS)
html-am: $(HTMLS)
info-am: $(INFO_DEPS)
pdf-am: $(PDFS)
ps-am: $(PSS)
else ! %?LOCAL-TEXIS%
dvi-am:
html-am:
info-am:
pdf-am:
ps-am:
endif ! %?LOCAL-TEXIS%
## ------------ ##
## Installing. ##
## ------------ ##
## Some code should be run only if install-info actually exists, and
## if the user doesn't request it not to be run (through the
## 'AM_UPDATE_INFO_DIR' environment variable). See automake bug#9773
## and Debian Bug#543992.
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
## Look in both . and srcdir because the info pages might have been
## rebuilt in the build directory. Can't cd to srcdir; that might
## break a possible install-sh reference.
##
## Funny name due to --cygnus influence; we want to reserve
## 'install-info' for the user.
##
## TEXINFOS primary are always installed in infodir, hence install-data
## is hard coded.
if %?INSTALL-INFO%
if %?LOCAL-TEXIS%
am__installdirs += "$(DESTDIR)$(infodir)"
install-data-am: install-info-am
endif %?LOCAL-TEXIS%
endif %?INSTALL-INFO%
.PHONY: \
install-dvi install-dvi-am \
install-html install-html-am \
install-info install-info-am \
install-pdf install-pdf-am \
install-ps install-ps-am
if %?SUBDIRS%
RECURSIVE_TARGETS += \
install-dvi-recursive \
install-html-recursive \
install-info-recursive \
install-pdf-recursive \
install-ps-recursive
install-dvi: install-dvi-recursive
install-html: install-html-recursive
install-info: install-info-recursive
install-pdf: install-pdf-recursive
install-ps: install-ps-recursive
else !%?SUBDIRS%
install-dvi: install-dvi-am
install-html: install-html-am
install-info: install-info-am
install-pdf: install-pdf-am
install-ps: install-ps-am
endif !%?SUBDIRS%
if %?LOCAL-TEXIS%
include inst-vars.am
install-dvi-am: $(DVIS)
@$(NORMAL_INSTALL)
@list='$(DVIS)'; test -n "$(dvidir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \
$(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \
done
install-html-am: $(HTMLS)
@$(NORMAL_INSTALL)
@list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \
$(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
$(am__strip_dir) \
## This indirection is required to work around a bug of the Solaris 10
## shell /usr/xpg4/bin/sh. The description of the bug can be found at
## <https://lists.gnu.org/archive/html/bug-autoconf/2011-11/msg00005.html>
## and the report of the original failure can be found at automake
## bug#10026 <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=10026#23>
d2=$$d$$p; \
if test -d "$$d2"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
$(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \
$(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
else \
list2="$$list2 $$d2"; \
fi; \
done; \
test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
done; }
install-info-am: $(INFO_DEPS)
@$(NORMAL_INSTALL)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \
$(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \
fi; \
for file in $$list; do \
## Strip possible $(srcdir) prefix.
case $$file in \
$(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
esac; \
if test -f $$file; then d=.; else d=$(srcdir); fi; \
## 8+3 filesystems cannot deal with foo.info-N filenames: they all
## conflict. DJGPP comes with a tool, DJTAR, that will rename these
## files to foo.iNN while extracting the archive. DJGPP's makeinfo
## is patched to grok these filenames. However we have to account
## for the renaming when installing the info files.
##
## If $file == foo.info, then $file_i == foo.i. The reason we use two
## shell commands instead of one ('s|\.info$$|.i|') is so that a suffix-less
## 'foo' becomes 'foo.i' too.
file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
$$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
if test -f $$ifile; then \
echo "$$ifile"; \
else : ; fi; \
done; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
@$(POST_INSTALL)
@if $(am__can_run_installinfo); then \
list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
for file in $$list; do \
## Strip directory
relfile=`echo "$$file" | sed 's|^.*/||'`; \
## Run ":" after install-info in case install-info fails. We really
## don't care about failures here, because they can be spurious. For
## instance if you don't have a dir file, install-info will fail. I
## think instead it should create a new dir file for you. This bug
## causes the "make distcheck" target to fail reliably.
echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
## Use "|| :" here because Sun make passes -e to sh; if install-info
## fails then we'd fail if we used ";".
install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
done; \
else : ; fi
install-pdf-am: $(PDFS)
@$(NORMAL_INSTALL)
@list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done
install-ps-am: $(PSS)
@$(NORMAL_INSTALL)
@list='$(PSS)'; test -n "$(psdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
done | $(am__base_list) | \
while read files; do \
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \
$(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done
else ! %?LOCAL-TEXIS%
install-dvi-am:
install-html-am:
install-info-am:
install-pdf-am:
install-ps-am:
endif ! %?LOCAL-TEXIS%
## -------------- ##
## Uninstalling. ##
## -------------- ##
if %?LOCAL-TEXIS%
.PHONY uninstall-am: \
uninstall-dvi-am \
uninstall-html-am \
uninstall-info-am \
uninstall-ps-am \
uninstall-pdf-am
uninstall-dvi-am:
@$(NORMAL_UNINSTALL)
@list='$(DVIS)'; test -n "$(dvidir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
rm -f "$(DESTDIR)$(dvidir)/$$f"; \
done
uninstall-html-am:
@$(NORMAL_UNINSTALL)
@list='$(HTMLS)'; test -n "$(htmldir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
## $f can be a directory, hence the -r.
echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
done
uninstall-info-am:
@$(PRE_UNINSTALL)
## Run two loops here so that we can handle PRE_UNINSTALL and
## NORMAL_UNINSTALL correctly.
@if test -d '$(DESTDIR)$(infodir)' && $(am__can_run_installinfo); then \
list='$(INFO_DEPS)'; \
for file in $$list; do \
relfile=`echo "$$file" | sed 's|^.*/||'`; \
## install-info needs the actual info file. We use the installed one,
## rather than relying on one still being in srcdir or builddir.
## However, "make uninstall && make uninstall" should not fail,
## so we ignore failure if the file did not exist.
echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \
done; \
else :; fi
@$(NORMAL_UNINSTALL)
@list='$(INFO_DEPS)'; \
for file in $$list; do \
relfile=`echo "$$file" | sed 's|^.*/||'`; \
## DJGPP-style info files. See comment in install-info-am.
relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
(if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \
echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
else :; fi); \
done
uninstall-pdf-am:
@$(NORMAL_UNINSTALL)
@list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
done
uninstall-ps-am:
@$(NORMAL_UNINSTALL)
@list='$(PSS)'; test -n "$(psdir)" || list=; \
for p in $$list; do \
$(am__strip_dir) \
echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
rm -f "$(DESTDIR)$(psdir)/$$f"; \
done
endif %?LOCAL-TEXIS%
if %?LOCAL-TEXIS%
.PHONY: dist-info
dist-info: $(INFO_DEPS)
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
list='$(INFO_DEPS)'; \
for base in $$list; do \
## Strip possible $(srcdir) prefix.
case $$base in \
$(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
esac; \
if test -f $$base; then d=.; else d=$(srcdir); fi; \
base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
if test -f $$file; then \
## Strip leading '$$d/'.
relfile=`expr "$$file" : "$$d/\(.*\)"`; \
test -f "$(distdir)/$$relfile" || \
cp -p $$file "$(distdir)/$$relfile"; \
else :; fi; \
done; \
done
endif %?LOCAL-TEXIS%
## ---------- ##
## Cleaning. ##
## ---------- ##
## The funny name is due to --cygnus influence; in Cygnus mode,
## 'clean-info' is a target that users can use.
if %?LOCAL-TEXIS%
.PHONY mostlyclean-am: mostlyclean-aminfo
.PHONY: mostlyclean-aminfo
mostlyclean-aminfo:
## Use '-rf', not just '-f', because the %*CLEAN% substitutions can also
## contain any directory created by "makeinfo --html", as well as the
## '*.t2d' and '*.t2p' directories used by texi2dvi and texi2pdf.
-rm -rf %MOSTLYCLEAN%
.PHONY clean-am: clean-aminfo
clean-aminfo:
## Use '-rf', not just '-f'; see comments in 'mostlyclean-aminfo'
## above for details.
?TEXICLEAN? -test -z "%TEXICLEAN%" \
?TEXICLEAN? || rm -rf %TEXICLEAN%
.PHONY maintainer-clean-am: maintainer-clean-aminfo
maintainer-clean-aminfo:
@list='$(INFO_DEPS)'; for i in $$list; do \
## .iNN files are DJGPP-style info files.
i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
done
## Use '-rf', not just '-f'; see comments in 'mostlyclean-aminfo'
## above for details.
?MAINTCLEAN? -test -z "%MAINTCLEAN%" \
?MAINTCLEAN? || rm -rf %MAINTCLEAN%
endif %?LOCAL-TEXIS%
PK (��\�)O�
am/vala.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 2008-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
## There is no rule here. :-)
PK (��\���e e
am/yacc.amnu �[��� ## automake - create Makefile.in from Makefile.am
## Copyright (C) 1998-2018 Free Software Foundation, Inc.
## 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
## the Free Software Foundation; either version 2, or (at your option)
## any later version.
## This program is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; without even the implied warranty of
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
## GNU General Public License for more details.
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <https://www.gnu.org/licenses/>.
## We want to disable the Yacc rebuild rule when
## 1. AM_MAINTAINER_MODE is used, and
## 2. --enable-maintainer-mode is not specified, and
## 3. parser.c already exist, and
## 4. parser.y and parser.c are distributed.
## Point #3 is because "make maintainer-clean" erases parser.c, yet
## the GNU Coding Standards require that ./configure; make works even
## after that.
## Point #4 is because parsers listed in nodist_*_SOURCES are always
## built on the user's side, so it makes no sense to disable them.
##
## Points #1, #2, #3 are solved by unconditionally prefixing the rule
## with $(am__skipyacc) defined below only when needed.
##
## Point #4 requires a condition on whether parser.y/parser.c are
## distributed or not. We cannot have a generic rule that works in
## both cases, so we ensure in automake that nodist_ parsers always
## use non-generic rules.
if %?FIRST%
if %?MAINTAINER-MODE%
@MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ ||
endif %?MAINTAINER-MODE%
## The 's/c$/h/' substitution *must* be the last one.
am__yacc_c2h = sed -e s/cc$$/hh/ -e s/cpp$$/hpp/ -e s/cxx$$/hxx/ \
-e s/c++$$/h++/ -e s/c$$/h/
endif %?FIRST%
?GENERIC?%EXT%%DERIVED-EXT%:
?!GENERIC?%OBJ%: %SOURCE%
?GENERIC? %VERBOSE%$(am__skipyacc) $(SHELL) $(YLWRAP) %SOURCE% y.tab.c %OBJ% y.tab.h `echo %OBJ% | $(am__yacc_c2h)` y.output %BASE%.output -- %COMPILE%
?!GENERIC? %VERBOSE% \
?!GENERIC??DIST_SOURCE? $(am__skipyacc) \
## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
?!GENERIC? $(SHELL) $(YLWRAP) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% y.tab.c %OBJ% y.tab.h `echo %OBJ% | $(am__yacc_c2h)` y.output %BASE%.output -- %COMPILE%
PK (��\|�wfK� K� COPYINGnu �[��� GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU General Public License is a free, copyleft license for
software and other kinds of works.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users. We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors. You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights. Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received. You must make sure that they, too, receive
or can get the source code. And you must show them these terms so they
know their rights.
Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.
For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software. For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.
Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so. This is fundamentally incompatible with the aim of
protecting users' freedom to change the software. The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable. Therefore, we
have designed this version of the GPL to prohibit the practice for those
products. If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.
Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary. To prevent this, the GPL assures that
patents cannot be used to render the program non-free.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Use with the GNU Affero General Public License.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:
<program> Copyright (C) <year> <name of author>
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<http://www.gnu.org/licenses/>.
The GNU General Public License does not permit incorporating your program
into proprietary programs. If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License. But first, please read
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
PK (��\��Ҍ= �= INSTALLnu �[��� Installation Instructions
*************************
Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software
Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved. This file is offered as-is,
without warranty of any kind.
Basic Installation
==================
Briefly, the shell command './configure && make && make install'
should configure, build, and install this package. The following
more-detailed instructions are generic; see the 'README' file for
instructions specific to this package. Some packages provide this
'INSTALL' file but do not implement all of the features documented
below. The lack of an optional feature in a given package is not
necessarily a bug. More recommendations for GNU packages can be found
in *note Makefile Conventions: (standards)Makefile Conventions.
The 'configure' shell script attempts to guess correct values for
various system-dependent variables used during compilation. It uses
those values to create a 'Makefile' in each directory of the package.
It may also create one or more '.h' files containing system-dependent
definitions. Finally, it creates a shell script 'config.status' that
you can run in the future to recreate the current configuration, and a
file 'config.log' containing compiler output (useful mainly for
debugging 'configure').
It can also use an optional file (typically called 'config.cache' and
enabled with '--cache-file=config.cache' or simply '-C') that saves the
results of its tests to speed up reconfiguring. Caching is disabled by
default to prevent problems with accidental use of stale cache files.
If you need to do unusual things to compile the package, please try
to figure out how 'configure' could check whether to do them, and mail
diffs or instructions to the address given in the 'README' so they can
be considered for the next release. If you are using the cache, and at
some point 'config.cache' contains results you don't want to keep, you
may remove or edit it.
The file 'configure.ac' (or 'configure.in') is used to create
'configure' by a program called 'autoconf'. You need 'configure.ac' if
you want to change it or regenerate 'configure' using a newer version of
'autoconf'.
The simplest way to compile this package is:
1. 'cd' to the directory containing the package's source code and type
'./configure' to configure the package for your system.
Running 'configure' might take a while. While running, it prints
some messages telling which features it is checking for.
2. Type 'make' to compile the package.
3. Optionally, type 'make check' to run any self-tests that come with
the package, generally using the just-built uninstalled binaries.
4. Type 'make install' to install the programs and any data files and
documentation. When installing into a prefix owned by root, it is
recommended that the package be configured and built as a regular
user, and only the 'make install' phase executed with root
privileges.
5. Optionally, type 'make installcheck' to repeat any self-tests, but
this time using the binaries in their final installed location.
This target does not install anything. Running this target as a
regular user, particularly if the prior 'make install' required
root privileges, verifies that the installation completed
correctly.
6. You can remove the program binaries and object files from the
source code directory by typing 'make clean'. To also remove the
files that 'configure' created (so you can compile the package for
a different kind of computer), type 'make distclean'. There is
also a 'make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
7. Often, you can also type 'make uninstall' to remove the installed
files again. In practice, not all packages have tested that
uninstallation works correctly, even though it is required by the
GNU Coding Standards.
8. Some packages, particularly those that use Automake, provide 'make
distcheck', which can by used by developers to test that all other
targets like 'make install' and 'make uninstall' work correctly.
This target is generally not run by end users.
Compilers and Options
=====================
Some systems require unusual options for compilation or linking that
the 'configure' script does not know about. Run './configure --help'
for details on some of the pertinent environment variables.
You can give 'configure' initial values for configuration parameters
by setting variables in the command line or in the environment. Here is
an example:
./configure CC=c99 CFLAGS=-g LIBS=-lposix
*Note Defining Variables::, for more details.
Compiling For Multiple Architectures
====================================
You can compile the package for more than one kind of computer at the
same time, by placing the object files for each architecture in their
own directory. To do this, you can use GNU 'make'. 'cd' to the
directory where you want the object files and executables to go and run
the 'configure' script. 'configure' automatically checks for the source
code in the directory that 'configure' is in and in '..'. This is known
as a "VPATH" build.
With a non-GNU 'make', it is safer to compile the package for one
architecture at a time in the source code directory. After you have
installed the package for one architecture, use 'make distclean' before
reconfiguring for another architecture.
On MacOS X 10.5 and later systems, you can create libraries and
executables that work on multiple system types--known as "fat" or
"universal" binaries--by specifying multiple '-arch' options to the
compiler but only a single '-arch' option to the preprocessor. Like
this:
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
CPP="gcc -E" CXXCPP="g++ -E"
This is not guaranteed to produce working output in all cases, you
may have to build one architecture at a time and combine the results
using the 'lipo' tool if you have problems.
Installation Names
==================
By default, 'make install' installs the package's commands under
'/usr/local/bin', include files under '/usr/local/include', etc. You
can specify an installation prefix other than '/usr/local' by giving
'configure' the option '--prefix=PREFIX', where PREFIX must be an
absolute file name.
You can specify separate installation prefixes for
architecture-specific files and architecture-independent files. If you
pass the option '--exec-prefix=PREFIX' to 'configure', the package uses
PREFIX as the prefix for installing programs and libraries.
Documentation and other data files still use the regular prefix.
In addition, if you use an unusual directory layout you can give
options like '--bindir=DIR' to specify different values for particular
kinds of files. Run 'configure --help' for a list of the directories
you can set and what kinds of files go in them. In general, the default
for these options is expressed in terms of '${prefix}', so that
specifying just '--prefix' will affect all of the other directory
specifications that were not explicitly provided.
The most portable way to affect installation locations is to pass the
correct locations to 'configure'; however, many packages provide one or
both of the following shortcuts of passing variable assignments to the
'make install' command line to change installation locations without
having to reconfigure or recompile.
The first method involves providing an override variable for each
affected directory. For example, 'make install
prefix=/alternate/directory' will choose an alternate location for all
directory configuration variables that were expressed in terms of
'${prefix}'. Any directories that were specified during 'configure',
but not in terms of '${prefix}', must each be overridden at install time
for the entire installation to be relocated. The approach of makefile
variable overrides for each directory variable is required by the GNU
Coding Standards, and ideally causes no recompilation. However, some
platforms have known limitations with the semantics of shared libraries
that end up requiring recompilation when using this method, particularly
noticeable in packages that use GNU Libtool.
The second method involves providing the 'DESTDIR' variable. For
example, 'make install DESTDIR=/alternate/directory' will prepend
'/alternate/directory' before all installation names. The approach of
'DESTDIR' overrides is not required by the GNU Coding Standards, and
does not work on platforms that have drive letters. On the other hand,
it does better at avoiding recompilation issues, and works well even
when some directory options were not specified in terms of '${prefix}'
at 'configure' time.
Optional Features
=================
If the package supports it, you can cause programs to be installed
with an extra prefix or suffix on their names by giving 'configure' the
option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'.
Some packages pay attention to '--enable-FEATURE' options to
'configure', where FEATURE indicates an optional part of the package.
They may also pay attention to '--with-PACKAGE' options, where PACKAGE
is something like 'gnu-as' or 'x' (for the X Window System). The
'README' should mention any '--enable-' and '--with-' options that the
package recognizes.
For packages that use the X Window System, 'configure' can usually
find the X include and library files automatically, but if it doesn't,
you can use the 'configure' options '--x-includes=DIR' and
'--x-libraries=DIR' to specify their locations.
Some packages offer the ability to configure how verbose the
execution of 'make' will be. For these packages, running './configure
--enable-silent-rules' sets the default to minimal output, which can be
overridden with 'make V=1'; while running './configure
--disable-silent-rules' sets the default to verbose, which can be
overridden with 'make V=0'.
Particular systems
==================
On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC
is not installed, it is recommended to use the following options in
order to use an ANSI C compiler:
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
HP-UX 'make' updates targets which have the same time stamps as their
prerequisites, which makes it generally unusable when shipped generated
files such as 'configure' are involved. Use GNU 'make' instead.
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
parse its '<wchar.h>' header file. The option '-nodtk' can be used as a
workaround. If GNU CC is not installed, it is therefore recommended to
try
./configure CC="cc"
and if that doesn't work, try
./configure CC="cc -nodtk"
On Solaris, don't put '/usr/ucb' early in your 'PATH'. This
directory contains several dysfunctional programs; working variants of
these programs are available in '/usr/bin'. So, if you need '/usr/ucb'
in your 'PATH', put it _after_ '/usr/bin'.
On Haiku, software installed for all users goes in '/boot/common',
not '/usr/local'. It is recommended to use the following options:
./configure --prefix=/boot/common
Specifying the System Type
==========================
There may be some features 'configure' cannot figure out
automatically, but needs to determine by the type of machine the package
will run on. Usually, assuming the package is built to be run on the
_same_ architectures, 'configure' can figure that out, but if it prints
a message saying it cannot guess the machine type, give it the
'--build=TYPE' option. TYPE can either be a short name for the system
type, such as 'sun4', or a canonical name which has the form:
CPU-COMPANY-SYSTEM
where SYSTEM can have one of these forms:
OS
KERNEL-OS
See the file 'config.sub' for the possible values of each field. If
'config.sub' isn't included in this package, then this package doesn't
need to know the machine type.
If you are _building_ compiler tools for cross-compiling, you should
use the option '--target=TYPE' to select the type of system they will
produce code for.
If you want to _use_ a cross compiler, that generates code for a
platform different from the build platform, you should specify the
"host" platform (i.e., that on which the generated programs will
eventually be run) with '--host=TYPE'.
Sharing Defaults
================
If you want to set default values for 'configure' scripts to share,
you can create a site shell script called 'config.site' that gives
default values for variables like 'CC', 'cache_file', and 'prefix'.
'configure' looks for 'PREFIX/share/config.site' if it exists, then
'PREFIX/etc/config.site' if it exists. Or, you can set the
'CONFIG_SITE' environment variable to the location of the site script.
A warning: not all 'configure' scripts look for a site script.
Defining Variables
==================
Variables not defined in a site shell script can be set in the
environment passed to 'configure'. However, some packages may run
configure again during the build, and the customized values of these
variables may be lost. In order to avoid this problem, you should set
them in the 'configure' command line, using 'VAR=value'. For example:
./configure CC=/usr/local2/bin/gcc
causes the specified 'gcc' to be used as the C compiler (unless it is
overridden in the site shell script).
Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an
Autoconf limitation. Until the limitation is lifted, you can use this
workaround:
CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
'configure' Invocation
======================
'configure' recognizes the following options to control how it
operates.
'--help'
'-h'
Print a summary of all of the options to 'configure', and exit.
'--help=short'
'--help=recursive'
Print a summary of the options unique to this package's
'configure', and exit. The 'short' variant lists options used only
in the top level, while the 'recursive' variant lists options also
present in any nested packages.
'--version'
'-V'
Print the version of Autoconf used to generate the 'configure'
script, and exit.
'--cache-file=FILE'
Enable the cache: use and save the results of the tests in FILE,
traditionally 'config.cache'. FILE defaults to '/dev/null' to
disable caching.
'--config-cache'
'-C'
Alias for '--cache-file=config.cache'.
'--quiet'
'--silent'
'-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to '/dev/null' (any error
messages will still be shown).
'--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
'configure' can determine that directory automatically.
'--prefix=DIR'
Use DIR as the installation prefix. *note Installation Names:: for
more details, including other options available for fine-tuning the
installation locations.
'--no-create'
'-n'
Run the configure checks, but stop before creating any output
files.
'configure' also accepts some other, not widely useful, options. Run
'configure --help' for more details.
PK (��\o�V|� � ar-libnu ȯ�� #! /bin/sh
# Wrapper for Microsoft lib.exe
me=ar-lib
scriptversion=2012-03-01.08; # UTC
# Copyright (C) 2010-2018 Free Software Foundation, Inc.
# Written by Peter Rosin <peda@lysator.liu.se>.
#
# 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
# func_error message
func_error ()
{
echo "$me: $1" 1>&2
exit 1
}
file_conv=
# func_file_conv build_file
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv in
mingw)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin)
file=`cygpath -m "$file" || echo "$file"`
;;
wine)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_at_file at_file operation archive
# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
# for each of them.
# When interpreting the content of the @FILE, do NOT use func_file_conv,
# since the user would need to supply preconverted file names to
# binutils ar, at least for MinGW.
func_at_file ()
{
operation=$2
archive=$3
at_file_contents=`cat "$1"`
eval set x "$at_file_contents"
shift
for member
do
$AR -NOLOGO $operation:"$member" "$archive" || exit $?
done
}
case $1 in
'')
func_error "no command. Try '$0 --help' for more information."
;;
-h | --h*)
cat <<EOF
Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
Members may be specified in a file named with @FILE.
EOF
exit $?
;;
-v | --v*)
echo "$me, version $scriptversion"
exit $?
;;
esac
if test $# -lt 3; then
func_error "you must specify a program, an action and an archive"
fi
AR=$1
shift
while :
do
if test $# -lt 2; then
func_error "you must specify a program, an action and an archive"
fi
case $1 in
-lib | -LIB \
| -ltcg | -LTCG \
| -machine* | -MACHINE* \
| -subsystem* | -SUBSYSTEM* \
| -verbose | -VERBOSE \
| -wx* | -WX* )
AR="$AR $1"
shift
;;
*)
action=$1
shift
break
;;
esac
done
orig_archive=$1
shift
func_file_conv "$orig_archive"
archive=$file
# strip leading dash in $action
action=${action#-}
delete=
extract=
list=
quick=
replace=
index=
create=
while test -n "$action"
do
case $action in
d*) delete=yes ;;
x*) extract=yes ;;
t*) list=yes ;;
q*) quick=yes ;;
r*) replace=yes ;;
s*) index=yes ;;
S*) ;; # the index is always updated implicitly
c*) create=yes ;;
u*) ;; # TODO: don't ignore the update modifier
v*) ;; # TODO: don't ignore the verbose modifier
*)
func_error "unknown action specified"
;;
esac
action=${action#?}
done
case $delete$extract$list$quick$replace,$index in
yes,* | ,yes)
;;
yesyes*)
func_error "more than one action specified"
;;
*)
func_error "no action specified"
;;
esac
if test -n "$delete"; then
if test ! -f "$orig_archive"; then
func_error "archive not found"
fi
for member
do
case $1 in
@*)
func_at_file "${1#@}" -REMOVE "$archive"
;;
*)
func_file_conv "$1"
$AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
;;
esac
done
elif test -n "$extract"; then
if test ! -f "$orig_archive"; then
func_error "archive not found"
fi
if test $# -gt 0; then
for member
do
case $1 in
@*)
func_at_file "${1#@}" -EXTRACT "$archive"
;;
*)
func_file_conv "$1"
$AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
;;
esac
done
else
$AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
do
$AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
done
fi
elif test -n "$quick$replace"; then
if test ! -f "$orig_archive"; then
if test -z "$create"; then
echo "$me: creating $orig_archive"
fi
orig_archive=
else
orig_archive=$archive
fi
for member
do
case $1 in
@*)
func_file_conv "${1#@}"
set x "$@" "@$file"
;;
*)
func_file_conv "$1"
set x "$@" "$file"
;;
esac
shift
shift
done
if test -n "$orig_archive"; then
$AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
else
$AR -NOLOGO -OUT:"$archive" "$@" || exit $?
fi
elif test -n "$list"; then
if test ! -f "$orig_archive"; then
func_error "archive not found"
fi
$AR -NOLOGO -LIST "$archive" || exit $?
fi
PK (��\�:^[� � compilenu ȯ�� #! /bin/sh
# Wrapper for compilers which do not understand '-c -o'.
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# This file is maintained in Automake, please report
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
nl='
'
# We need space, tab and new line, in precisely that order. Quoting is
# there to prevent tools from complaining about whitespace usage.
IFS=" "" $nl"
file_conv=
# func_file_conv build_file lazy
# Convert a $build file to $host form and store it in $file
# Currently only supports Windows hosts. If the determined conversion
# type is listed in (the comma separated) LAZY, no conversion will
# take place.
func_file_conv ()
{
file=$1
case $file in
/ | /[!/]*) # absolute file, and not a UNC file
if test -z "$file_conv"; then
# lazily determine how to convert abs files
case `uname -s` in
MINGW*)
file_conv=mingw
;;
CYGWIN*)
file_conv=cygwin
;;
*)
file_conv=wine
;;
esac
fi
case $file_conv/,$2, in
*,$file_conv,*)
;;
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
file=`winepath -w "$file" || echo "$file"`
;;
esac
;;
esac
}
# func_cl_dashL linkdir
# Make cl look for libraries in LINKDIR
func_cl_dashL ()
{
func_file_conv "$1"
if test -z "$lib_path"; then
lib_path=$file
else
lib_path="$lib_path;$file"
fi
linker_opts="$linker_opts -LIBPATH:$file"
}
# func_cl_dashl library
# Do a library search-path lookup for cl
func_cl_dashl ()
{
lib=$1
found=no
save_IFS=$IFS
IFS=';'
for dir in $lib_path $LIB
do
IFS=$save_IFS
if $shared && test -f "$dir/$lib.dll.lib"; then
found=yes
lib=$dir/$lib.dll.lib
break
fi
if test -f "$dir/$lib.lib"; then
found=yes
lib=$dir/$lib.lib
break
fi
if test -f "$dir/lib$lib.a"; then
found=yes
lib=$dir/lib$lib.a
break
fi
done
IFS=$save_IFS
if test "$found" != yes; then
lib=$lib.lib
fi
}
# func_cl_wrapper cl arg...
# Adjust compile command to suit cl
func_cl_wrapper ()
{
# Assume a capable shell
lib_path=
shared=:
linker_opts=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
eat=1
case $2 in
*.o | *.[oO][bB][jJ])
func_file_conv "$2"
set x "$@" -Fo"$file"
shift
;;
*)
func_file_conv "$2"
set x "$@" -Fe"$file"
shift
;;
esac
;;
-I)
eat=1
func_file_conv "$2" mingw
set x "$@" -I"$file"
shift
;;
-I*)
func_file_conv "${1#-I}" mingw
set x "$@" -I"$file"
shift
;;
-l)
eat=1
func_cl_dashl "$2"
set x "$@" "$lib"
shift
;;
-l*)
func_cl_dashl "${1#-l}"
set x "$@" "$lib"
shift
;;
-L)
eat=1
func_cl_dashL "$2"
;;
-L*)
func_cl_dashL "${1#-L}"
;;
-static)
shared=false
;;
-Wl,*)
arg=${1#-Wl,}
save_ifs="$IFS"; IFS=','
for flag in $arg; do
IFS="$save_ifs"
linker_opts="$linker_opts $flag"
done
IFS="$save_ifs"
;;
-Xlinker)
eat=1
linker_opts="$linker_opts $2"
;;
-*)
set x "$@" "$1"
shift
;;
*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
func_file_conv "$1"
set x "$@" -Tp"$file"
shift
;;
*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
func_file_conv "$1" mingw
set x "$@" "$file"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -n "$linker_opts"; then
linker_opts="-link$linker_opts"
fi
exec "$@" $linker_opts
exit 1
}
eat=
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: compile [--help] [--version] PROGRAM [ARGS]
Wrapper for compilers which do not understand '-c -o'.
Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
arguments, and rename the output as expected.
If you are trying to build a whole package this is not the
right script to run: please start by reading the file 'INSTALL'.
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "compile $scriptversion"
exit $?
;;
cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
func_cl_wrapper "$@" # Doesn't return...
;;
esac
ofile=
cfile=
for arg
do
if test -n "$eat"; then
eat=
else
case $1 in
-o)
# configure might choose to run compile as 'compile cc -o foo foo.c'.
# So we strip '-o arg' only if arg is an object.
eat=1
case $2 in
*.o | *.obj)
ofile=$2
;;
*)
set x "$@" -o "$2"
shift
;;
esac
;;
*.c)
cfile=$1
set x "$@" "$1"
shift
;;
*)
set x "$@" "$1"
shift
;;
esac
fi
shift
done
if test -z "$ofile" || test -z "$cfile"; then
# If no '-o' option was seen then we might have been invoked from a
# pattern rule where we don't need one. That is ok -- this is a
# normal compilation that the losing compiler can handle. If no
# '.c' file was seen then we are probably linking. That is also
# ok.
exec "$@"
fi
# Name of file we expect compiler to create.
cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
# Create the lock directory.
# Note: use '[/\\:.-]' here to ensure that we don't use the same name
# that we are using for the .o file. Also, base the name on the expected
# object file name, since that is what matters with a parallel build.
lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
while true; do
if mkdir "$lockdir" >/dev/null 2>&1; then
break
fi
sleep 1
done
# FIXME: race condition here if user kills between mkdir and trap.
trap "rmdir '$lockdir'; exit 1" 1 2 15
# Run the compile.
"$@"
ret=$?
if test -f "$cofile"; then
test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
elif test -f "${cofile}bj"; then
test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
fi
rmdir "$lockdir"
exit $ret
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
PK (��\�_��� �� config.guessnu ȯ�� #! /bin/sh
# Attempt to guess a canonical system name.
# Copyright 1992-2018 Free Software Foundation, Inc.
timestamp='2018-03-08'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
#
# Originally written by Per Bothner; maintained since 2000 by Ben Elliston.
#
# You can get the latest version of this script from:
# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
#
# Please send patches to <config-patches@gnu.org>.
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION]
Output the configuration name of the system \`$me' is run on.
Options:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.guess ($timestamp)
Originally written by Per Bothner.
Copyright 1992-2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
help="
Try \`$me --help' for more information."
# Parse command line
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
echo "$timestamp" ; exit ;;
--version | -v )
echo "$version" ; exit ;;
--help | --h* | -h )
echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
break ;;
-* )
echo "$me: invalid option $1$help" >&2
exit 1 ;;
* )
break ;;
esac
done
if test $# != 0; then
echo "$me: too many arguments$help" >&2
exit 1
fi
trap 'exit 1' 1 2 15
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
# compiler to aid in system detection is discouraged as it requires
# temporary files to be created and, as you can see below, it is a
# headache to deal with in a portable fashion.
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
# use `HOST_CC' if defined, but it is deprecated.
# Portable tmp directory creation inspired by the Autoconf team.
set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
{ tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
case $CC_FOR_BUILD,$HOST_CC,$CC in
,,) echo "int x;" > "$dummy.c" ;
for c in cc gcc c89 c99 ; do
if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then
CC_FOR_BUILD="$c"; break ;
fi ;
done ;
if test x"$CC_FOR_BUILD" = x ; then
CC_FOR_BUILD=no_compiler_found ;
fi
;;
,,*) CC_FOR_BUILD=$CC ;;
,*,*) CC_FOR_BUILD=$HOST_CC ;;
esac ; set_cc_for_build= ;'
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
# (ghazi@noc.rutgers.edu 1994-08-24)
if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
PATH=$PATH:/.attbin ; export PATH
fi
UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
case "$UNAME_SYSTEM" in
Linux|GNU|GNU/*)
# If the system lacks a compiler, then just pick glibc.
# We could probably try harder.
LIBC=gnu
eval "$set_cc_for_build"
cat <<-EOF > "$dummy.c"
#include <features.h>
#if defined(__UCLIBC__)
LIBC=uclibc
#elif defined(__dietlibc__)
LIBC=dietlibc
#else
LIBC=gnu
#endif
EOF
eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`"
# If ldd exists, use it to detect musl libc.
if command -v ldd >/dev/null && \
ldd --version 2>&1 | grep -q ^musl
then
LIBC=musl
fi
;;
esac
# Note: order is significant - the case branches are not exclusive.
case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in
*:NetBSD:*:*)
# NetBSD (nbsd) targets should (where applicable) match one or
# more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*,
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
# switched to ELF, *-*-netbsd* would select the old
# object file format. This provides both forward
# compatibility and a consistent mechanism for selecting the
# object file format.
#
# Note: NetBSD doesn't particularly care about the vendor
# portion of the name. We always set it to "unknown".
sysctl="sysctl -n hw.machine_arch"
UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \
"/sbin/$sysctl" 2>/dev/null || \
"/usr/sbin/$sysctl" 2>/dev/null || \
echo unknown)`
case "$UNAME_MACHINE_ARCH" in
armeb) machine=armeb-unknown ;;
arm*) machine=arm-unknown ;;
sh3el) machine=shl-unknown ;;
sh3eb) machine=sh-unknown ;;
sh5el) machine=sh5le-unknown ;;
earmv*)
arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'`
endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'`
machine="${arch}${endian}"-unknown
;;
*) machine="$UNAME_MACHINE_ARCH"-unknown ;;
esac
# The Operating System including object format, if it has switched
# to ELF recently (or will in the future) and ABI.
case "$UNAME_MACHINE_ARCH" in
earm*)
os=netbsdelf
;;
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
eval "$set_cc_for_build"
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ELF__
then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX?
os=netbsd
else
os=netbsdelf
fi
;;
*)
os=netbsd
;;
esac
# Determine ABI tags.
case "$UNAME_MACHINE_ARCH" in
earm*)
expr='s/^earmv[0-9]/-eabi/;s/eb$//'
abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"`
;;
esac
# The OS release
# Debian GNU/NetBSD machines have a different userland, and
# thus, need a distinct triplet. However, they do not need
# kernel version information, so it can be replaced with a
# suitable tag, in the style of linux-gnu.
case "$UNAME_VERSION" in
Debian*)
release='-gnu'
;;
*)
release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2`
;;
esac
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
# contains redundant information, the shorter form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "$machine-${os}${release}${abi}"
exit ;;
*:Bitrig:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE"
exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE"
exit ;;
*:LibertyBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'`
echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE"
exit ;;
*:MidnightBSD:*:*)
echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE"
exit ;;
*:ekkoBSD:*:*)
echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE"
exit ;;
*:SolidBSD:*:*)
echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE"
exit ;;
macppc:MirBSD:*:*)
echo powerpc-unknown-mirbsd"$UNAME_RELEASE"
exit ;;
*:MirBSD:*:*)
echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE"
exit ;;
*:Sortix:*:*)
echo "$UNAME_MACHINE"-unknown-sortix
exit ;;
*:Redox:*:*)
echo "$UNAME_MACHINE"-unknown-redox
exit ;;
mips:OSF1:*.*)
echo mips-dec-osf1
exit ;;
alpha:OSF1:*:*)
case $UNAME_RELEASE in
*4.0)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
;;
*5.*)
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
;;
esac
# According to Compaq, /usr/sbin/psrinfo has been available on
# OSF/1 and Tru64 systems produced since 1995. I hope that
# covers most systems running today. This code pipes the CPU
# types through head -n 1, so we only detect the type of CPU 0.
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
case "$ALPHA_CPU_TYPE" in
"EV4 (21064)")
UNAME_MACHINE=alpha ;;
"EV4.5 (21064)")
UNAME_MACHINE=alpha ;;
"LCA4 (21066/21068)")
UNAME_MACHINE=alpha ;;
"EV5 (21164)")
UNAME_MACHINE=alphaev5 ;;
"EV5.6 (21164A)")
UNAME_MACHINE=alphaev56 ;;
"EV5.6 (21164PC)")
UNAME_MACHINE=alphapca56 ;;
"EV5.7 (21164PC)")
UNAME_MACHINE=alphapca57 ;;
"EV6 (21264)")
UNAME_MACHINE=alphaev6 ;;
"EV6.7 (21264A)")
UNAME_MACHINE=alphaev67 ;;
"EV6.8CB (21264C)")
UNAME_MACHINE=alphaev68 ;;
"EV6.8AL (21264B)")
UNAME_MACHINE=alphaev68 ;;
"EV6.8CX (21264D)")
UNAME_MACHINE=alphaev68 ;;
"EV6.9A (21264/EV69A)")
UNAME_MACHINE=alphaev69 ;;
"EV7 (21364)")
UNAME_MACHINE=alphaev7 ;;
"EV7.9 (21364A)")
UNAME_MACHINE=alphaev79 ;;
esac
# A Pn.n version is a patched version.
# A Vn.n version is a released version.
# A Tn.n version is a released field test version.
# A Xn.n version is an unreleased experimental baselevel.
# 1.2 uses "1.2" for uname -r.
echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`"
# Reset EXIT trap before exiting to avoid spurious non-zero exit code.
exitcode=$?
trap '' 0
exit $exitcode ;;
Amiga*:UNIX_System_V:4.0:*)
echo m68k-unknown-sysv4
exit ;;
*:[Aa]miga[Oo][Ss]:*:*)
echo "$UNAME_MACHINE"-unknown-amigaos
exit ;;
*:[Mm]orph[Oo][Ss]:*:*)
echo "$UNAME_MACHINE"-unknown-morphos
exit ;;
*:OS/390:*:*)
echo i370-ibm-openedition
exit ;;
*:z/VM:*:*)
echo s390-ibm-zvmoe
exit ;;
*:OS400:*:*)
echo powerpc-ibm-os400
exit ;;
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix"$UNAME_RELEASE"
exit ;;
arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
echo hppa1.1-hitachi-hiuxmpp
exit ;;
Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
# akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
if test "`(/bin/universe) 2>/dev/null`" = att ; then
echo pyramid-pyramid-sysv3
else
echo pyramid-pyramid-bsd
fi
exit ;;
NILE*:*:*:dcosx)
echo pyramid-pyramid-svr4
exit ;;
DRS?6000:unix:4.0:6*)
echo sparc-icl-nx6
exit ;;
DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
case `/usr/bin/uname -p` in
sparc) echo sparc-icl-nx7; exit ;;
esac ;;
s390x:SunOS:*:*)
echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
exit ;;
sun4H:SunOS:5.*:*)
echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`"
exit ;;
i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
echo i386-pc-auroraux"$UNAME_RELEASE"
exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
eval "$set_cc_for_build"
SUN_ARCH=i386
# If there is a compiler, see if it is configured for 64-bit objects.
# Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
# This test works for both compilers.
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
SUN_ARCH=x86_64
fi
fi
echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:6*:*)
# According to config.sub, this is the proper way to canonicalize
# SunOS6. Hard to guess exactly what SunOS6 will be like, but
# it's likely to be more like Solaris than SunOS4.
echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
sun4*:SunOS:*:*)
case "`/usr/bin/arch -k`" in
Series*|S4*)
UNAME_RELEASE=`uname -v`
;;
esac
# Japanese Language versions have a version number like `4.1.3-JL'.
echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`"
exit ;;
sun3*:SunOS:*:*)
echo m68k-sun-sunos"$UNAME_RELEASE"
exit ;;
sun*:*:4.2BSD:*)
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3
case "`/bin/arch`" in
sun3)
echo m68k-sun-sunos"$UNAME_RELEASE"
;;
sun4)
echo sparc-sun-sunos"$UNAME_RELEASE"
;;
esac
exit ;;
aushp:SunOS:*:*)
echo sparc-auspex-sunos"$UNAME_RELEASE"
exit ;;
# The situation for MiNT is a little confusing. The machine name
# can be virtually everything (everything which is not
# "atarist" or "atariste" at least should have a processor
# > m68000). The system name ranges from "MiNT" over "FreeMiNT"
# to the lowercase version "mint" (or "freemint"). Finally
# the system name "TOS" denotes a system which is actually not
# MiNT. But MiNT is downward compatible to TOS, so this should
# be no problem.
atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint"$UNAME_RELEASE"
exit ;;
atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
echo m68k-atari-mint"$UNAME_RELEASE"
exit ;;
*falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
echo m68k-atari-mint"$UNAME_RELEASE"
exit ;;
milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
echo m68k-milan-mint"$UNAME_RELEASE"
exit ;;
hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
echo m68k-hades-mint"$UNAME_RELEASE"
exit ;;
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
echo m68k-unknown-mint"$UNAME_RELEASE"
exit ;;
m68k:machten:*:*)
echo m68k-apple-machten"$UNAME_RELEASE"
exit ;;
powerpc:machten:*:*)
echo powerpc-apple-machten"$UNAME_RELEASE"
exit ;;
RISC*:Mach:*:*)
echo mips-dec-mach_bsd4.3
exit ;;
RISC*:ULTRIX:*:*)
echo mips-dec-ultrix"$UNAME_RELEASE"
exit ;;
VAX*:ULTRIX*:*:*)
echo vax-dec-ultrix"$UNAME_RELEASE"
exit ;;
2020:CLIX:*:* | 2430:CLIX:*:*)
echo clipper-intergraph-clix"$UNAME_RELEASE"
exit ;;
mips:*:*:UMIPS | mips:*:*:RISCos)
eval "$set_cc_for_build"
sed 's/^ //' << EOF > "$dummy.c"
#ifdef __cplusplus
#include <stdio.h> /* for printf() prototype */
int main (int argc, char *argv[]) {
#else
int main (argc, argv) int argc; char *argv[]; {
#endif
#if defined (host_mips) && defined (MIPSEB)
#if defined (SYSTYPE_SYSV)
printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_SVR4)
printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0);
#endif
#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0);
#endif
#endif
exit (-1);
}
EOF
$CC_FOR_BUILD -o "$dummy" "$dummy.c" &&
dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` &&
SYSTEM_NAME=`"$dummy" "$dummyarg"` &&
{ echo "$SYSTEM_NAME"; exit; }
echo mips-mips-riscos"$UNAME_RELEASE"
exit ;;
Motorola:PowerMAX_OS:*:*)
echo powerpc-motorola-powermax
exit ;;
Motorola:*:4.3:PL8-*)
echo powerpc-harris-powermax
exit ;;
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
echo powerpc-harris-powermax
exit ;;
Night_Hawk:Power_UNIX:*:*)
echo powerpc-harris-powerunix
exit ;;
m88k:CX/UX:7*:*)
echo m88k-harris-cxux7
exit ;;
m88k:*:4*:R4*)
echo m88k-motorola-sysv4
exit ;;
m88k:*:3*:R3*)
echo m88k-motorola-sysv3
exit ;;
AViiON:dgux:*:*)
# DG/UX returns AViiON for all architectures
UNAME_PROCESSOR=`/usr/bin/uname -p`
if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ]
then
if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \
[ "$TARGET_BINARY_INTERFACE"x = x ]
then
echo m88k-dg-dgux"$UNAME_RELEASE"
else
echo m88k-dg-dguxbcs"$UNAME_RELEASE"
fi
else
echo i586-dg-dgux"$UNAME_RELEASE"
fi
exit ;;
M88*:DolphinOS:*:*) # DolphinOS (SVR3)
echo m88k-dolphin-sysv3
exit ;;
M88*:*:R3*:*)
# Delta 88k system running SVR3
echo m88k-motorola-sysv3
exit ;;
XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
echo m88k-tektronix-sysv3
exit ;;
Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
echo m68k-tektronix-bsd
exit ;;
*:IRIX*:*:*)
echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`"
exit ;;
????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
i*86:AIX:*:*)
echo i386-ibm-aix
exit ;;
ia64:AIX:*:*)
if [ -x /usr/bin/oslevel ] ; then
IBM_REV=`/usr/bin/oslevel`
else
IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
fi
echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV"
exit ;;
*:AIX:2:3)
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
eval "$set_cc_for_build"
sed 's/^ //' << EOF > "$dummy.c"
#include <sys/systemcfg.h>
main()
{
if (!__power_pc())
exit(1);
puts("powerpc-ibm-aix3.2.5");
exit(0);
}
EOF
if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"`
then
echo "$SYSTEM_NAME"
else
echo rs6000-ibm-aix3.2.5
fi
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
echo rs6000-ibm-aix3.2.4
else
echo rs6000-ibm-aix3.2
fi
exit ;;
*:AIX:*:[4567])
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then
IBM_ARCH=rs6000
else
IBM_ARCH=powerpc
fi
if [ -x /usr/bin/lslpp ] ; then
IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc |
awk -F: '{ print $3 }' | sed s/[0-9]*$/0/`
else
IBM_REV="$UNAME_VERSION.$UNAME_RELEASE"
fi
echo "$IBM_ARCH"-ibm-aix"$IBM_REV"
exit ;;
*:AIX:*:*)
echo rs6000-ibm-aix
exit ;;
ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*)
echo romp-ibm-bsd4.4
exit ;;
ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to
exit ;; # report: romp-ibm BSD 4.3
*:BOSX:*:*)
echo rs6000-bull-bosx
exit ;;
DPX/2?00:B.O.S.:*:*)
echo m68k-bull-sysv3
exit ;;
9000/[34]??:4.3bsd:1.*:*)
echo m68k-hp-bsd
exit ;;
hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
echo m68k-hp-bsd4.4
exit ;;
9000/[34678]??:HP-UX:*:*)
HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
case "$UNAME_MACHINE" in
9000/31?) HP_ARCH=m68000 ;;
9000/[34]??) HP_ARCH=m68k ;;
9000/[678][0-9][0-9])
if [ -x /usr/bin/getconf ]; then
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
case "$sc_cpu_version" in
523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0
528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1
532) # CPU_PA_RISC2_0
case "$sc_kernel_bits" in
32) HP_ARCH=hppa2.0n ;;
64) HP_ARCH=hppa2.0w ;;
'') HP_ARCH=hppa2.0 ;; # HP-UX 10.20
esac ;;
esac
fi
if [ "$HP_ARCH" = "" ]; then
eval "$set_cc_for_build"
sed 's/^ //' << EOF > "$dummy.c"
#define _HPUX_SOURCE
#include <stdlib.h>
#include <unistd.h>
int main ()
{
#if defined(_SC_KERNEL_BITS)
long bits = sysconf(_SC_KERNEL_BITS);
#endif
long cpu = sysconf (_SC_CPU_VERSION);
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
case CPU_PA_RISC2_0:
#if defined(_SC_KERNEL_BITS)
switch (bits)
{
case 64: puts ("hppa2.0w"); break;
case 32: puts ("hppa2.0n"); break;
default: puts ("hppa2.0"); break;
} break;
#else /* !defined(_SC_KERNEL_BITS) */
puts ("hppa2.0"); break;
#endif
default: puts ("hppa1.0"); break;
}
exit (0);
}
EOF
(CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"`
test -z "$HP_ARCH" && HP_ARCH=hppa
fi ;;
esac
if [ "$HP_ARCH" = hppa2.0w ]
then
eval "$set_cc_for_build"
# hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
# 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
# generating 64-bit code. GNU and HP use different nomenclature:
#
# $ CC_FOR_BUILD=cc ./config.guess
# => hppa2.0w-hp-hpux11.23
# $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
# => hppa64-hp-hpux11.23
if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) |
grep -q __LP64__
then
HP_ARCH=hppa2.0w
else
HP_ARCH=hppa64
fi
fi
echo "$HP_ARCH"-hp-hpux"$HPUX_REV"
exit ;;
ia64:HP-UX:*:*)
HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'`
echo ia64-hp-hpux"$HPUX_REV"
exit ;;
3050*:HI-UX:*:*)
eval "$set_cc_for_build"
sed 's/^ //' << EOF > "$dummy.c"
#include <unistd.h>
int
main ()
{
long cpu = sysconf (_SC_CPU_VERSION);
/* The order matters, because CPU_IS_HP_MC68K erroneously returns
true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
results, however. */
if (CPU_IS_PA_RISC (cpu))
{
switch (cpu)
{
case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
default: puts ("hppa-hitachi-hiuxwe2"); break;
}
}
else if (CPU_IS_HP_MC68K (cpu))
puts ("m68k-hitachi-hiuxwe2");
else puts ("unknown-hitachi-hiuxwe2");
exit (0);
}
EOF
$CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` &&
{ echo "$SYSTEM_NAME"; exit; }
echo unknown-hitachi-hiuxwe2
exit ;;
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*)
echo hppa1.1-hp-bsd
exit ;;
9000/8??:4.3bsd:*:*)
echo hppa1.0-hp-bsd
exit ;;
*9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
echo hppa1.0-hp-mpeix
exit ;;
hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*)
echo hppa1.1-hp-osf
exit ;;
hp8??:OSF1:*:*)
echo hppa1.0-hp-osf
exit ;;
i*86:OSF1:*:*)
if [ -x /usr/sbin/sysversion ] ; then
echo "$UNAME_MACHINE"-unknown-osf1mk
else
echo "$UNAME_MACHINE"-unknown-osf1
fi
exit ;;
parisc*:Lites*:*:*)
echo hppa1.1-hp-lites
exit ;;
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
echo c1-convex-bsd
exit ;;
C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
if getsysinfo -f scalar_acc
then echo c32-convex-bsd
else echo c2-convex-bsd
fi
exit ;;
C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
echo c34-convex-bsd
exit ;;
C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
echo c38-convex-bsd
exit ;;
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
echo c4-convex-bsd
exit ;;
CRAY*Y-MP:*:*:*)
echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*[A-Z]90:*:*:*)
echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \
| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
-e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
-e 's/\.[^.]*$/.X/'
exit ;;
CRAY*TS:*:*:*)
echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*T3E:*:*:*)
echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
CRAY*SV1:*:*:*)
echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
*:UNICOS/mp:*:*)
echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/'
exit ;;
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'`
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
5000:UNIX_System_V:4.*:*)
FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'`
FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'`
echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
exit ;;
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE"
exit ;;
sparc*:BSD/OS:*:*)
echo sparc-unknown-bsdi"$UNAME_RELEASE"
exit ;;
*:BSD/OS:*:*)
echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE"
exit ;;
*:FreeBSD:*:*)
UNAME_PROCESSOR=`/usr/bin/uname -p`
case "$UNAME_PROCESSOR" in
amd64)
UNAME_PROCESSOR=x86_64 ;;
i386)
UNAME_PROCESSOR=i586 ;;
esac
echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
exit ;;
i*:CYGWIN*:*)
echo "$UNAME_MACHINE"-pc-cygwin
exit ;;
*:MINGW64*:*)
echo "$UNAME_MACHINE"-pc-mingw64
exit ;;
*:MINGW*:*)
echo "$UNAME_MACHINE"-pc-mingw32
exit ;;
*:MSYS*:*)
echo "$UNAME_MACHINE"-pc-msys
exit ;;
i*:PW*:*)
echo "$UNAME_MACHINE"-pc-pw32
exit ;;
*:Interix*:*)
case "$UNAME_MACHINE" in
x86)
echo i586-pc-interix"$UNAME_RELEASE"
exit ;;
authenticamd | genuineintel | EM64T)
echo x86_64-unknown-interix"$UNAME_RELEASE"
exit ;;
IA64)
echo ia64-unknown-interix"$UNAME_RELEASE"
exit ;;
esac ;;
i*:UWIN*:*)
echo "$UNAME_MACHINE"-pc-uwin
exit ;;
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-unknown-cygwin
exit ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
exit ;;
*:GNU:*:*)
# the GNU system
echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`"
exit ;;
*:GNU/*:*:*)
# other systems with GNU libc and userland
echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC"
exit ;;
i*86:Minix:*:*)
echo "$UNAME_MACHINE"-pc-minix
exit ;;
aarch64:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
aarch64_be:Linux:*:*)
UNAME_MACHINE=aarch64_be
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
alpha:Linux:*:*)
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
EV5) UNAME_MACHINE=alphaev5 ;;
EV56) UNAME_MACHINE=alphaev56 ;;
PCA56) UNAME_MACHINE=alphapca56 ;;
PCA57) UNAME_MACHINE=alphapca56 ;;
EV6) UNAME_MACHINE=alphaev6 ;;
EV67) UNAME_MACHINE=alphaev67 ;;
EV68*) UNAME_MACHINE=alphaev68 ;;
esac
objdump --private-headers /bin/sh | grep -q ld.so.1
if test "$?" = 0 ; then LIBC=gnulibc1 ; fi
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
arc:Linux:*:* | arceb:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
arm*:Linux:*:*)
eval "$set_cc_for_build"
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_EABI__
then
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
else
if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \
| grep -q __ARM_PCS_VFP
then
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi
else
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf
fi
fi
exit ;;
avr32*:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
cris:Linux:*:*)
echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
exit ;;
crisv32:Linux:*:*)
echo "$UNAME_MACHINE"-axis-linux-"$LIBC"
exit ;;
e2k:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
frv:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
hexagon:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
i*86:Linux:*:*)
echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
exit ;;
ia64:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
k1om:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
m32r*:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
m68*:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
mips:Linux:*:* | mips64:Linux:*:*)
eval "$set_cc_for_build"
sed 's/^ //' << EOF > "$dummy.c"
#undef CPU
#undef ${UNAME_MACHINE}
#undef ${UNAME_MACHINE}el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
CPU=${UNAME_MACHINE}el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
CPU=${UNAME_MACHINE}
#else
CPU=
#endif
#endif
EOF
eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`"
test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; }
;;
mips64el:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
openrisc*:Linux:*:*)
echo or1k-unknown-linux-"$LIBC"
exit ;;
or32:Linux:*:* | or1k*:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
padre:Linux:*:*)
echo sparc-unknown-linux-"$LIBC"
exit ;;
parisc64:Linux:*:* | hppa64:Linux:*:*)
echo hppa64-unknown-linux-"$LIBC"
exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;;
PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;;
*) echo hppa-unknown-linux-"$LIBC" ;;
esac
exit ;;
ppc64:Linux:*:*)
echo powerpc64-unknown-linux-"$LIBC"
exit ;;
ppc:Linux:*:*)
echo powerpc-unknown-linux-"$LIBC"
exit ;;
ppc64le:Linux:*:*)
echo powerpc64le-unknown-linux-"$LIBC"
exit ;;
ppcle:Linux:*:*)
echo powerpcle-unknown-linux-"$LIBC"
exit ;;
riscv32:Linux:*:* | riscv64:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo "$UNAME_MACHINE"-ibm-linux-"$LIBC"
exit ;;
sh64*:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
sh*:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
sparc:Linux:*:* | sparc64:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
tile*:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
vax:Linux:*:*)
echo "$UNAME_MACHINE"-dec-linux-"$LIBC"
exit ;;
x86_64:Linux:*:*)
echo "$UNAME_MACHINE"-pc-linux-"$LIBC"
exit ;;
xtensa*:Linux:*:*)
echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"
exit ;;
i*86:DYNIX/ptx:4*:*)
# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
# earlier versions are messed up and put the nodename in both
# sysname and nodename.
echo i386-sequent-sysv4
exit ;;
i*86:UNIX_SV:4.2MP:2.*)
# Unixware is an offshoot of SVR4, but it has its own version
# number series starting with 2...
# I am not positive that other SVR4 systems won't match this,
# I just have to hope. -- rms.
# Use sysv4.2uw... so that sysv4* matches it.
echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION"
exit ;;
i*86:OS/2:*:*)
# If we were able to find `uname', then EMX Unix compatibility
# is probably installed.
echo "$UNAME_MACHINE"-pc-os2-emx
exit ;;
i*86:XTS-300:*:STOP)
echo "$UNAME_MACHINE"-unknown-stop
exit ;;
i*86:atheos:*:*)
echo "$UNAME_MACHINE"-unknown-atheos
exit ;;
i*86:syllable:*:*)
echo "$UNAME_MACHINE"-pc-syllable
exit ;;
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
echo i386-unknown-lynxos"$UNAME_RELEASE"
exit ;;
i*86:*DOS:*:*)
echo "$UNAME_MACHINE"-pc-msdosdjgpp
exit ;;
i*86:*:4.*:*)
UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'`
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL"
else
echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL"
fi
exit ;;
i*86:*:5:[678]*)
# UnixWare 7.x, OpenUNIX and OpenServer 6.
case `/bin/uname -X | grep "^Machine"` in
*486*) UNAME_MACHINE=i486 ;;
*Pentium) UNAME_MACHINE=i586 ;;
*Pent*|*Celeron) UNAME_MACHINE=i686 ;;
esac
echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}"
exit ;;
i*86:*:3.2:*)
if test -f /usr/options/cb.name; then
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
echo "$UNAME_MACHINE"-pc-isc"$UNAME_REL"
elif /bin/uname -X 2>/dev/null >/dev/null ; then
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
&& UNAME_MACHINE=i586
(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
&& UNAME_MACHINE=i686
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
&& UNAME_MACHINE=i686
echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL"
else
echo "$UNAME_MACHINE"-pc-sysv32
fi
exit ;;
pc:*:*:*)
# Left here for compatibility:
# uname -m prints for DJGPP always 'pc', but it prints nothing about
# the processor, so we play safe by assuming i586.
# Note: whatever this is, it MUST be the same as what config.sub
# prints for the "djgpp" host, or else GDB configure will decide that
# this is a cross-build.
echo i586-pc-msdosdjgpp
exit ;;
Intel:Mach:3*:*)
echo i386-pc-mach3
exit ;;
paragon:*:*:*)
echo i860-intel-osf1
exit ;;
i860:*:4.*:*) # i860-SVR4
if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4
else # Add other i860-SVR4 vendors below as they are discovered.
echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4
fi
exit ;;
mini*:CTIX:SYS*5:*)
# "miniframe"
echo m68010-convergent-sysv
exit ;;
mc68k:UNIX:SYSTEM5:3.51m)
echo m68k-convergent-sysv
exit ;;
M680?0:D-NIX:5.3:*)
echo m68k-diab-dnix
exit ;;
M68*:*:R3V[5678]*:*)
test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
OS_REL=''
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4; exit; } ;;
NCR*:*:4.2:* | MPRAS*:*:4.2:*)
OS_REL='.3'
test -r /etc/.relid \
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
&& { echo i486-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
&& { echo i586-ncr-sysv4.3"$OS_REL"; exit; }
/bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
&& { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;;
m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
echo m68k-unknown-lynxos"$UNAME_RELEASE"
exit ;;
mc68030:UNIX_System_V:4.*:*)
echo m68k-atari-sysv4
exit ;;
TSUNAMI:LynxOS:2.*:*)
echo sparc-unknown-lynxos"$UNAME_RELEASE"
exit ;;
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos"$UNAME_RELEASE"
exit ;;
PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
echo powerpc-unknown-lynxos"$UNAME_RELEASE"
exit ;;
SM[BE]S:UNIX_SV:*:*)
echo mips-dde-sysv"$UNAME_RELEASE"
exit ;;
RM*:ReliantUNIX-*:*:*)
echo mips-sni-sysv4
exit ;;
RM*:SINIX-*:*:*)
echo mips-sni-sysv4
exit ;;
*:SINIX-*:*:*)
if uname -p 2>/dev/null >/dev/null ; then
UNAME_MACHINE=`(uname -p) 2>/dev/null`
echo "$UNAME_MACHINE"-sni-sysv4
else
echo ns32k-sni-sysv
fi
exit ;;
PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
# says <Richard.M.Bartel@ccMail.Census.GOV>
echo i586-unisys-sysv4
exit ;;
*:UNIX_System_V:4*:FTX*)
# From Gerald Hewes <hewes@openmarket.com>.
# How about differentiating between stratus architectures? -djm
echo hppa1.1-stratus-sysv4
exit ;;
*:*:*:FTX*)
# From seanf@swdc.stratus.com.
echo i860-stratus-sysv4
exit ;;
i*86:VOS:*:*)
# From Paul.Green@stratus.com.
echo "$UNAME_MACHINE"-stratus-vos
exit ;;
*:VOS:*:*)
# From Paul.Green@stratus.com.
echo hppa1.1-stratus-vos
exit ;;
mc68*:A/UX:*:*)
echo m68k-apple-aux"$UNAME_RELEASE"
exit ;;
news*:NEWS-OS:6*:*)
echo mips-sony-newsos6
exit ;;
R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
if [ -d /usr/nec ]; then
echo mips-nec-sysv"$UNAME_RELEASE"
else
echo mips-unknown-sysv"$UNAME_RELEASE"
fi
exit ;;
BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
echo powerpc-be-beos
exit ;;
BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
echo powerpc-apple-beos
exit ;;
BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
echo i586-pc-beos
exit ;;
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
x86_64:Haiku:*:*)
echo x86_64-unknown-haiku
exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux"$UNAME_RELEASE"
exit ;;
SX-5:SUPER-UX:*:*)
echo sx5-nec-superux"$UNAME_RELEASE"
exit ;;
SX-6:SUPER-UX:*:*)
echo sx6-nec-superux"$UNAME_RELEASE"
exit ;;
SX-7:SUPER-UX:*:*)
echo sx7-nec-superux"$UNAME_RELEASE"
exit ;;
SX-8:SUPER-UX:*:*)
echo sx8-nec-superux"$UNAME_RELEASE"
exit ;;
SX-8R:SUPER-UX:*:*)
echo sx8r-nec-superux"$UNAME_RELEASE"
exit ;;
SX-ACE:SUPER-UX:*:*)
echo sxace-nec-superux"$UNAME_RELEASE"
exit ;;
Power*:Rhapsody:*:*)
echo powerpc-apple-rhapsody"$UNAME_RELEASE"
exit ;;
*:Rhapsody:*:*)
echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE"
exit ;;
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
eval "$set_cc_for_build"
if test "$UNAME_PROCESSOR" = unknown ; then
UNAME_PROCESSOR=powerpc
fi
if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then
if [ "$CC_FOR_BUILD" != no_compiler_found ]; then
if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_64BIT_ARCH >/dev/null
then
case $UNAME_PROCESSOR in
i386) UNAME_PROCESSOR=x86_64 ;;
powerpc) UNAME_PROCESSOR=powerpc64 ;;
esac
fi
# On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc
if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \
(CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \
grep IS_PPC >/dev/null
then
UNAME_PROCESSOR=powerpc
fi
fi
elif test "$UNAME_PROCESSOR" = i386 ; then
# Avoid executing cc on OS X 10.9, as it ships with a stub
# that puts up a graphical alert prompting to install
# developer tools. Any system running Mac OS X 10.7 or
# later (Darwin 11 and later) is required to have a 64-bit
# processor. This is not true of the ARM version of Darwin
# that Apple uses in portable devices.
UNAME_PROCESSOR=x86_64
fi
echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE"
exit ;;
*:procnto*:*:* | *:QNX:[0123456789]*:*)
UNAME_PROCESSOR=`uname -p`
if test "$UNAME_PROCESSOR" = x86; then
UNAME_PROCESSOR=i386
UNAME_MACHINE=pc
fi
echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE"
exit ;;
*:QNX:*:4*)
echo i386-pc-qnx
exit ;;
NEO-*:NONSTOP_KERNEL:*:*)
echo neo-tandem-nsk"$UNAME_RELEASE"
exit ;;
NSE-*:NONSTOP_KERNEL:*:*)
echo nse-tandem-nsk"$UNAME_RELEASE"
exit ;;
NSR-*:NONSTOP_KERNEL:*:*)
echo nsr-tandem-nsk"$UNAME_RELEASE"
exit ;;
NSV-*:NONSTOP_KERNEL:*:*)
echo nsv-tandem-nsk"$UNAME_RELEASE"
exit ;;
NSX-*:NONSTOP_KERNEL:*:*)
echo nsx-tandem-nsk"$UNAME_RELEASE"
exit ;;
*:NonStop-UX:*:*)
echo mips-compaq-nonstopux
exit ;;
BS2000:POSIX*:*:*)
echo bs2000-siemens-sysv
exit ;;
DS/*:UNIX_System_V:*:*)
echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE"
exit ;;
*:Plan9:*:*)
# "uname -m" is not consistent, so use $cputype instead. 386
# is converted to i386 for consistency with other x86
# operating systems.
if test "$cputype" = 386; then
UNAME_MACHINE=i386
else
UNAME_MACHINE="$cputype"
fi
echo "$UNAME_MACHINE"-unknown-plan9
exit ;;
*:TOPS-10:*:*)
echo pdp10-unknown-tops10
exit ;;
*:TENEX:*:*)
echo pdp10-unknown-tenex
exit ;;
KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
echo pdp10-dec-tops20
exit ;;
XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
echo pdp10-xkl-tops20
exit ;;
*:TOPS-20:*:*)
echo pdp10-unknown-tops20
exit ;;
*:ITS:*:*)
echo pdp10-unknown-its
exit ;;
SEI:*:*:SEIUX)
echo mips-sei-seiux"$UNAME_RELEASE"
exit ;;
*:DragonFly:*:*)
echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`"
exit ;;
*:*VMS:*:*)
UNAME_MACHINE=`(uname -p) 2>/dev/null`
case "$UNAME_MACHINE" in
A*) echo alpha-dec-vms ; exit ;;
I*) echo ia64-dec-vms ; exit ;;
V*) echo vax-dec-vms ; exit ;;
esac ;;
*:XENIX:*:SysV)
echo i386-pc-xenix
exit ;;
i*86:skyos:*:*)
echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`"
exit ;;
i*86:rdos:*:*)
echo "$UNAME_MACHINE"-pc-rdos
exit ;;
i*86:AROS:*:*)
echo "$UNAME_MACHINE"-pc-aros
exit ;;
x86_64:VMkernel:*:*)
echo "$UNAME_MACHINE"-unknown-esx
exit ;;
amd64:Isilon\ OneFS:*:*)
echo x86_64-unknown-onefs
exit ;;
esac
echo "$0: unable to guess system type" >&2
case "$UNAME_MACHINE:$UNAME_SYSTEM" in
mips:Linux | mips64:Linux)
# If we got here on MIPS GNU/Linux, output extra information.
cat >&2 <<EOF
NOTE: MIPS GNU/Linux systems require a C compiler to fully recognize
the system type. Please install a C compiler and try again.
EOF
;;
esac
cat >&2 <<EOF
This script (version $timestamp), has failed to recognize the
operating system you are using. If your script is old, overwrite *all*
copies of config.guess and config.sub with the latest versions from:
https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess
and
https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
If $0 has already been updated, send the following data and any
information you think might be pertinent to config-patches@gnu.org to
provide the necessary information to handle your system.
config.guess timestamp = $timestamp
uname -m = `(uname -m) 2>/dev/null || echo unknown`
uname -r = `(uname -r) 2>/dev/null || echo unknown`
uname -s = `(uname -s) 2>/dev/null || echo unknown`
uname -v = `(uname -v) 2>/dev/null || echo unknown`
/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
hostinfo = `(hostinfo) 2>/dev/null`
/bin/universe = `(/bin/universe) 2>/dev/null`
/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
/bin/arch = `(/bin/arch) 2>/dev/null`
/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
UNAME_MACHINE = "$UNAME_MACHINE"
UNAME_RELEASE = "$UNAME_RELEASE"
UNAME_SYSTEM = "$UNAME_SYSTEM"
UNAME_VERSION = "$UNAME_VERSION"
EOF
exit 1
# Local variables:
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:
PK (��\ N=8� 8�
config.subnu ȯ�� #! /bin/sh
# Configuration validation subroutine script.
# Copyright 1992-2018 Free Software Foundation, Inc.
timestamp='2018-05-05'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <https://www.gnu.org/licenses/>.
#
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that
# program. This Exception is an additional permission under section 7
# of the GNU General Public License, version 3 ("GPLv3").
# Please send patches to <config-patches@gnu.org>.
#
# Configuration subroutine to validate and canonicalize a configuration type.
# Supply the specified configuration type as an argument.
# If it is invalid, we print an error message on stderr and exit with code 1.
# Otherwise, we print the canonical config type on stdout and succeed.
# You can get the latest version of this script from:
# https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub
# This file is supposed to be the same for all GNU packages
# and recognize all the CPU types, system types and aliases
# that are meaningful with *any* GNU software.
# Each package is responsible for reporting which valid configurations
# it does not support. The user should be able to distinguish
# a failure to support a valid configuration from a meaningless
# configuration.
# The goal of this file is to map all the various variations of a given
# machine specification into a single specification in the form:
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
# or in some cases, the newer four-part form:
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
# It is wrong to echo any other type of specification.
me=`echo "$0" | sed -e 's,.*/,,'`
usage="\
Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS
Canonicalize a configuration name.
Options:
-h, --help print this help, then exit
-t, --time-stamp print date of last modification, then exit
-v, --version print version number, then exit
Report bugs and patches to <config-patches@gnu.org>."
version="\
GNU config.sub ($timestamp)
Copyright 1992-2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
help="
Try \`$me --help' for more information."
# Parse command line
while test $# -gt 0 ; do
case $1 in
--time-stamp | --time* | -t )
echo "$timestamp" ; exit ;;
--version | -v )
echo "$version" ; exit ;;
--help | --h* | -h )
echo "$usage"; exit ;;
-- ) # Stop option processing
shift; break ;;
- ) # Use stdin as input.
break ;;
-* )
echo "$me: invalid option $1$help"
exit 1 ;;
*local*)
# First pass through any local machine types.
echo "$1"
exit ;;
* )
break ;;
esac
done
case $# in
0) echo "$me: missing argument$help" >&2
exit 1;;
1) ;;
*) echo "$me: too many arguments$help" >&2
exit 1;;
esac
# Spilt fields of configuration type
IFS="-" read -r field1 field2 field3 field4 <<EOF
$1
EOF
# Separate into logical components for further validation
case $1 in
*-*-*-*)
basic_machine=$field1-$field2
os=-$field3-$field4
;;
*-*-*)
# Ambiguous whether COMPANY is present, or skipped and KERNEL-OS is two
# parts
maybe_os=$field2-$field3
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc \
| linux-newlib* | linux-musl* | linux-uclibc* | uclinux-uclibc* \
| uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* \
| netbsd*-eabi* | kopensolaris*-gnu* | cloudabi*-eabi* \
| storm-chaos* | os2-emx* | rtmk-nova*)
basic_machine=$field1
os=-$maybe_os
;;
android-linux)
basic_machine=$field1-unknown
os=-linux-android
;;
*)
basic_machine=$field1-$field2
os=-$field3
;;
esac
;;
*-*)
basic_machine=$field1
os=-$field2
;;
*)
basic_machine=$1
os=
;;
esac
### Let's recognize common machines as not being operating systems so
### that things like config.sub decstation-3100 work. We also
### recognize some manufacturers as not being operating systems, so we
### can provide default operating systems below.
case $os in
-sun*os*)
# Prevent following clause from handling this invalid input.
;;
-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
-apple | -axis | -knuth | -cray | -microblaze*)
os=
basic_machine=$1
;;
-bluegene*)
os=-cnk
;;
-sim | -cisco | -oki | -wec | -winbond)
os=
basic_machine=$1
;;
-scout)
;;
-wrs)
os=-vxworks
basic_machine=$1
;;
-chorusos*)
os=-chorusos
basic_machine=$1
;;
-chorusrdb)
os=-chorusrdb
basic_machine=$1
;;
-hiux*)
os=-hiuxwe2
;;
-sco6)
os=-sco5v6
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-sco5)
os=-sco3.2v5
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-sco4)
os=-sco3.2v4
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2.[4-9]*)
os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-sco3.2v[4-9]*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-sco5v6*)
# Don't forget version if it is 3.2v4 or newer.
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-sco*)
os=-sco3.2v2
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-udk*)
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-isc)
os=-isc2.2
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-clix*)
basic_machine=clipper-intergraph
;;
-isc*)
basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'`
;;
-lynx*178)
os=-lynxos178
;;
-lynx*5)
os=-lynxos5
;;
-lynx*)
os=-lynxos
;;
-ptx*)
basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'`
;;
-psos*)
os=-psos
;;
-mint | -mint[0-9]*)
basic_machine=m68k-atari
os=-mint
;;
esac
# Decode aliases for certain CPU-COMPANY combinations.
case $basic_machine in
# Recognize the basic CPU types without company name.
# Some are omitted here because they have special meanings below.
1750a | 580 \
| a29k \
| aarch64 | aarch64_be \
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
| arc | arceb \
| arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv6m | armv[78][arm] \
| avr | avr32 \
| ba \
| be32 | be64 \
| bfin \
| c4x | c8051 | clipper | csky \
| d10v | d30v | dlx | dsp16xx \
| e2k | epiphany \
| fido | fr30 | frv | ft32 \
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
| hexagon \
| i370 | i860 | i960 | ia16 | ia64 \
| ip2k | iq2000 \
| k1om \
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
| maxq | mb | microblaze | microblazeel | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
| mips64octeon | mips64octeonel \
| mips64orion | mips64orionel \
| mips64r5900 | mips64r5900el \
| mips64vr | mips64vrel \
| mips64vr4100 | mips64vr4100el \
| mips64vr4300 | mips64vr4300el \
| mips64vr5000 | mips64vr5000el \
| mips64vr5900 | mips64vr5900el \
| mipsisa32 | mipsisa32el \
| mipsisa32r2 | mipsisa32r2el \
| mipsisa32r6 | mipsisa32r6el \
| mipsisa64 | mipsisa64el \
| mipsisa64r2 | mipsisa64r2el \
| mipsisa64r6 | mipsisa64r6el \
| mipsisa64sb1 | mipsisa64sb1el \
| mipsisa64sr71k | mipsisa64sr71kel \
| mipsr5900 | mipsr5900el \
| mipstx39 | mipstx39el \
| mn10200 | mn10300 \
| moxie \
| mt \
| msp430 \
| nds32 | nds32le | nds32be \
| nfp \
| nios | nios2 | nios2eb | nios2el \
| ns16k | ns32k \
| open8 | or1k | or1knd | or32 \
| pdp10 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle \
| pru \
| pyramid \
| riscv32 | riscv64 \
| rl78 | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
| sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu \
| tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
| ubicom32 \
| v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \
| visium \
| wasm32 \
| x86 | xc16x | xstormy16 | xtensa \
| z8k | z80)
basic_machine=$basic_machine-unknown
;;
c54x)
basic_machine=tic54x-unknown
;;
c55x)
basic_machine=tic55x-unknown
;;
c6x)
basic_machine=tic6x-unknown
;;
leon|leon[3-9])
basic_machine=sparc-$basic_machine
;;
m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip)
basic_machine=$basic_machine-unknown
os=-none
;;
m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65)
;;
m9s12z | m68hcs12z | hcs12z | s12z)
basic_machine=s12z-unknown
os=-none
;;
ms1)
basic_machine=mt-unknown
;;
strongarm | thumb | xscale)
basic_machine=arm-unknown
;;
xgate)
basic_machine=$basic_machine-unknown
os=-none
;;
xscaleeb)
basic_machine=armeb-unknown
;;
xscaleel)
basic_machine=armel-unknown
;;
# We use `pc' rather than `unknown'
# because (1) that's what they normally are, and
# (2) the word "unknown" tends to confuse beginning users.
i*86 | x86_64)
basic_machine=$basic_machine-pc
;;
# Object if more than one company name word.
*-*-*)
echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
exit 1
;;
# Recognize the basic CPU types with company name.
580-* \
| a29k-* \
| aarch64-* | aarch64_be-* \
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
| avr-* | avr32-* \
| ba-* \
| be32-* | be64-* \
| bfin-* | bs2000-* \
| c[123]* | c30-* | [cjt]90-* | c4x-* \
| c8051-* | clipper-* | craynv-* | csky-* | cydra-* \
| d10v-* | d30v-* | dlx-* \
| e2k-* | elxsi-* \
| f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
| h8300-* | h8500-* \
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
| hexagon-* \
| i*86-* | i860-* | i960-* | ia16-* | ia64-* \
| ip2k-* | iq2000-* \
| k1om-* \
| le32-* | le64-* \
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
| m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
| microblaze-* | microblazeel-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
| mips64octeon-* | mips64octeonel-* \
| mips64orion-* | mips64orionel-* \
| mips64r5900-* | mips64r5900el-* \
| mips64vr-* | mips64vrel-* \
| mips64vr4100-* | mips64vr4100el-* \
| mips64vr4300-* | mips64vr4300el-* \
| mips64vr5000-* | mips64vr5000el-* \
| mips64vr5900-* | mips64vr5900el-* \
| mipsisa32-* | mipsisa32el-* \
| mipsisa32r2-* | mipsisa32r2el-* \
| mipsisa32r6-* | mipsisa32r6el-* \
| mipsisa64-* | mipsisa64el-* \
| mipsisa64r2-* | mipsisa64r2el-* \
| mipsisa64r6-* | mipsisa64r6el-* \
| mipsisa64sb1-* | mipsisa64sb1el-* \
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
| mipsr5900-* | mipsr5900el-* \
| mipstx39-* | mipstx39el-* \
| mmix-* \
| mt-* \
| msp430-* \
| nds32-* | nds32le-* | nds32be-* \
| nfp-* \
| nios-* | nios2-* | nios2eb-* | nios2el-* \
| none-* | np1-* | ns16k-* | ns32k-* \
| open8-* \
| or1k*-* \
| orion-* \
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \
| pru-* \
| pyramid-* \
| riscv32-* | riscv64-* \
| rl78-* | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
| sparclite-* \
| sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \
| tahoe-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
| tile*-* \
| tron-* \
| ubicom32-* \
| v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \
| vax-* \
| visium-* \
| wasm32-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* \
| xstormy16-* | xtensa*-* \
| ymp-* \
| z8k-* | z80-*)
;;
# Recognize the basic CPU types without company name, with glob match.
xtensa*)
basic_machine=$basic_machine-unknown
;;
# Recognize the various machine names and aliases which stand
# for a CPU type and a company and sometimes even an OS.
386bsd)
basic_machine=i386-pc
os=-bsd
;;
3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
basic_machine=m68000-att
;;
3b*)
basic_machine=we32k-att
;;
a29khif)
basic_machine=a29k-amd
os=-udi
;;
abacus)
basic_machine=abacus-unknown
;;
adobe68k)
basic_machine=m68010-adobe
os=-scout
;;
alliant | fx80)
basic_machine=fx80-alliant
;;
altos | altos3068)
basic_machine=m68k-altos
;;
am29k)
basic_machine=a29k-none
os=-bsd
;;
amd64)
basic_machine=x86_64-pc
;;
amd64-*)
basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
amdahl)
basic_machine=580-amdahl
os=-sysv
;;
amiga | amiga-*)
basic_machine=m68k-unknown
;;
amigaos | amigados)
basic_machine=m68k-unknown
os=-amigaos
;;
amigaunix | amix)
basic_machine=m68k-unknown
os=-sysv4
;;
apollo68)
basic_machine=m68k-apollo
os=-sysv
;;
apollo68bsd)
basic_machine=m68k-apollo
os=-bsd
;;
aros)
basic_machine=i386-pc
os=-aros
;;
asmjs)
basic_machine=asmjs-unknown
;;
aux)
basic_machine=m68k-apple
os=-aux
;;
balance)
basic_machine=ns32k-sequent
os=-dynix
;;
blackfin)
basic_machine=bfin-unknown
os=-linux
;;
blackfin-*)
basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'`
os=-linux
;;
bluegene*)
basic_machine=powerpc-ibm
os=-cnk
;;
c54x-*)
basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
c55x-*)
basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
c6x-*)
basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
c90)
basic_machine=c90-cray
os=-unicos
;;
cegcc)
basic_machine=arm-unknown
os=-cegcc
;;
convex-c1)
basic_machine=c1-convex
os=-bsd
;;
convex-c2)
basic_machine=c2-convex
os=-bsd
;;
convex-c32)
basic_machine=c32-convex
os=-bsd
;;
convex-c34)
basic_machine=c34-convex
os=-bsd
;;
convex-c38)
basic_machine=c38-convex
os=-bsd
;;
cray | j90)
basic_machine=j90-cray
os=-unicos
;;
craynv)
basic_machine=craynv-cray
os=-unicosmp
;;
cr16 | cr16-*)
basic_machine=cr16-unknown
os=-elf
;;
crds | unos)
basic_machine=m68k-crds
;;
crisv32 | crisv32-* | etraxfs*)
basic_machine=crisv32-axis
;;
cris | cris-* | etrax*)
basic_machine=cris-axis
;;
crx)
basic_machine=crx-unknown
os=-elf
;;
da30 | da30-*)
basic_machine=m68k-da30
;;
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
basic_machine=mips-dec
;;
decsystem10* | dec10*)
basic_machine=pdp10-dec
os=-tops10
;;
decsystem20* | dec20*)
basic_machine=pdp10-dec
os=-tops20
;;
delta | 3300 | motorola-3300 | motorola-delta \
| 3300-motorola | delta-motorola)
basic_machine=m68k-motorola
;;
delta88)
basic_machine=m88k-motorola
os=-sysv3
;;
dicos)
basic_machine=i686-pc
os=-dicos
;;
djgpp)
basic_machine=i586-pc
os=-msdosdjgpp
;;
dpx20 | dpx20-*)
basic_machine=rs6000-bull
os=-bosx
;;
dpx2*)
basic_machine=m68k-bull
os=-sysv3
;;
e500v[12])
basic_machine=powerpc-unknown
os=$os"spe"
;;
e500v[12]-*)
basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
os=$os"spe"
;;
ebmon29k)
basic_machine=a29k-amd
os=-ebmon
;;
elxsi)
basic_machine=elxsi-elxsi
os=-bsd
;;
encore | umax | mmax)
basic_machine=ns32k-encore
;;
es1800 | OSE68k | ose68k | ose | OSE)
basic_machine=m68k-ericsson
os=-ose
;;
fx2800)
basic_machine=i860-alliant
;;
genix)
basic_machine=ns32k-ns
;;
gmicro)
basic_machine=tron-gmicro
os=-sysv
;;
go32)
basic_machine=i386-pc
os=-go32
;;
h3050r* | hiux*)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
;;
h8300hms)
basic_machine=h8300-hitachi
os=-hms
;;
h8300xray)
basic_machine=h8300-hitachi
os=-xray
;;
h8500hms)
basic_machine=h8500-hitachi
os=-hms
;;
harris)
basic_machine=m88k-harris
os=-sysv3
;;
hp300-*)
basic_machine=m68k-hp
;;
hp300bsd)
basic_machine=m68k-hp
os=-bsd
;;
hp300hpux)
basic_machine=m68k-hp
os=-hpux
;;
hp3k9[0-9][0-9] | hp9[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hp9k2[0-9][0-9] | hp9k31[0-9])
basic_machine=m68000-hp
;;
hp9k3[2-9][0-9])
basic_machine=m68k-hp
;;
hp9k6[0-9][0-9] | hp6[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hp9k7[0-79][0-9] | hp7[0-79][0-9])
basic_machine=hppa1.1-hp
;;
hp9k78[0-9] | hp78[0-9])
# FIXME: really hppa2.0-hp
basic_machine=hppa1.1-hp
;;
hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
# FIXME: really hppa2.0-hp
basic_machine=hppa1.1-hp
;;
hp9k8[0-9][13679] | hp8[0-9][13679])
basic_machine=hppa1.1-hp
;;
hp9k8[0-9][0-9] | hp8[0-9][0-9])
basic_machine=hppa1.0-hp
;;
hppaosf)
basic_machine=hppa1.1-hp
os=-osf
;;
hppro)
basic_machine=hppa1.1-hp
os=-proelf
;;
i370-ibm* | ibm*)
basic_machine=i370-ibm
;;
i*86v32)
basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
os=-sysv32
;;
i*86v4*)
basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
os=-sysv4
;;
i*86v)
basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
os=-sysv
;;
i*86sol2)
basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'`
os=-solaris2
;;
i386mach)
basic_machine=i386-mach
os=-mach
;;
vsta)
basic_machine=i386-unknown
os=-vsta
;;
iris | iris4d)
basic_machine=mips-sgi
case $os in
-irix*)
;;
*)
os=-irix4
;;
esac
;;
isi68 | isi)
basic_machine=m68k-isi
os=-sysv
;;
leon-*|leon[3-9]-*)
basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'`
;;
m68knommu)
basic_machine=m68k-unknown
os=-linux
;;
m68knommu-*)
basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'`
os=-linux
;;
magnum | m3230)
basic_machine=mips-mips
os=-sysv
;;
merlin)
basic_machine=ns32k-utek
os=-sysv
;;
microblaze*)
basic_machine=microblaze-xilinx
;;
mingw64)
basic_machine=x86_64-pc
os=-mingw64
;;
mingw32)
basic_machine=i686-pc
os=-mingw32
;;
mingw32ce)
basic_machine=arm-unknown
os=-mingw32ce
;;
miniframe)
basic_machine=m68000-convergent
;;
*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
basic_machine=m68k-atari
os=-mint
;;
mips3*-*)
basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`
;;
mips3*)
basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown
;;
monitor)
basic_machine=m68k-rom68k
os=-coff
;;
morphos)
basic_machine=powerpc-unknown
os=-morphos
;;
moxiebox)
basic_machine=moxie-unknown
os=-moxiebox
;;
msdos)
basic_machine=i386-pc
os=-msdos
;;
ms1-*)
basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'`
;;
msys)
basic_machine=i686-pc
os=-msys
;;
mvs)
basic_machine=i370-ibm
os=-mvs
;;
nacl)
basic_machine=le32-unknown
os=-nacl
;;
ncr3000)
basic_machine=i486-ncr
os=-sysv4
;;
netbsd386)
basic_machine=i386-unknown
os=-netbsd
;;
netwinder)
basic_machine=armv4l-rebel
os=-linux
;;
news | news700 | news800 | news900)
basic_machine=m68k-sony
os=-newsos
;;
news1000)
basic_machine=m68030-sony
os=-newsos
;;
news-3600 | risc-news)
basic_machine=mips-sony
os=-newsos
;;
necv70)
basic_machine=v70-nec
os=-sysv
;;
next | m*-next)
basic_machine=m68k-next
case $os in
-nextstep* )
;;
-ns2*)
os=-nextstep2
;;
*)
os=-nextstep3
;;
esac
;;
nh3000)
basic_machine=m68k-harris
os=-cxux
;;
nh[45]000)
basic_machine=m88k-harris
os=-cxux
;;
nindy960)
basic_machine=i960-intel
os=-nindy
;;
mon960)
basic_machine=i960-intel
os=-mon960
;;
nonstopux)
basic_machine=mips-compaq
os=-nonstopux
;;
np1)
basic_machine=np1-gould
;;
neo-tandem)
basic_machine=neo-tandem
;;
nse-tandem)
basic_machine=nse-tandem
;;
nsr-tandem)
basic_machine=nsr-tandem
;;
nsv-tandem)
basic_machine=nsv-tandem
;;
nsx-tandem)
basic_machine=nsx-tandem
;;
op50n-* | op60c-*)
basic_machine=hppa1.1-oki
os=-proelf
;;
openrisc | openrisc-*)
basic_machine=or32-unknown
;;
os400)
basic_machine=powerpc-ibm
os=-os400
;;
OSE68000 | ose68000)
basic_machine=m68000-ericsson
os=-ose
;;
os68k)
basic_machine=m68k-none
os=-os68k
;;
pa-hitachi)
basic_machine=hppa1.1-hitachi
os=-hiuxwe2
;;
paragon)
basic_machine=i860-intel
os=-osf
;;
parisc)
basic_machine=hppa-unknown
os=-linux
;;
parisc-*)
basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'`
os=-linux
;;
pbd)
basic_machine=sparc-tti
;;
pbb)
basic_machine=m68k-tti
;;
pc532 | pc532-*)
basic_machine=ns32k-pc532
;;
pc98)
basic_machine=i386-pc
;;
pc98-*)
basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pentium | p5 | k5 | k6 | nexgen | viac3)
basic_machine=i586-pc
;;
pentiumpro | p6 | 6x86 | athlon | athlon_*)
basic_machine=i686-pc
;;
pentiumii | pentium2 | pentiumiii | pentium3)
basic_machine=i686-pc
;;
pentium4)
basic_machine=i786-pc
;;
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pentiumpro-* | p6-* | 6x86-* | athlon-*)
basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pentium4-*)
basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
pn)
basic_machine=pn-gould
;;
power) basic_machine=power-ibm
;;
ppc | ppcbe) basic_machine=powerpc-unknown
;;
ppc-* | ppcbe-*)
basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
ppcle | powerpclittle)
basic_machine=powerpcle-unknown
;;
ppcle-* | powerpclittle-*)
basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
ppc64) basic_machine=powerpc64-unknown
;;
ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
ppc64le | powerpc64little)
basic_machine=powerpc64le-unknown
;;
ppc64le-* | powerpc64little-*)
basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
ps2)
basic_machine=i386-ibm
;;
pw32)
basic_machine=i586-unknown
os=-pw32
;;
rdos | rdos64)
basic_machine=x86_64-pc
os=-rdos
;;
rdos32)
basic_machine=i386-pc
os=-rdos
;;
rom68k)
basic_machine=m68k-rom68k
os=-coff
;;
rm[46]00)
basic_machine=mips-siemens
;;
rtpc | rtpc-*)
basic_machine=romp-ibm
;;
s390 | s390-*)
basic_machine=s390-ibm
;;
s390x | s390x-*)
basic_machine=s390x-ibm
;;
sa29200)
basic_machine=a29k-amd
os=-udi
;;
sb1)
basic_machine=mipsisa64sb1-unknown
;;
sb1el)
basic_machine=mipsisa64sb1el-unknown
;;
sde)
basic_machine=mipsisa32-sde
os=-elf
;;
sei)
basic_machine=mips-sei
os=-seiux
;;
sequent)
basic_machine=i386-sequent
;;
sh5el)
basic_machine=sh5le-unknown
;;
simso-wrs)
basic_machine=sparclite-wrs
os=-vxworks
;;
sps7)
basic_machine=m68k-bull
os=-sysv2
;;
spur)
basic_machine=spur-unknown
;;
st2000)
basic_machine=m68k-tandem
;;
stratus)
basic_machine=i860-stratus
os=-sysv4
;;
strongarm-* | thumb-*)
basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'`
;;
sun2)
basic_machine=m68000-sun
;;
sun2os3)
basic_machine=m68000-sun
os=-sunos3
;;
sun2os4)
basic_machine=m68000-sun
os=-sunos4
;;
sun3os3)
basic_machine=m68k-sun
os=-sunos3
;;
sun3os4)
basic_machine=m68k-sun
os=-sunos4
;;
sun4os3)
basic_machine=sparc-sun
os=-sunos3
;;
sun4os4)
basic_machine=sparc-sun
os=-sunos4
;;
sun4sol2)
basic_machine=sparc-sun
os=-solaris2
;;
sun3 | sun3-*)
basic_machine=m68k-sun
;;
sun4)
basic_machine=sparc-sun
;;
sun386 | sun386i | roadrunner)
basic_machine=i386-sun
;;
sv1)
basic_machine=sv1-cray
os=-unicos
;;
symmetry)
basic_machine=i386-sequent
os=-dynix
;;
t3e)
basic_machine=alphaev5-cray
os=-unicos
;;
t90)
basic_machine=t90-cray
os=-unicos
;;
tile*)
basic_machine=$basic_machine-unknown
os=-linux-gnu
;;
tx39)
basic_machine=mipstx39-unknown
;;
tx39el)
basic_machine=mipstx39el-unknown
;;
toad1)
basic_machine=pdp10-xkl
os=-tops20
;;
tower | tower-32)
basic_machine=m68k-ncr
;;
tpf)
basic_machine=s390x-ibm
os=-tpf
;;
udi29k)
basic_machine=a29k-amd
os=-udi
;;
ultra3)
basic_machine=a29k-nyu
os=-sym1
;;
v810 | necv810)
basic_machine=v810-nec
os=-none
;;
vaxv)
basic_machine=vax-dec
os=-sysv
;;
vms)
basic_machine=vax-dec
os=-vms
;;
vpp*|vx|vx-*)
basic_machine=f301-fujitsu
;;
vxworks960)
basic_machine=i960-wrs
os=-vxworks
;;
vxworks68)
basic_machine=m68k-wrs
os=-vxworks
;;
vxworks29k)
basic_machine=a29k-wrs
os=-vxworks
;;
w65*)
basic_machine=w65-wdc
os=-none
;;
w89k-*)
basic_machine=hppa1.1-winbond
os=-proelf
;;
x64)
basic_machine=x86_64-pc
;;
xbox)
basic_machine=i686-pc
os=-mingw32
;;
xps | xps100)
basic_machine=xps100-honeywell
;;
xscale-* | xscalee[bl]-*)
basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'`
;;
ymp)
basic_machine=ymp-cray
os=-unicos
;;
none)
basic_machine=none-none
os=-none
;;
# Here we handle the default manufacturer of certain CPU types. It is in
# some cases the only manufacturer, in others, it is the most popular.
w89k)
basic_machine=hppa1.1-winbond
;;
op50n)
basic_machine=hppa1.1-oki
;;
op60c)
basic_machine=hppa1.1-oki
;;
romp)
basic_machine=romp-ibm
;;
mmix)
basic_machine=mmix-knuth
;;
rs6000)
basic_machine=rs6000-ibm
;;
vax)
basic_machine=vax-dec
;;
pdp11)
basic_machine=pdp11-dec
;;
we32k)
basic_machine=we32k-att
;;
sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
basic_machine=sh-unknown
;;
cydra)
basic_machine=cydra-cydrome
;;
orion)
basic_machine=orion-highlevel
;;
orion105)
basic_machine=clipper-highlevel
;;
mac | mpw | mac-mpw)
basic_machine=m68k-apple
;;
pmac | pmac-mpw)
basic_machine=powerpc-apple
;;
*-unknown)
# Make sure to match an already-canonicalized machine name.
;;
*)
echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2
exit 1
;;
esac
# Here we canonicalize certain aliases for manufacturers.
case $basic_machine in
*-digital*)
basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'`
;;
*-commodore*)
basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'`
;;
*)
;;
esac
# Decode manufacturer-specific aliases for certain operating systems.
if [ x$os != x ]
then
case $os in
# First match some system type aliases that might get confused
# with valid system types.
# -solaris* is a basic system type, with this one exception.
-auroraux)
os=-auroraux
;;
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
-solaris)
os=-solaris2
;;
-unixware*)
os=-sysv4.2uw
;;
-gnu/linux*)
os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
;;
# es1800 is here to avoid being matched by es* (a different OS)
-es1800*)
os=-ose
;;
# Now accept the basic system types.
# The portable systems comes first.
# Each alternative MUST end in a * to match a version number.
# -sysv* is not here because it comes later, after sysvr4.
-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
| -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
| -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
| -sym* | -kopensolaris* | -plan9* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* | -cloudabi* | -sortix* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -knetbsd* | -mirbsd* | -netbsd* \
| -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* | -hcos* \
| -chorusos* | -chorusrdb* | -cegcc* | -glidix* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
| -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
| -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
| -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
| -midnightbsd*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
case $basic_machine in
x86-* | i*86-*)
;;
*)
os=-nto$os
;;
esac
;;
-nto-qnx*)
;;
-nto*)
os=`echo $os | sed -e 's|nto|nto-qnx|'`
;;
-sim | -xray | -os68k* | -v88r* \
| -windows* | -osx | -abug | -netware* | -os9* \
| -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
;;
-mac*)
os=`echo "$os" | sed -e 's|mac|macos|'`
;;
-linux-dietlibc)
os=-linux-dietlibc
;;
-linux*)
os=`echo $os | sed -e 's|linux|linux-gnu|'`
;;
-sunos5*)
os=`echo "$os" | sed -e 's|sunos5|solaris2|'`
;;
-sunos6*)
os=`echo "$os" | sed -e 's|sunos6|solaris3|'`
;;
-opened*)
os=-openedition
;;
-os400*)
os=-os400
;;
-wince*)
os=-wince
;;
-utek*)
os=-bsd
;;
-dynix*)
os=-bsd
;;
-acis*)
os=-aos
;;
-atheos*)
os=-atheos
;;
-syllable*)
os=-syllable
;;
-386bsd)
os=-bsd
;;
-ctix* | -uts*)
os=-sysv
;;
-nova*)
os=-rtmk-nova
;;
-ns2)
os=-nextstep2
;;
-nsk*)
os=-nsk
;;
# Preserve the version number of sinix5.
-sinix5.*)
os=`echo $os | sed -e 's|sinix|sysv|'`
;;
-sinix*)
os=-sysv4
;;
-tpf*)
os=-tpf
;;
-triton*)
os=-sysv3
;;
-oss*)
os=-sysv3
;;
-svr4*)
os=-sysv4
;;
-svr3)
os=-sysv3
;;
-sysvr4)
os=-sysv4
;;
# This must come after -sysvr4.
-sysv*)
;;
-ose*)
os=-ose
;;
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
os=-mint
;;
-zvmoe)
os=-zvmoe
;;
-dicos*)
os=-dicos
;;
-pikeos*)
# Until real need of OS specific support for
# particular features comes up, bare metal
# configurations are quite functional.
case $basic_machine in
arm*)
os=-eabi
;;
*)
os=-elf
;;
esac
;;
-nacl*)
;;
-ios)
;;
-none)
;;
-*-eabi)
case $basic_machine in
arm*)
;;
esac
;;
*)
# Get rid of the `-' at the beginning of $os.
os=`echo $os | sed 's/[^-]*-//'`
echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2
exit 1
;;
esac
else
# Here we handle the default operating systems that come with various machines.
# The value should be what the vendor currently ships out the door with their
# machine or put another way, the most popular os provided with the machine.
# Note that if you're going to try to match "-MANUFACTURER" here (say,
# "-sun"), then you have to tell the case statement up towards the top
# that MANUFACTURER isn't an operating system. Otherwise, code above
# will signal an error saying that MANUFACTURER isn't an operating
# system, and we'll never get to this point.
case $basic_machine in
score-*)
os=-elf
;;
spu-*)
os=-elf
;;
*-acorn)
os=-riscix1.2
;;
arm*-rebel)
os=-linux
;;
arm*-semi)
os=-aout
;;
c4x-* | tic4x-*)
os=-coff
;;
c8051-*)
os=-elf
;;
hexagon-*)
os=-elf
;;
tic54x-*)
os=-coff
;;
tic55x-*)
os=-coff
;;
tic6x-*)
os=-coff
;;
# This must come before the *-dec entry.
pdp10-*)
os=-tops20
;;
pdp11-*)
os=-none
;;
*-dec | vax-*)
os=-ultrix4.2
;;
m68*-apollo)
os=-domain
;;
i386-sun)
os=-sunos4.0.2
;;
m68000-sun)
os=-sunos3
;;
m68*-cisco)
os=-aout
;;
mep-*)
os=-elf
;;
mips*-cisco)
os=-elf
;;
mips*-*)
os=-elf
;;
or32-*)
os=-coff
;;
*-tti) # must be before sparc entry or we get the wrong os.
os=-sysv3
;;
sparc-* | *-sun)
os=-sunos4.1.1
;;
pru-*)
os=-elf
;;
*-be)
os=-beos
;;
*-ibm)
os=-aix
;;
*-knuth)
os=-mmixware
;;
*-wec)
os=-proelf
;;
*-winbond)
os=-proelf
;;
*-oki)
os=-proelf
;;
*-hp)
os=-hpux
;;
*-hitachi)
os=-hiux
;;
i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
os=-sysv
;;
*-cbm)
os=-amigaos
;;
*-dg)
os=-dgux
;;
*-dolphin)
os=-sysv3
;;
m68k-ccur)
os=-rtu
;;
m88k-omron*)
os=-luna
;;
*-next)
os=-nextstep
;;
*-sequent)
os=-ptx
;;
*-crds)
os=-unos
;;
*-ns)
os=-genix
;;
i370-*)
os=-mvs
;;
*-gould)
os=-sysv
;;
*-highlevel)
os=-bsd
;;
*-encore)
os=-bsd
;;
*-sgi)
os=-irix
;;
*-siemens)
os=-sysv4
;;
*-masscomp)
os=-rtu
;;
f30[01]-fujitsu | f700-fujitsu)
os=-uxpv
;;
*-rom68k)
os=-coff
;;
*-*bug)
os=-coff
;;
*-apple)
os=-macos
;;
*-atari*)
os=-mint
;;
*)
os=-none
;;
esac
fi
# Here we handle the case where we know the os, and the CPU type, but not the
# manufacturer. We pick the logical manufacturer.
vendor=unknown
case $basic_machine in
*-unknown)
case $os in
-riscix*)
vendor=acorn
;;
-sunos*)
vendor=sun
;;
-cnk*|-aix*)
vendor=ibm
;;
-beos*)
vendor=be
;;
-hpux*)
vendor=hp
;;
-mpeix*)
vendor=hp
;;
-hiux*)
vendor=hitachi
;;
-unos*)
vendor=crds
;;
-dgux*)
vendor=dg
;;
-luna*)
vendor=omron
;;
-genix*)
vendor=ns
;;
-mvs* | -opened*)
vendor=ibm
;;
-os400*)
vendor=ibm
;;
-ptx*)
vendor=sequent
;;
-tpf*)
vendor=ibm
;;
-vxsim* | -vxworks* | -windiss*)
vendor=wrs
;;
-aux*)
vendor=apple
;;
-hms*)
vendor=hitachi
;;
-mpw* | -macos*)
vendor=apple
;;
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
vendor=atari
;;
-vos*)
vendor=stratus
;;
esac
basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"`
;;
esac
echo "$basic_machine$os"
exit
# Local variables:
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "timestamp='"
# time-stamp-format: "%:y-%02m-%02d"
# time-stamp-end: "'"
# End:
PK (��\G��J\ \ depcompnu ȯ�� #! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
scriptversion=2018-03-07.03; # UTC
# Copyright (C) 1999-2018 Free Software Foundation, Inc.
# 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
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# As a special exception to the GNU General Public License, if you
# distribute this file as part of a program that contains a
# configuration script generated by Autoconf, you may include it under
# the same distribution terms that you use for the rest of that program.
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
case $1 in
'')
echo "$0: No command. Try '$0 --help' for more information." 1>&2
exit 1;
;;
-h | --h*)
cat <<\EOF
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
Run PROGRAMS ARGS to compile a file, generating dependencies
as side-effects.
Environment variables:
depmode Dependency tracking mode.
source Source file read by 'PROGRAMS ARGS'.
object Object file output by 'PROGRAMS ARGS'.
DEPDIR directory where to store dependencies.
depfile Dependency file to output.
tmpdepfile Temporary file to use when outputting dependencies.
libtool Whether libtool is used (yes/no).
Report bugs to <bug-automake@gnu.org>.
EOF
exit $?
;;
-v | --v*)
echo "depcomp $scriptversion"
exit $?
;;
esac
# Get the directory component of the given path, and save it in the
# global variables '$dir'. Note that this directory component will
# be either empty or ending with a '/' character. This is deliberate.
set_dir_from ()
{
case $1 in
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
*) dir=;;
esac
}
# Get the suffix-stripped basename of the given path, and save it the
# global variable '$base'.
set_base_from ()
{
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
}
# If no dependency file was actually created by the compiler invocation,
# we still have to create a dummy depfile, to avoid errors with the
# Makefile "include basename.Plo" scheme.
make_dummy_depfile ()
{
echo "#dummy" > "$depfile"
}
# Factor out some common post-processing of the generated depfile.
# Requires the auxiliary global variable '$tmpdepfile' to be set.
aix_post_process_depfile ()
{
# If the compiler actually managed to produce a dependency file,
# post-process it.
if test -f "$tmpdepfile"; then
# Each line is of the form 'foo.o: dependency.h'.
# Do two passes, one to just change these to
# $object: dependency.h
# and one to simply output
# dependency.h:
# which is needed to avoid the deleted-header problem.
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
} > "$depfile"
rm -f "$tmpdepfile"
else
make_dummy_depfile
fi
}
# A tabulation character.
tab=' '
# A newline character.
nl='
'
# Character ranges might be problematic outside the C locale.
# These definitions help.
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
lower=abcdefghijklmnopqrstuvwxyz
digits=0123456789
alpha=${upper}${lower}
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
echo "depcomp: Variables source, object and depmode must be set" 1>&2
exit 1
fi
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
depfile=${depfile-`echo "$object" |
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
# Avoid interferences from the environment.
gccflag= dashmflag=
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
# here, because this file can only contain one case statement.
if test "$depmode" = hp; then
# HP compiler uses -M and no extra arg.
gccflag=-M
depmode=gcc
fi
if test "$depmode" = dashXmstdout; then
# This is just like dashmstdout with a different argument.
dashmflag=-xM
depmode=dashmstdout
fi
cygpath_u="cygpath -u -f -"
if test "$depmode" = msvcmsys; then
# This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u='sed s,\\\\,/,g'
depmode=msvisualcpp
fi
if test "$depmode" = msvc7msys; then
# This is just like msvc7 but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
cygpath_u='sed s,\\\\,/,g'
depmode=msvc7
fi
if test "$depmode" = xlc; then
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
gccflag=-qmakedep=gcc,-MF
depmode=gcc
fi
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
## it if -MD -MP comes after the -MF stuff. Hmm.
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
## the command line argument order; so add the flags where they
## appear in depend2.am. Note that the slowdown incurred here
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
for arg
do
case $arg in
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
*) set fnord "$@" "$arg" ;;
esac
shift # fnord
shift # $arg
done
"$@"
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
mv "$tmpdepfile" "$depfile"
;;
gcc)
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
## (see the conditional assignment to $gccflag above).
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
## -MM, not -M (despite what the docs say). Also, it might not be
## supported by the other compilers which use the 'gcc' depmode.
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
gccflag=-MD,
fi
"$@" -Wp,"$gccflag$tmpdepfile"
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
# The second -e expression handles DOS-style file names with drive
# letters.
sed -e 's/^[^:]*: / /' \
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
## This next piece of magic avoids the "deleted header file" problem.
## The problem is that when a header file which appears in a .P file
## is deleted, the dependency causes make to die (because there is
## typically no way to rebuild the header). We avoid this by adding
## dummy dependencies for each header file. Too bad gcc doesn't do
## this for us directly.
## Some versions of gcc put a space before the ':'. On the theory
## that the space means something, we add a space to the output as
## well. hp depmode also adds that space, but also prefixes the VPATH
## to the object. Take care to not repeat it in the output.
## Some versions of the HPUX 10.20 sed can't process this invocation
## correctly. Breaking it into two sed invocations is a workaround.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
sgi)
if test "$libtool" = yes; then
"$@" "-Wp,-MDupdate,$tmpdepfile"
else
"$@" -MDupdate "$tmpdepfile"
fi
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
echo "$object : \\" > "$depfile"
# Clip off the initial element (the dependent). Don't try to be
# clever and replace this with sed code, as IRIX sed won't handle
# lines with more than a fixed number of characters (4096 in
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
# the IRIX cc adds comments like '#:fec' to the end of the
# dependency line.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
| tr "$nl" ' ' >> "$depfile"
echo >> "$depfile"
# The second pass generates a dummy entry for each header file.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
>> "$depfile"
else
make_dummy_depfile
fi
rm -f "$tmpdepfile"
;;
xlc)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
aix)
# The C for AIX Compiler uses -M and outputs the dependencies
# in a .u file. In older versions, this file always lives in the
# current directory. Also, the AIX compiler puts '$object:' at the
# start of each line; $object doesn't have directory information.
# Version 6 uses the directory in both cases.
set_dir_from "$object"
set_base_from "$object"
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.u
tmpdepfile2=$base.u
tmpdepfile3=$dir.libs/$base.u
"$@" -Wc,-M
else
tmpdepfile1=$dir$base.u
tmpdepfile2=$dir$base.u
tmpdepfile3=$dir$base.u
"$@" -M
fi
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
aix_post_process_depfile
;;
tcc)
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
# FIXME: That version still under development at the moment of writing.
# Make that this statement remains true also for stable, released
# versions.
# It will wrap lines (doesn't matter whether long or short) with a
# trailing '\', as in:
#
# foo.o : \
# foo.c \
# foo.h \
#
# It will put a trailing '\' even on the last line, and will use leading
# spaces rather than leading tabs (at least since its commit 0394caf7
# "Emit spaces for -MD").
"$@" -MD -MF "$tmpdepfile"
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
# We have to change lines of the first kind to '$object: \'.
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
# And for each line of the second kind, we have to emit a 'dep.h:'
# dummy dependency, to avoid the deleted-header problem.
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
rm -f "$tmpdepfile"
;;
## The order of this option in the case statement is important, since the
## shell code in configure will try each of these formats in the order
## listed in this file. A plain '-MD' option would be understood by many
## compilers, so we must ensure this comes after the gcc and icc options.
pgcc)
# Portland's C compiler understands '-MD'.
# Will always output deps to 'file.d' where file is the root name of the
# source file under compilation, even if file resides in a subdirectory.
# The object file name does not affect the name of the '.d' file.
# pgcc 10.2 will output
# foo.o: sub/foo.c sub/foo.h
# and will wrap long lines using '\' :
# foo.o: sub/foo.c ... \
# sub/foo.h ... \
# ...
set_dir_from "$object"
# Use the source, not the object, to determine the base name, since
# that's sadly what pgcc will do too.
set_base_from "$source"
tmpdepfile=$base.d
# For projects that build the same source file twice into different object
# files, the pgcc approach of using the *source* file root name can cause
# problems in parallel builds. Use a locking strategy to avoid stomping on
# the same $tmpdepfile.
lockdir=$base.d-lock
trap "
echo '$0: caught signal, cleaning up...' >&2
rmdir '$lockdir'
exit 1
" 1 2 13 15
numtries=100
i=$numtries
while test $i -gt 0; do
# mkdir is a portable test-and-set.
if mkdir "$lockdir" 2>/dev/null; then
# This process acquired the lock.
"$@" -MD
stat=$?
# Release the lock.
rmdir "$lockdir"
break
else
# If the lock is being held by a different process, wait
# until the winning process is done or we timeout.
while test -d "$lockdir" && test $i -gt 0; do
sleep 1
i=`expr $i - 1`
done
fi
i=`expr $i - 1`
done
trap - 1 2 13 15
if test $i -le 0; then
echo "$0: failed to acquire lock after $numtries attempts" >&2
echo "$0: check lockdir '$lockdir'" >&2
exit 1
fi
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
# Each line is of the form `foo.o: dependent.h',
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
# Do two passes, one to just change these to
# `$object: dependent.h' and one to simply `dependent.h:'.
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
hp2)
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
# compilers, which have integrated preprocessors. The correct option
# to use with these is +Maked; it writes dependencies to a file named
# 'foo.d', which lands next to the object file, wherever that
# happens to be.
# Much of this is similar to the tru64 case; see comments there.
set_dir_from "$object"
set_base_from "$object"
if test "$libtool" = yes; then
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir.libs/$base.d
"$@" -Wc,+Maked
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
"$@" +Maked
fi
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
do
test -f "$tmpdepfile" && break
done
if test -f "$tmpdepfile"; then
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
# Add 'dependent.h:' lines.
sed -ne '2,${
s/^ *//
s/ \\*$//
s/$/:/
p
}' "$tmpdepfile" >> "$depfile"
else
make_dummy_depfile
fi
rm -f "$tmpdepfile" "$tmpdepfile2"
;;
tru64)
# The Tru64 compiler uses -MD to generate dependencies as a side
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
# dependencies in 'foo.d' instead, so we check for that too.
# Subdirectories are respected.
set_dir_from "$object"
set_base_from "$object"
if test "$libtool" = yes; then
# Libtool generates 2 separate objects for the 2 libraries. These
# two compilations output dependencies in $dir.libs/$base.o.d and
# in $dir$base.o.d. We have to check for both files, because
# one of the two compilations can be disabled. We should prefer
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
# automatically cleaned when .libs/ is deleted, while ignoring
# the former would cause a distcleancheck panic.
tmpdepfile1=$dir$base.o.d # libtool 1.5
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
"$@" -Wc,-MD
else
tmpdepfile1=$dir$base.d
tmpdepfile2=$dir$base.d
tmpdepfile3=$dir$base.d
"$@" -MD
fi
stat=$?
if test $stat -ne 0; then
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
exit $stat
fi
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
do
test -f "$tmpdepfile" && break
done
# Same post-processing that is required for AIX mode.
aix_post_process_depfile
;;
msvc7)
if test "$libtool" = yes; then
showIncludes=-Wc,-showIncludes
else
showIncludes=-showIncludes
fi
"$@" $showIncludes > "$tmpdepfile"
stat=$?
grep -v '^Note: including file: ' "$tmpdepfile"
if test $stat -ne 0; then
rm -f "$tmpdepfile"
exit $stat
fi
rm -f "$depfile"
echo "$object : \\" > "$depfile"
# The first sed program below extracts the file names and escapes
# backslashes for cygpath. The second sed program outputs the file
# name when reading, but also accumulates all include files in the
# hold buffer in order to output them again at the end. This only
# works with sed implementations that can handle large buffers.
sed < "$tmpdepfile" -n '
/^Note: including file: *\(.*\)/ {
s//\1/
s/\\/\\\\/g
p
}' | $cygpath_u | sort -u | sed -n '
s/ /\\ /g
s/\(.*\)/'"$tab"'\1 \\/p
s/.\(.*\) \\/\1:/
H
$ {
s/.*/'"$tab"'/
G
p
}' >> "$depfile"
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
rm -f "$tmpdepfile"
;;
msvc7msys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dashmstdout)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout, regardless of -o.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# Remove '-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
test -z "$dashmflag" && dashmflag=-M
# Require at least two characters before searching for ':'
# in the target name. This is to cope with DOS-style filenames:
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
"$@" $dashmflag |
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
rm -f "$depfile"
cat < "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process this sed invocation
# correctly. Breaking it into two sed invocations is a workaround.
tr ' ' "$nl" < "$tmpdepfile" \
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
dashXmstdout)
# This case only exists to satisfy depend.m4. It is never actually
# run, as this mode is specially recognized in the preamble.
exit 1
;;
makedepend)
"$@" || exit $?
# Remove any Libtool call
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# X makedepend
shift
cleared=no eat=no
for arg
do
case $cleared in
no)
set ""; shift
cleared=yes ;;
esac
if test $eat = yes; then
eat=no
continue
fi
case "$arg" in
-D*|-I*)
set fnord "$@" "$arg"; shift ;;
# Strip any option that makedepend may not understand. Remove
# the object too, otherwise makedepend will parse it as a source file.
-arch)
eat=yes ;;
-*|$object)
;;
*)
set fnord "$@" "$arg"; shift ;;
esac
done
obj_suffix=`echo "$object" | sed 's/^.*\././'`
touch "$tmpdepfile"
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
rm -f "$depfile"
# makedepend may prepend the VPATH from the source file name to the object.
# No need to regex-escape $object, excess matching of '.' is harmless.
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
# Some versions of the HPUX 10.20 sed can't process the last invocation
# correctly. Breaking it into two sed invocations is a workaround.
sed '1,2d' "$tmpdepfile" \
| tr ' ' "$nl" \
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
| sed -e 's/$/ :/' >> "$depfile"
rm -f "$tmpdepfile" "$tmpdepfile".bak
;;
cpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
# Remove '-o $object'.
IFS=" "
for arg
do
case $arg in
-o)
shift
;;
$object)
shift
;;
*)
set fnord "$@" "$arg"
shift # fnord
shift # $arg
;;
esac
done
"$@" -E \
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
| sed '$ s: \\$::' > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
cat < "$tmpdepfile" >> "$depfile"
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvisualcpp)
# Important note: in order to support this mode, a compiler *must*
# always write the preprocessed file to stdout.
"$@" || exit $?
# Remove the call to Libtool.
if test "$libtool" = yes; then
while test "X$1" != 'X--mode=compile'; do
shift
done
shift
fi
IFS=" "
for arg
do
case "$arg" in
-o)
shift
;;
$object)
shift
;;
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
set fnord "$@"
shift
shift
;;
*)
set fnord "$@" "$arg"
shift
shift
;;
esac
done
"$@" -E 2>/dev/null |
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
rm -f "$depfile"
echo "$object : \\" > "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
echo "$tab" >> "$depfile"
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
rm -f "$tmpdepfile"
;;
msvcmsys)
# This case exists only to let depend.m4 do its work. It works by
# looking at the text of this script. This case will never be run,
# since it is checked for above.
exit 1
;;
none)
exec "$@"
;;
*)
echo "Unknown depmode $depmode" 1>&2
exit 1
;;
esac
exit 0
# Local Variables:
# mode: shell-script
# sh-indentation: 2
# eval: (add-hook 'before-save-hook 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC0"
# time-stamp-end: "; # UTC"
# End:
PK (��\W x^<