|
possible fix for PR/315: msg#00043sysutils.automake.patches
Richard, is the code I'm destroying below very important? I've got the impression it was just a "bonus-optimization", but I can't say I understand all the issues with conditional combinatorial explosions and al. Index: ChangeLog --- ChangeLog +++ ChangeLog @@ -1,1 +1,12 @@ +2002-04-22 Alexandre Duret-Lutz <duret_g@xxxxxxxx> + + Fix PR automake/315: + * automake.in (subobjname): Always generate unique variable name, + even if this leads to duplication of objects. The conditions + allowing the share object variable between target are hard to + compute at this point. + (%substnums): Remove. + * tests/Makefile.am (XFAIL_TESTS): Remove specflags8.test. + * tests/specflags8.test: Mention PR 315. + Index: automake.in =================================================================== RCS file: /cvs/automake/automake/automake.in,v retrieving revision 1.1292 diff -u -r1.1292 automake.in --- automake.in 19 Apr 2002 20:53:56 -0000 1.1292 +++ automake.in 22 Apr 2002 20:30:14 -0000 @@ -599,11 +599,6 @@ # force. my @substtos; -# Associates a variable name, together with a list of substitutions to be -# performed on it, with a number. Used to provide unique names for generated -# variables. -my %substnums = (); - # If a file name appears as a key in this hash, then it has already # been checked for. This variable is local to the "require file" # functions. @@ -2238,34 +2233,20 @@ # $VARNAME is the name of the variable the object variable is being # generated from. # -# This function also looks at @substfroms and @substtos to determine any -# substitutions to be performed on the object variable. +# This function returns unique names. # -# The name returned is unique for the combination of $varname and -# substitutions to be performed. +# This is suboptimal, we only have to generate a name which is +# unique for the combination of $VARNAME, substitutions performed +# on $VARNAME, and uses in targets with per-target flags. +# However this latter condition (is the variable used in such a target?) +# is hard to evaluate at this point because we need to know each language +# used (and for this we'd have to follow the suffix rules, for all possibly +# compiled sources, etc.). +my $subobjnamenum = 0; sub subobjname ($) { - my ($varname) = @_; - my $key = $varname; - my $substnum=$#substfroms; - while ($substnum >= 0) - { - if (defined $substfroms[$substnum] && - ($substfroms[$substnum] || $substtos[$substnum])) - { - $key .= ":" . $substfroms[$substnum] . "=" . $substtos[$substnum]; - } - $substnum -= 1; - } - - my $num = $substnums{$key}; - if (! $num) - { - $num = keys(%substnums) + 1; - $substnums{$key} = $num; - } - - return "am__objects_$num"; + ++$subobjnamenum; + return "am__objects_${subobjnamenum}"; } Index: tests/Makefile.am =================================================================== RCS file: /cvs/automake/automake/tests/Makefile.am,v retrieving revision 1.390 diff -u -r1.390 Makefile.am --- tests/Makefile.am 19 Apr 2002 10:21:34 -0000 1.390 +++ tests/Makefile.am 22 Apr 2002 20:30:15 -0000 @@ -1,6 +1,6 @@ ## Process this file with automake to create Makefile.in -XFAIL_TESTS = condd.test subdir5.test auxdir2.test cond17.test specflags8.test +XFAIL_TESTS = condd.test subdir5.test auxdir2.test cond17.test TESTS = \ acinclude.test \ Index: tests/Makefile.in =================================================================== RCS file: /cvs/automake/automake/tests/Makefile.in,v retrieving revision 1.506 diff -u -r1.506 Makefile.in --- tests/Makefile.in 19 Apr 2002 10:21:34 -0000 1.506 +++ tests/Makefile.in 22 Apr 2002 20:30:16 -0000 @@ -84,7 +84,7 @@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ -XFAIL_TESTS = condd.test subdir5.test auxdir2.test cond17.test specflags8.test +XFAIL_TESTS = condd.test subdir5.test auxdir2.test cond17.test TESTS = \ acinclude.test \ Index: tests/specflags8.test =================================================================== RCS file: /cvs/automake/automake/tests/specflags8.test,v retrieving revision 1.2 diff -u -r1.2 specflags8.test --- tests/specflags8.test 2 Apr 2002 16:20:15 -0000 1.2 +++ tests/specflags8.test 22 Apr 2002 20:30:16 -0000 @@ -2,6 +2,7 @@ # Like the ctags/etags example from the manual, # with one extra indirection in the sources. +# PR 315. . $srcdir/defs || exit 1 -- Alexandre Duret-Lutz |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: AU_DEFUN obsolete functions: 00043, Alexandre Duret-Lutz |
|---|---|
| Next by Date: | Re: possible fix for PR/315: 00043, Richard Boulton |
| Previous by Thread: | FYI: doc update for PR/151 and PR/314i: 00043, Alexandre Duret-Lutz |
| Next by Thread: | Re: possible fix for PR/315: 00043, Richard Boulton |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |