automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Convert a couple more Automake::Variable functions to methods


From: Alexandre Duret-Lutz
Subject: Re: Convert a couple more Automake::Variable functions to methods
Date: Sun, 03 Aug 2003 19:12:10 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

>>> "Hari" == Raja R Harinath <address@hidden> writes:

 Hari> Hi,
 Hari> This patch continues the program of removing some variable name vs.
 Hari> 'Automake::Variable' polymorphism in a couple more functions, with
 Hari> some drive-by renaming.

Thanks a lot for doing this!

 Hari> Index: ChangeLog
 Hari> from  Raja R Harinath  <address@hidden>
 Hari> 
 Hari>  * lib/Automake/Variable.pm (@EXPORT): Remove
 Hari>  traverse_variable_recursively and
 Hari>  require_variables_for_variable.
 Hari>  (require_variables_for_variable, traverse_variable_recursively)
 Hari>  (_traverse_variable_recursively_worker): Convert to
 Hari>  Automake::Variable methods, remove support for being
 Hari>  invoked with variable names, and rename to ...
 Hari>  (requires_variables, traverse_recursively)
 Hari>  (_do_recursive_traversal): ... these.
 Hari>  (_value_as_list_recursive_worker, transform_variable_recursively):
 Hari>  Update to reflect changes.
 Hari>  * automake.in (handle_LIBOBJS, handle_ALLOCA)
 Hari>  (handle_libraries, handle_ltlibraries, am_primary_prefixes):
 Hari>  Likewise.
 Hari>  (define_objects_from_sources): Fix typo in comment.

OK.

[...]

 Hari> +      my $var = var ($prefix[0] . '_LIBRARIES');
 Hari> +      $var->requires_variables ('library used', 'RANLIB');

Please prefer rvar().  We should use rvar() every time a
variable must (logically) exist.  The output of var() should
always be checked for before use.

[...]

 Hari> +      my $var = var ($prefix[0] . '_LTLIBRARIES');
 Hari> +      $var->requires_variables ('Libtool library used', 'LIBTOOL');

Idem.
-- 
Alexandre Duret-Lutz





reply via email to

[Prev in Thread] Current Thread [Next in Thread]