From 3e887a1324199c11004213b667145e7e5386eaa3 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Thu, 23 Feb 2012 20:25:26 +0100 Subject: [PATCH] pm: do not quote `like this', as per GCS recommendation This patch converts the internal perl modules used by automake and aclocal to the use of new quoting format 'like this' or "like this" rather than `like this'. * lib/Automake/ChannelDefs.pm, lib/Automake/Channels.pm, lib/Automake/Condition.pm, lib/Automake/Configure_ac.pm, lib/Automake/DisjConditions.pm, lib/Automake/FileUtils.pm, lib/Automake/General.pm, lib/Automake/Item.pm, lib/Automake/Rule.pm, lib/Automake/Getopt.pm, lib/Automake/Options.pm, lib/Automake/Struct.pm, lib/Automake/VarDef.pm, lib/Automake/Variable.pm, lib/Automake/Version.pm, lib/Automake/XFile.pm: Update and adjust quoting format throughout, in comments and diagnostic. Some minor related rewordings and reformatting since we are at it. --- lib/Automake/ChannelDefs.pm | 35 +++++++++++----------- lib/Automake/Channels.pm | 8 ++--- lib/Automake/Condition.pm | 8 ++--- lib/Automake/Configure_ac.pm | 6 ++-- lib/Automake/DisjConditions.pm | 8 ++--- lib/Automake/FileUtils.pm | 14 ++++----- lib/Automake/General.pm | 2 +- lib/Automake/Getopt.pm | 8 ++--- lib/Automake/Item.pm | 4 +-- lib/Automake/Options.pm | 12 ++++---- lib/Automake/Rule.pm | 68 +++++++++++++++++++++--------------------- lib/Automake/Struct.pm | 3 +- lib/Automake/VarDef.pm | 16 +++++----- lib/Automake/Variable.pm | 64 +++++++++++++++++++-------------------- lib/Automake/Version.pm | 2 +- lib/Automake/XFile.pm | 10 +++---- 16 files changed, 134 insertions(+), 134 deletions(-) diff --git a/lib/Automake/ChannelDefs.pm b/lib/Automake/ChannelDefs.pm index 529892a..afafae5 100644 --- a/lib/Automake/ChannelDefs.pm +++ b/lib/Automake/ChannelDefs.pm @@ -87,7 +87,7 @@ Errors related to GNU Standards. =item C -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 @@ -183,19 +183,20 @@ Display warning categories. 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 < @@ -293,7 +294,7 @@ sub switch_warning ($) 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' @@ -363,7 +364,7 @@ sub parse_warnings ($$) foreach my $cat (split (',', $categories)) { - msg 'unsupported', "unknown warning category `$cat'" + msg 'unsupported', "unknown warning category '$cat'" if switch_warning $cat; } } @@ -407,7 +408,7 @@ sub set_strictness ($) } else { - prog_error "level `$name' not recognized"; + prog_error "level '$name' not recognized"; } } diff --git a/lib/Automake/Channels.pm b/lib/Automake/Channels.pm index c7efd90..4b5c5e2 100644 --- a/lib/Automake/Channels.pm +++ b/lib/Automake/Channels.pm @@ -35,7 +35,7 @@ Automake::Channels - support functions for error and warning management 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; @@ -340,7 +340,7 @@ sub _merge_options (\%%) } else { - confess "unknown option `$_'"; + confess "unknown option '$_'"; } } if ($hash->{'ordered'}) @@ -585,12 +585,12 @@ associated to the message. For instance to complain about some unused variable C declared at line 10 in F, one could do: - msg 'unused', 'foo.c:10', "unused variable `mumble'"; + msg 'unused', 'foo.c:10', "unused variable 'mumble'"; If channel C 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. In this case, the stack of contexts will be displayed in addition. diff --git a/lib/Automake/Condition.pm b/lib/Automake/Condition.pm index 1111f4f..ee16f62 100644 --- a/lib/Automake/Condition.pm +++ b/lib/Automake/Condition.pm @@ -163,11 +163,11 @@ both create the C<"FALSE"> condition). =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 = (); @@ -183,9 +183,9 @@ sub new ($;@) { # 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"). diff --git a/lib/Automake/Configure_ac.pm b/lib/Automake/Configure_ac.pm index 84a9b0b..d5c54da 100644 --- a/lib/Automake/Configure_ac.pm +++ b/lib/Automake/Configure_ac.pm @@ -79,8 +79,8 @@ sub find_configure_ac (;@) 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 } @@ -101,7 +101,7 @@ Like C, but fail if neither is present. 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 } diff --git a/lib/Automake/DisjConditions.pm b/lib/Automake/DisjConditions.pm index 4b305b8..cb98495 100644 --- a/lib/Automake/DisjConditions.pm +++ b/lib/Automake/DisjConditions.pm @@ -136,7 +136,7 @@ ignored. =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'; @@ -146,8 +146,8 @@ sub new ($;@) 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 @@ -462,7 +462,7 @@ sub sub_conditions ($$) 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"), diff --git a/lib/Automake/FileUtils.pm b/lib/Automake/FileUtils.pm index b99d6b1..d73cebf 100644 --- a/lib/Automake/FileUtils.pm +++ b/lib/Automake/FileUtils.pm @@ -62,8 +62,8 @@ Quote C<$file_name> for open. # 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) = @_; @@ -124,7 +124,7 @@ sub find_file ($@) =item C Return the mtime of C<$file>. Missing files, or C<-> standing for -C or C are ``obsolete'', i.e., as old as possible. +C or C are "obsolete", i.e., as old as possible. =cut @@ -181,7 +181,7 @@ sub update_file ($$;$) 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 @@ -194,13 +194,13 @@ sub update_file ($$;$) 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"; } } @@ -399,7 +399,7 @@ sub dir_has_case_matching_file ($$) # 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); diff --git a/lib/Automake/General.pm b/lib/Automake/General.pm index 0307480..be57648 100644 --- a/lib/Automake/General.pm +++ b/lib/Automake/General.pm @@ -26,7 +26,7 @@ use vars qw (@ISA @EXPORT); @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); diff --git a/lib/Automake/Getopt.pm b/lib/Automake/Getopt.pm index 84cee5e..ffbcc12 100644 --- a/lib/Automake/Getopt.pm +++ b/lib/Automake/Getopt.pm @@ -76,13 +76,13 @@ sub parse_options (%) } 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."); } } } diff --git a/lib/Automake/Item.pm b/lib/Automake/Item.pm index 3d8a3f9..0066ac4 100644 --- a/lib/Automake/Item.pm +++ b/lib/Automake/Item.pm @@ -71,7 +71,7 @@ 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 + # 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; @@ -91,7 +91,7 @@ sub rdef ($$) { 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; diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm index eee76db..aac609c 100644 --- a/lib/Automake/Options.pm +++ b/lib/Automake/Options.pm @@ -308,14 +308,14 @@ sub _process_option_list (\%@) 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') @@ -324,7 +324,7 @@ sub _process_option_list (\%@) if (exists $options->{$opt}) { error ($where, - "options `$_' and `$opt' are mutually exclusive"); + "options '$_' and '$opt' are mutually exclusive"); last; } } @@ -346,7 +346,7 @@ sub _process_option_list (\%@) } else { - error ($where, "option `$_' not recognized", + error ($where, "option '$_' not recognized", uniq_scope => US_GLOBAL); return 1; } @@ -357,7 +357,7 @@ sub _process_option_list (\%@) 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; @@ -407,7 +407,7 @@ sub set_strictness ($) } else { - prog_error "level `$strictness_name' not recognized"; + prog_error "level '$strictness_name' not recognized"; } } diff --git a/lib/Automake/Rule.pm b/lib/Automake/Rule.pm index 9eb69e1..0b8d867 100644 --- a/lib/Automake/Rule.pm +++ b/lib/Automake/Rule.pm @@ -158,7 +158,7 @@ use vars '$suffix_rules'; 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. @@ -376,7 +376,7 @@ sub reset() # 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 = (); @@ -400,13 +400,13 @@ sub register_suffix_rule ($$$) # 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 @@ -496,7 +496,7 @@ sub rule ($) { 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; } @@ -565,7 +565,7 @@ sub _new ($$) 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); @@ -599,7 +599,7 @@ sub define ($$$$$) # 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; @@ -613,20 +613,20 @@ sub define ($$$$$) 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. @@ -634,18 +634,18 @@ sub define ($$$$$) { 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 !~ /^[^%]*%[^%]*$/) @@ -658,9 +658,9 @@ sub define ($$$$$) ## 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 @@ -672,7 +672,7 @@ sub define ($$$$$) { # 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); } } @@ -693,10 +693,10 @@ sub define ($$$$$) } 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; @@ -711,17 +711,17 @@ sub define ($$$$$) # 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 (); } } @@ -742,7 +742,7 @@ sub define ($$$$$) # 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 @@ -758,11 +758,11 @@ sub define ($$$$$) # 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.) @@ -774,7 +774,7 @@ sub define ($$$$$) { msg 'syntax', $where, "$message ...", partial => 1; msg_cond_rule ('syntax', $ambig_cond, $target, - "... `$target' previously defined here"); + "... '$target' previously defined here"); return (); } } @@ -801,7 +801,7 @@ sub define ($$$$$) # 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). diff --git a/lib/Automake/Struct.pm b/lib/Automake/Struct.pm index 8394848..cd93691 100644 --- a/lib/Automake/Struct.pm +++ b/lib/Automake/Struct.pm @@ -1,4 +1,3 @@ -# 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 @@ -17,7 +16,7 @@ # 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. ############################################################### diff --git a/lib/Automake/VarDef.pm b/lib/Automake/VarDef.pm index e51c18d..d5b3224 100644 --- a/lib/Automake/VarDef.pm +++ b/lib/Automake/VarDef.pm @@ -47,7 +47,7 @@ Automake::VarDef - a class for variable definitions $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; @@ -148,11 +148,11 @@ sub new ($$$$$$$$) { 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); @@ -182,14 +182,14 @@ sub append ($$$) # 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; } @@ -210,7 +210,7 @@ sub value ($) { 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. @@ -249,7 +249,7 @@ 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 + # '+=' statements). The risk otherwise is to warn about # a VAR_MAKEFILE variable and locate it in configure.ac... $self->{'owner'} = $owner; $self->{'location'} = $location; diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm index fdf6ba2..f9ed7da 100644 --- a/lib/Automake/Variable.pm +++ b/lib/Automake/Variable.pm @@ -139,7 +139,7 @@ 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. +# 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 = (); @@ -470,7 +470,7 @@ sub _check_ambiguous_condition ($$$) 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); } } @@ -524,7 +524,7 @@ sub output ($@) 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; @@ -672,8 +672,8 @@ sub has_conditional_contents ($) # 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 { @@ -744,7 +744,7 @@ sub scan_variable_expansions ($) { 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; } @@ -841,14 +841,14 @@ sub define ($$$$$$$$) || $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); @@ -877,9 +877,9 @@ sub define ($$$$$$$$) 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"); } @@ -891,15 +891,15 @@ sub define ($$$$$$$$) 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; } } @@ -988,16 +988,16 @@ sub define ($$$$$$$$) # 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 @@ -1024,7 +1024,7 @@ sub define ($$$$$$$$) 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); @@ -1139,7 +1139,7 @@ sub require_variables ($$$@) 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) { @@ -1156,20 +1156,20 @@ sub require_variables ($$$@) 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; @@ -1311,7 +1311,7 @@ recursive calls). =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; @@ -1340,7 +1340,7 @@ sub _do_recursive_traversal ($$&&$$$$) if ($var->{'scanned'} == $_traversal) { - err_var $var, "variable `" . $var->name() . "' recursively defined"; + err_var $var, "variable '" . $var->name() . "' recursively defined"; return (); } $var->{'scanned'} = $_traversal; @@ -1369,7 +1369,7 @@ sub _do_recursive_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 =~ /^\$\(([^\)]*)\)$/) { @@ -1411,7 +1411,7 @@ sub _do_recursive_traversal ($$&&$$$$) 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 diff --git a/lib/Automake/Version.pm b/lib/Automake/Version.pm index 1f6164f..35cfe8b 100644 --- a/lib/Automake/Version.pm +++ b/lib/Automake/Version.pm @@ -130,7 +130,7 @@ sub check ($$) 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]); diff --git a/lib/Automake/XFile.pm b/lib/Automake/XFile.pm index a6bd0cd..1840f61 100644 --- a/lib/Automake/XFile.pm +++ b/lib/Automake/XFile.pm @@ -133,7 +133,7 @@ sub open 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"; @@ -225,14 +225,14 @@ sub lock 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. # @@ -241,7 +241,7 @@ sub lock { 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', -- 2.7.4