[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: possible fix for PR/315
From: |
Alexandre Duret-Lutz |
Subject: |
Re: possible fix for PR/315 |
Date: |
Thu, 25 Apr 2002 18:46:48 +0200 |
User-agent: |
Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.2 (i386-debian-linux-gnu) |
>>> "adl" == Alexandre Duret-Lutz <address@hidden> writes:
[...]
adl> - $num = keys(%substnums) + 1;
adl> - $substnums{$key} = $num;
[...]
adl> +my $subobjnamenum = 0;
adl> +sub subobjname (@)
adl> +{
adl> + my $key = "@_";
adl> +
adl> + return $subobjvar{$key} if exists $subobjvar{$key};
adl> +
adl> + ++$subobjnamenum;
adl> + my $name = "am__objects_${subobjnamenum}";
[...]
Looks like I've introduced a new variable (subobjnamenum) that
wasn't needed before, and that's still not needed now. Besides
I was not reseting it on a per-input basis (harmless, but ugly).
I'm checking in the following.
Index: ChangeLog
===================================================================
RCS file: /cvs/automake/automake/ChangeLog,v
retrieving revision 1.1812.2.12
diff -u -r1.1812.2.12 ChangeLog
--- ChangeLog 25 Apr 2002 07:55:48 -0000 1.1812.2.12
+++ ChangeLog 25 Apr 2002 16:41:01 -0000
@@ -1,5 +1,11 @@
2002-04-25 Alexandre Duret-Lutz <address@hidden>
+ * automake.in (subobjname): Use the length of %subobjvar
+ instead of $subobjnamenum.
+ (subobjnamenum): Remove.
+
+2002-04-25 Alexandre Duret-Lutz <address@hidden>
+
For PR automake/307:
* lib/depcomp: Never compute dependencies in the background, this
can cause races with libtool. Compute the dependencies after
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1287.2.4
diff -u -r1.1287.2.4 automake.in
--- automake.in 24 Apr 2002 07:37:52 -0000 1.1287.2.4
+++ automake.in 25 Apr 2002 16:41:09 -0000
@@ -2330,15 +2330,14 @@
#
# This setup can be the case of a testsuite containing lots (>100) of
# small C programs, all testing the same set of source files.
-my $subobjnamenum = 0;
sub subobjname (@)
{
my $key = "@_";
return $subobjvar{$key} if exists $subobjvar{$key};
- ++$subobjnamenum;
- my $name = "am__objects_${subobjnamenum}";
+ my $num = 1 + keys (%subobjvar);
+ my $name = "am__objects_${num}";
$subobjvar{$key} = $name;
return $name;
}
--
Alexandre Duret-Lutz