=item C<error-gnu/warn>
-Errors related to GNU Standards that should be warnings in `foreign' mode.
+Errors related to GNU Standards that should be warnings in 'foreign' mode.
=item C<error-gnits>
sub usage ()
{
- print "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
-";
+ 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])>
setup_channel $cat, silent => $has_no;
#
# Handling of portability warnings is trickier. For relevant tests,
- # see `dollarvar2', `extra-portability' and `extra-portability3'.
+ # see 'dollarvar2', 'extra-portability' and 'extra-portability3'.
#
# -Wportability-recursive and -Wno-portability-recursive should not
# have any effect on other 'portability' or 'extra-portability'
foreach my $cat (split (',', $categories))
{
- msg 'unsupported', "unknown warning category `$cat'"
+ msg 'unsupported', "unknown warning category '$cat'"
if switch_warning $cat;
}
}
}
else
{
- prog_error "level `$name' not recognized";
+ prog_error "level '$name' not recognized";
}
}
register_channel 'system', type => 'error', exit_code => 4;
# Output a message on channel 'unused'.
- msg 'unused', "$file:$line", "unused variable `$var'";
+ msg 'unused', "$file:$line", "unused variable '$var'";
# Make the 'unused' channel silent.
setup_channel 'unused', silent => 1;
}
else
{
- confess "unknown option `$_'";
+ confess "unknown option '$_'";
}
}
if ($hash->{'ordered'})
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'";
+ 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'
+ 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.
=cut
# Keys in this hash are conditional strings. Values are the
-# associated object conditions. This is used by `new' to reuse
+# 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'
+# and any setting would otherwise occur AFTER the 'TRUE' and 'FALSE'
# constants definitions.
# %_condition_singletons = ();
{
# Catch some common programming errors:
# - A Condition passed to new
- confess "`$cond' is a reference, expected a string" if ref $cond;
+ 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 =~ /::/;
+ confess "'$cond' does not look like a condition" if $cond =~ /::/;
}
# Accept strings like "FOO BAR" as shorthand for ("FOO", "BAR").
if (-f $configure_in)
{
msg ('unsupported',
- "`$configure_ac' and `$configure_in' both present.\n"
- . "proceeding with `$configure_ac'");
+ "'$configure_ac' and '$configure_in' both present.\n"
+ . "proceeding with '$configure_ac'");
}
return $configure_ac
}
sub require_configure_ac (;$)
{
my $res = find_configure_ac (@_);
- fatal "`configure.ac' or `configure.in' is required"
+ fatal "'configure.ac' or 'configure.in' is required"
unless -f $res;
return $res
}
=cut
# Keys in this hash are DisjConditions strings. Values are the
-# associated object DisjConditions. This is used by `new' to reuse
+# associated object DisjConditions. This is used by 'new' to reuse
# DisjConditions objects with identical conditions.
use vars '%_disjcondition_singletons';
my @filtered_conds = ();
for my $cond (@conds)
{
- confess "`$cond' isn't a reference" unless ref $cond;
- confess "`$cond' isn't an Automake::Condition"
+ 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
my ($self, $subcond) = @_;
# Make $subcond blindingly apparent in the DisjConditions.
- # For instance `$b->multiply($a->conds)' (from the POD example) is:
+ # 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"),
# open_quote ($FILE_NAME)
# -----------------------
# If the string $S is a well-behaved file name, simply return it.
-# If it starts with white space, prepend `./', if it ends with
-# white space, add `\0'. Return the new string.
+# If it starts with white space, prepend './', if it ends with
+# white space, add '\0'. Return the new string.
sub open_quote($)
{
my ($s) = @_;
=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.
+C<STDIN> or C<STDOUT> are "obsolete", i.e., as old as possible.
=cut
if (!$force && -f "$to" && compare ("$from", "$to") == 0)
{
# File didn't change, so don't update its mod time.
- msg 'note', "`$to' is unchanged";
+ msg 'note', "'$to' is unchanged";
unlink ($from)
or fatal "cannot remove $from: $!";
return
or fatal "cannot backup $to: $!";
move ("$from", "$to")
or fatal "cannot rename $from as $to: $!";
- msg 'note', "`$to' is updated";
+ msg 'note', "'$to' is updated";
}
else
{
move ("$from", "$to")
or fatal "cannot rename $from as $to: $!";
- msg 'note', "`$to' is created";
+ msg 'note', "'$to' is created";
}
}
# again and again.
if (!exists $_directory_cache{$dirname})
{
- error "failed to open directory `$dirname'"
+ error "failed to open directory '$dirname'"
unless opendir (DIR, $dirname);
$_directory_cache{$dirname} = { map { $_ => 1 } readdir (DIR) };
closedir (DIR);
@EXPORT = qw (&uniq $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
+# copy of them: using 'my' together with multiple inclusion of this
# package would introduce several copies.
use vars qw ($me);
$me = basename ($0);
}
elsif (exists $argopts{$ARGV[0]})
{
- fatal ("option `$ARGV[0]' requires an argument\n"
- . "Try `$0 --help' for more information.");
+ 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.");
+ fatal ("unrecognized option '$ARGV[0]'.\n"
+ . "Try '$0 --help' for more information.");
}
}
}
{
# 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
+ # 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;
{
my ($self, $cond) = @_;
my $d = $self->def ($cond);
- prog_error ("undefined condition `" . $cond->human . "' for `"
+ prog_error ("undefined condition '" . $cond->human . "' for '"
. $self->name . "'\n" . $self->dump)
unless $d;
return $d;
elsif ($_ eq 'silent-rules')
{
error ($where,
- "option `$_' can only be used as argument to AM_INIT_AUTOMAKE\n"
+ "option '$_' can only be used as argument to AM_INIT_AUTOMAKE\n"
. "but not in AUTOMAKE_OPTIONS makefile statements")
if $where->get !~ /^configure\./;
}
elsif ($_ eq 'tar-v7' || $_ eq 'tar-ustar' || $_ eq 'tar-pax')
{
error ($where,
- "option `$_' can only be used as argument to AM_INIT_AUTOMAKE\n"
+ "option '$_' can only be used as argument to AM_INIT_AUTOMAKE\n"
. "but not in AUTOMAKE_OPTIONS makefile statements")
if $where->get !~ /^configure\./;
for my $opt ('tar-v7', 'tar-ustar', 'tar-pax')
if (exists $options->{$opt})
{
error ($where,
- "options `$_' and `$opt' are mutually exclusive");
+ "options '$_' and '$opt' are mutually exclusive");
last;
}
}
}
else
{
- error ($where, "option `$_' not recognized",
+ error ($where, "option '$_' not recognized",
uniq_scope => US_GLOBAL);
return 1;
}
foreach my $w (@warnings)
{
msg 'unsupported', $w->{'loc'},
- "unknown warning category `$w->{'cat'}'"
+ "unknown warning category '$w->{'cat'}'"
if switch_warning $w->{cat};
}
return 0;
}
else
{
- prog_error "level `$strictness_name' not recognized";
+ prog_error "level '$strictness_name' not recognized";
}
}
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
+of '\..*$') to match extensions allows Automake to support dot-less
extensions.
New extensions should be registered with C<accept_extensions>.
# Phonying.
'.PHONY' => [],
- # Recursive install targets (so `make -n install' works for BSD Make).
+ # Recursive install targets (so "make -n install" works for BSD Make).
'.MAKE' => [],
);
%actions = ();
# 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' ...
+ # '.$(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');
# Reading the comments near the declaration of $suffix_rules might
{
my ($name) = @_;
# Strip $(EXEEXT) from $name, so we can diagnose
- # a clash if `ctags$(EXEEXT):' is redefined after `ctags:'.
+ # a clash if 'ctags$(EXEEXT):' is redefined after 'ctags:'.
$name =~ s,\$\(EXEEXT\)$,,;
return $_rule_dict{$name} || 0;
}
my ($class, $name) = @_;
# Strip $(EXEEXT) from $name, so we can diagnose
- # a clash if `ctags$(EXEEXT):' is redefined after `ctags:'.
+ # a clash if 'ctags$(EXEEXT):' is redefined after 'ctags:'.
(my $keyname = $name) =~ s,\$\(EXEEXT\)$,,;
my $self = Automake::Item::new ($class, $name);
# Don't even think about defining a rule in condition FALSE.
return () if $cond == FALSE;
- # For now `foo:' will override `foo$(EXEEXT):'. This is temporary,
+ # 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;
if (! option 'no-exeext')
{
msg ('obsolete', $tdef->location,
- "deprecated feature: target `$noexe' overrides "
- . "`$noexe\$(EXEEXT)'\n"
- . "change your target to read `$noexe\$(EXEEXT)'",
+ "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");
+ msg ('obsolete', $where, "target '$target' was defined here");
}
- # Don't `return ()' now, as this might hide target clashes
+ # Don't 'return ()' now, as this might hide target clashes
# detected below.
}
# A GNU make-style pattern rule has a single "%" in the target name.
msg ('portability', $where,
- "`%'-style pattern rules are a GNU make extension")
+ "'%'-style pattern rules are a GNU make extension")
if $target =~ /^[^%]*%[^%]*$/;
# Diagnose target redefinitions.
{
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.
+ # '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 . "'";
+ $cond == TRUE ? '' : " in condition '" . $cond->human . "'";
if ($owner == RULE_USER)
{
if ($oldowner == RULE_USER)
{
- # Ignore `%'-style pattern rules. We'd need the
+ # Ignore '%'-style pattern rules. We'd need the
# dependencies to detect duplicates, and they are
# already diagnosed as unportable by -Wportability.
if ($target !~ /^[^%]*%[^%]*$/)
## is legitimate. (This is phony.test.)
# msg ('syntax', $where,
- # "redefinition of `$target'$condmsg ...", partial => 1);
+ # "redefinition of '$target'$condmsg ...", partial => 1);
# msg_cond_rule ('syntax', $cond, $target,
- # "... `$target' previously defined here");
+ # "... '$target' previously defined here");
}
# Return so we don't redefine the rule in our tables,
# don't check for ambiguous condition, etc. The rule
{
# 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"
+ prog_error ("user target '$target'$condmsg seen after Automake's"
. " definition\nfrom " . $tdef->source);
}
}
}
msg_cond_rule ('override', $cond, $target,
- "user target `$target' defined here"
+ "user target '$target' defined here"
. "$condmsg ...", partial => 1);
msg ('override', $where,
- "... overrides Automake target `$oldname' defined here",
+ "... overrides Automake target '$oldname' defined here",
partial => $hint);
msg_cond_rule ('override', $cond, $target, $hint)
if $hint;
# 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.
+ # 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;
return () if $source eq $oldsource && $target eq $oldname;
- msg ('syntax', $where, "redefinition of `$target'$condmsg ...",
+ msg ('syntax', $where, "redefinition of '$target'$condmsg ...",
partial => 1);
msg_cond_rule ('syntax', $cond, $target,
- "... `$oldname' previously defined here");
+ "... '$oldname' previously defined here");
return ();
}
}
# For user rules, just diagnose the ambiguity.
msg 'syntax', $where, "$message ...", partial => 1;
msg_cond_rule ('syntax', $ambig_cond, $target,
- "... `$target' previously defined here");
+ "... '$target' previously defined here");
return ();
}
else
# else
# bin_PROGRAMS = foo
# endif
- # &handle_PROGRAMS will attempt to define a `foo:' rule
+ # &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:'
+ # 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.test and cond15.test for some test cases.)
{
msg 'syntax', $where, "$message ...", partial => 1;
msg_cond_rule ('syntax', $ambig_cond, $target,
- "... `$target' previously defined here");
+ "... '$target' previously defined here");
return ();
}
}
# 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
+ # 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).
-# autoconf -- create `configure' using m4 macros
# Copyright (C) 2001-2012 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# This file is basically Perl 5.6's Class::Struct, but made compatible
# with Perl 5.5. If someday this has to be updated, be sure to rename
# all the occurrences of Class::Struct into Automake::Struct, otherwise
-# if we `use' a Perl module (e.g., File::stat) that uses Class::Struct,
+# if we 'use' a Perl module (e.g., File::stat) that uses Class::Struct,
# we would have two packages defining the same symbols. Boom.
###############################################################
$def->append ('value to append', 'comment to append');
# Accessors.
- my $value = $def->value; # with trailing `#' comments and
+ 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 ($class, $var, $value, $comment, $location, $type, $owner, $pretty) = @_;
- # A user variable must be set by either `=' or `:=', and later
- # promoted to `+='.
+ # 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 `+='";
+ error $location, "$var must be set with '=' before using '+='";
}
my $self = Automake::ItemDef::new ($class, $comment, $location, $owner);
# VAR += bar
# does not become
# VAR = foo # com bar
- # Furthermore keeping `#' would not be portable if the variable is
+ # 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.
+ # cope with 'make' implementation that cannot read very long lines.
$self->{'pretty'} = VAR_PRETTY if $self->{'pretty'} == VAR_ASIS;
}
{
my ($self) = @_;
my $val = $self->raw_value;
- # Strip anything past `#'. `#' characters cannot be escaped
+ # Strip anything past '#'. '#' characters cannot be escaped
# in Makefiles, so we don't have to be smart.
$val =~ s/#.*$//s;
# Strip backslashes.
{
my ($self, $owner, $location) = @_;
# We always adjust the location when the owner changes (even for
- # `+=' statements). The risk otherwise is to warn about
+ # '+=' statements). The risk otherwise is to warn about
# a VAR_MAKEFILE variable and locate it in configure.ac...
$self->{'owner'} = $owner;
$self->{'location'} = $location;
# 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.
+# 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 = ();
if ($message && $def->pretty != VAR_SILENT)
{
msg 'syntax', $where, "$message ...", partial => 1;
- msg_var ('syntax', $var, "... `$var' previously defined here");
+ msg_var ('syntax', $var, "... '$var' previously defined here");
verb ($self->dump);
}
}
foreach my $cond (@conds)
{
my $def = $self->def ($cond);
- prog_error ("unknown condition `" . $cond->human . "' for `"
+ prog_error ("unknown condition '" . $cond->human . "' for '"
. $self->name . "'")
unless $def;
# 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
+ # 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
{
{
my $var = $1 || $2;
# The occurrence may look like $(string1[:subst1=[subst2]]) but
- # we want only `string1'.
+ # we want only 'string1'.
$var =~ s/:[^:=]*=[^=]*$//;
push @result, $var;
}
|| $pretty == VAR_SILENT
|| $pretty == VAR_SORTED);
- error $where, "bad characters in variable name `$var'"
+ error $where, "bad characters in variable name '$var'"
if $var !~ /$_VARIABLE_PATTERN/o;
- # `:='-style assignments are not acknowledged by POSIX. Moreover it
+ # ':='-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")
+ msg ('portability', $where, "':='-style assignments are not portable")
if $type eq ':';
check_variable_expansions ($value, $where);
if ($def->type ne $type && $def->owner == VAR_AUTOMAKE)
{
error ($def->location,
- "Automake variable `$var' was set with `"
+ "Automake variable '$var' was set with '"
. $def->type . "=' here ...", partial => 1);
- error ($where, "... and is now set with `$type=' here.");
+ error ($where, "... and is now set with '$type=' here.");
prog_error ("Automake variable assignments should be consistently\n"
. "defined with the same sign");
}
if (! exists $_silent_variable_override{$var})
{
my $condmsg = ($cond == TRUE
- ? '' : (" in condition `" . $cond->human . "'"));
+ ? '' : (" in condition '" . $cond->human . "'"));
msg_cond_var ('override', $cond, $var,
- "user variable `$var' defined here$condmsg ...",
+ "user variable '$var' defined here$condmsg ...",
partial => 1);
msg ('override', $where,
- "... overrides Automake variable `$var' defined here");
+ "... overrides Automake variable '$var' defined here");
}
verb ("refusing to override the user definition of:\n"
- . $self->dump ."with `" . $cond->human . "' => `$value'");
+ . $self->dump ."with '" . $cond->human . "' => '$value'");
return;
}
}
# endif
# X += Z
# should be rejected because X is not defined for all conditions
- # where `+=' applies.
+ # 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 "
+ "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"
+ . "\neither define '$var' in these conditions,"
+ . " or use\n'+=' in the same conditions as"
. " the definitions.");
}
else
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
+ # 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);
next VARIABLE
if vardef ($var, $cond);
- my $text = "$reason`$var' is undefined\n";
+ my $text = "$reason'$var' is undefined\n";
my $v = var $var;
if ($v)
{
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.";
+ $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"
+ $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.";
+ $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;
=cut
-# Contains a stack of `from' and `to' parts of variable
+# Contains a stack of 'from' and 'to' parts of variable
# substitutions currently in force.
my @_substfroms;
my @_substtos;
if ($var->{'scanned'} == $_traversal)
{
- err_var $var, "variable `" . $var->name() . "' recursively defined";
+ err_var $var, "variable '" . $var->name() . "' recursively defined";
return ();
}
$var->{'scanned'} = $_traversal;
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
+ # (Backslashes before '}' and ')' within brackets are here to
# please Emacs's indentation.)
if ($val =~ /^\$\{([^\}]*)\}$/ || $val =~ /^\$\(([^\)]*)\)$/)
{
next;
}
# Try to expand variable references inside filenames such as
- # `$(NAME).txt'. We do not handle `:.foo=.bar'
+ # '$(NAME).txt'. We do not handle ':.foo=.bar'
# substitutions, but it would make little sense to use this
# here anyway.
elsif ($inner_expand
if $#required == -1;
# If we require 3.4n-foo then we require something
- # >= 3.4n, with the `foo' fork identifier.
+ # >= 3.4n, with the 'foo' fork identifier.
return 1
if ($required[4] ne '' && $required[4] ne $version[4]);
my ($file) = @_;
# 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
+ # 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";
my ($fh, $mode) = @_;
# Cannot use @_ here.
- # Unless explicitly configured otherwise, Perl implements its `flock' with the
+ # 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
+ # 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
+ # 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.
#
{
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 $note = "\nforgo \"make -j\" or use a file system that supports locks";
my $file = $fh->name;
msg ($make_j ? 'fatal' : 'unsupported',