From 8839a22ac61d728d6b381346f2f529a8e364bdc6 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini Date: Sun, 20 May 2012 00:27:10 +0200 Subject: [PATCH] [ng] cosmetics: avoid redundant use of '&' in subroutine calls * automake.in: Avoid redundant '&' in calls to the subroutines 'push_dist_common', 'define_variable' and 'define_verbose_tagvar'. Signed-off-by: Stefano Lattarini --- automake.in | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/automake.in b/automake.in index 6e363487b..d502506f8 100644 --- a/automake.in +++ b/automake.in @@ -1310,8 +1310,8 @@ sub handle_languages if (&saw_sources_p (0) && keys %dep_files) { # Set location of depcomp. - &define_variable ('depcomp', INTERNAL, - '$(SHELL) $(am__config_aux_dir)/depcomp'); + define_variable ('depcomp', INTERNAL, + '$(SHELL) $(am__config_aux_dir)/depcomp'); require_conf_file ("$am_file.am", FOREIGN, 'depcomp'); @@ -1335,7 +1335,7 @@ sub handle_languages } else { - &define_variable ('depcomp', INTERNAL, ''); + define_variable ('depcomp', INTERNAL, ''); } my %done; @@ -1868,7 +1868,7 @@ sub handle_single_transform ($$$$$%) unshift (@files, $object); # Distribute derived sources unless the source they are # derived from is not. - &push_dist_common ($object) + push_dist_common ($object) unless ($topparent =~ /^(?:nobase_)?nodist_/); next; } @@ -2037,7 +2037,7 @@ sub handle_source_transform ($$$$%) msg_var ('unsupported', $ext_var, $ext_var->name . " can assume at most one value") if $default_source_ext =~ /[\t ]/; (my $default_source = $unxformed) =~ s,(\.[^./\\]*)?$,$default_source_ext,; - &define_variable ($one_file . "_SOURCES", $where, $default_source); + define_variable ($one_file . "_SOURCES", $where, $default_source); push (@sources, $default_source); push (@dist_sources, $default_source); @@ -2395,7 +2395,7 @@ sub handle_programs else { # User didn't define prog_LDADD override. So do it. - &define_variable ($xname . '_LDADD', $where, '$(LDADD)'); + define_variable ($xname . '_LDADD', $where, '$(LDADD)'); # This does a bit too much work. But we need it to # generate _DEPENDENCIES when appropriate. @@ -2458,9 +2458,9 @@ sub handle_libraries $var->requires_variables ('library used', 'RANLIB'); } - &define_variable ('AR', INTERNAL, 'ar'); - &define_variable ('ARFLAGS', INTERNAL, 'cru'); - &define_verbose_tagvar ('AR'); + define_variable ('AR', INTERNAL, 'ar'); + define_variable ('ARFLAGS', INTERNAL, 'cru'); + define_verbose_tagvar ('AR'); foreach my $pair (@liblist) { @@ -2493,7 +2493,7 @@ sub handle_libraries if (! var ($xlib . '_AR')) { - &define_variable ($xlib . '_AR', $where, '$(AR) $(ARFLAGS)'); + define_variable ($xlib . '_AR', $where, '$(AR) $(ARFLAGS)'); } # Generate support for conditional object inclusion in @@ -2507,7 +2507,7 @@ sub handle_libraries } else { - &define_variable ($xlib . "_LIBADD", $where, ''); + define_variable ($xlib . "_LIBADD", $where, ''); } reject_var ($xlib . '_LDADD', @@ -2704,7 +2704,7 @@ sub handle_ltlibraries } else { - &define_variable ($xlib . "_LIBADD", $where, ''); + define_variable ($xlib . "_LIBADD", $where, ''); } reject_var ("${xlib}_LDADD", @@ -3355,7 +3355,7 @@ sub handle_man_pages $trans_sect_vars{$varname} = 1; } - &push_dist_common ($varname) + push_dist_common ($varname) if $pfx eq 'dist_'; } } @@ -3390,7 +3390,7 @@ sub handle_man_pages { $trans_vars{$varname} = 1; } - &push_dist_common ($varname) + push_dist_common ($varname) if $pfx eq 'dist_'; } } @@ -3646,14 +3646,14 @@ sub handle_dist () # The file might be absent, but if it can be built it's ok. || rule $cfile) { - &push_dist_common ($cfile); + push_dist_common ($cfile); } # Don't use 'elsif' here because a file might meaningfully # appear in both directories. if ($check_aux && dir_has_case_matching_file ($config_aux_dir, $cfile)) { - &push_dist_common ("$config_aux_dir/$cfile") + push_dist_common ("$config_aux_dir/$cfile") } } @@ -3776,7 +3776,7 @@ sub scan_aclocal_m4 () if (-f 'aclocal.m4') { - &define_variable ("ACLOCAL_M4", INTERNAL, '$(top_srcdir)/aclocal.m4'); + define_variable ("ACLOCAL_M4", INTERNAL, '$(top_srcdir)/aclocal.m4'); my $aclocal = new Automake::XFile "< aclocal.m4"; my $line = $aclocal->getline; @@ -4563,7 +4563,7 @@ sub handle_emacs_lisp require_variables ($elfiles[0][0], "Emacs Lisp sources seen", TRUE, 'EMACS', 'lispdir'); require_conf_file ($elfiles[0][0], FOREIGN, 'elisp-comp'); - &define_variable ('elisp_comp', INTERNAL, '$(am__config_aux_dir)/elisp-comp'); + define_variable ('elisp_comp', INTERNAL, '$(am__config_aux_dir)/elisp-comp'); } # Handle Python @@ -4575,7 +4575,7 @@ sub handle_python require_variables ($pyfiles[0][0], "Python sources seen", TRUE, 'PYTHON'); require_conf_file ($pyfiles[0][0], FOREIGN, 'py-compile'); - &define_variable ('py_compile', INTERNAL, '$(am__config_aux_dir)/py-compile'); + define_variable ('py_compile', INTERNAL, '$(am__config_aux_dir)/py-compile'); } # Handle Java. @@ -5529,7 +5529,7 @@ sub lang_yacc_target_hook # Distribute the generated file, unless its .y source was # listed in a nodist_ variable. (&handle_source_transform # will set DIST_SOURCE.) - &push_dist_common ($header) + push_dist_common ($header) if $transform{'DIST_SOURCE'}; # The GNU rules say that yacc/lex output files should be removed @@ -5562,7 +5562,7 @@ sub yacc_lex_finish_helper # FIXME: for now, no line number. require_conf_file ($configure_ac, FOREIGN, 'ylwrap'); - &define_variable ('YLWRAP', INTERNAL, '$(am__config_aux_dir)/ylwrap'); + define_variable ('YLWRAP', INTERNAL, '$(am__config_aux_dir)/ylwrap'); } sub lang_yacc_finish @@ -5991,9 +5991,9 @@ sub define_linker_variable ($) $link = "\$(LIBTOOL) $verbose $libtool_tag\$(AM_LIBTOOLFLAGS) " . "\$(LIBTOOLFLAGS) --mode=link "; } - &define_variable ($lang->linker, INTERNAL, $link . $lang->link); - &define_variable ($lang->compiler, INTERNAL, $lang); - &define_verbose_tagvar ($lang->lder || 'GEN'); + define_variable ($lang->linker, INTERNAL, $link . $lang->link); + define_variable ($lang->compiler, INTERNAL, $lang); + define_verbose_tagvar ($lang->lder || 'GEN'); } sub define_per_target_linker_variable ($$) @@ -6040,7 +6040,7 @@ sub define_per_target_linker_variable ($$) return ($lang->linker, $lang->lder) if $link_command eq $orig_command; - &define_variable ("${target}_LINK", INTERNAL, $link_command); + define_variable ("${target}_LINK", INTERNAL, $link_command); return ("${target}_LINK", $lang->lder); } -- 2.47.2