[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-NG] [PATCH 2/7] [ng] automake: new global variable '%known_ltl
From: |
Stefano Lattarini |
Subject: |
[Automake-NG] [PATCH 2/7] [ng] automake: new global variable '%known_ltlibraries' |
Date: |
Wed, 6 Jun 2012 00:21:02 +0200 |
This is just a preparatory refactoring in view of future changes.
* automake.in (%known_ltlibraries): New global variable.
(initialize_per_input): Reset it.
(handle_ltlibraries): Register processed libtool libraries in
'%known_ltlibraries' rather than in '%known_libraries'.
(lang_vala_finish): Also take into account the contents of
'%known_ltlibraries'; since we are at it, refactor a little
to remove some inconsistency and code duplication.
Signed-off-by: Stefano Lattarini <address@hidden>
---
automake.in | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
diff --git a/automake.in b/automake.in
index 0428cf9..7145ded 100644
--- a/automake.in
+++ b/automake.in
@@ -570,10 +570,11 @@ my %dep_files;
# This is a list of all targets to run during "make dist".
my @dist_targets;
-# Keep track of all programs declared in this Makefile, without
-# $(EXEEXT). @substitutions@ are not listed.
+# Keep track of all programs and libraries declared in this Makefile,
+# without $(EXEEXT). @substitutions@ are not listed.
my %known_programs;
my %known_libraries;
+my %known_ltlibraries;
# This keeps track of which extensions we've seen (that we care
# about).
@@ -681,6 +682,7 @@ sub initialize_per_input ()
%known_programs = ();
%known_libraries= ();
+ %known_ltlibraries= ();
%extension_seen = ();
@@ -2651,7 +2653,7 @@ sub handle_ltlibraries
. "did you mean '$suggestion'?")
}
- ($known_libraries{$onelib} = $bn) =~ s/\.la$//;
+ ($known_ltlibraries{$onelib} = $bn) =~ s/\.la$//;
$where->push_context ("while processing Libtool library '$onelib'");
$where->set (INTERNAL->get);
@@ -5401,13 +5403,14 @@ sub lang_vala_finish_target ($$)
sub lang_vala_finish
{
my ($self) = @_;
+ my @names =
+ (
+ keys %known_programs,
+ keys %known_libraries,
+ keys %known_ltlibraries,
+ );
- foreach my $prog (keys %known_programs)
- {
- lang_vala_finish_target ($self, $prog);
- }
-
- while (my ($name) = each %known_libraries)
+ foreach my $name (@names)
{
lang_vala_finish_target ($self, $name);
}
--
1.7.9.5
- [Automake-NG] [PATCH 0/7] Move detection of possible typos in _SOURCES etc. at make runtime, Stefano Lattarini, 2012/06/05
- [Automake-NG] [PATCH 2/7] [ng] automake: new global variable '%known_ltlibraries',
Stefano Lattarini <=
- [Automake-NG] [PATCH 1/7] [ng] coverage: conditional defn of lib_LIBRARIES and lib_LTLIBRARIES, Stefano Lattarini, 2012/06/05
- [Automake-NG] [PATCH 3/7] [ng] refactor: new make variables am__all_libs and am__all_ltlibs, Stefano Lattarini, 2012/06/05
- [Automake-NG] [PATCH 5/7] [ng] warns: typos in '_DEPENDENCIES' variables are now reported, Stefano Lattarini, 2012/06/05
- [Automake-NG] [PATCH 4/7] [ng] warns: typos in _SOURCES etc. reported at make runtime, Stefano Lattarini, 2012/06/05
- [Automake-NG] [PATCH 6/7] [ng] warns: also report typos for 'LOG_DEPENDENCIES' variables, Stefano Lattarini, 2012/06/05
- [Automake-NG] [PATCH 7/7] [ng] cleanup: unused variable in the automake script removed, Stefano Lattarini, 2012/06/05
- Re: [Automake-NG] [PATCH 0/7] Move detection of possible typos in _SOURCES etc. at make runtime, Akim Demaille, 2012/06/06