automake
[Top][All Lists]
Advanced

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

36-fix-sub-conditions.patch


From: Akim Demaille
Subject: 36-fix-sub-conditions.patch
Date: Sun, 11 Mar 2001 19:09:00 +0100

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * automake.in (&handle_source_transform):  Use
        &variable_conditions, don't read $conditional{$var}.
        (&variable_conditions_sub): When the call is the top level call,
        generate all the permutations of the conditions.

Index: automake.in
--- automake.in Sat, 10 Mar 2001 18:59:10 +0100 akim (am/f/39_automake.i 1.154 
755)
+++ automake.in Sun, 11 Mar 2001 09:52:42 +0100 akim (am/f/39_automake.i 1.154 
755)
@@ -1900,7 +1900,7 @@ sub handle_source_transform
                unless $prefix =~ /EXTRA_/;
            push (@dist_sources, '$(' . $prefix . $one_file . "_SOURCES)")
                unless $prefix =~ /^nodist_/;
-           foreach my $cond (keys %{$conditional{$var}})
+           foreach my $cond (variable_conditions ($var))
              {
                @files = &variable_value_as_list ($var, $cond);
                ($temp, @result) =
@@ -1925,9 +1925,10 @@ sub handle_source_transform
        push (@objects, $unxformed . $obj);
        push (@files, $unxformed . '.c');

-       ($temp, @result) = &handle_single_transform_list ($one_file . 
'_SOURCES',
-                                                         $one_file, $obj,
-                                                         @files);
+       ($temp, @result) =
+         &handle_single_transform_list ($one_file . '_SOURCES',
+                                        $one_file, $obj,
+                                        @files);
        $linker = $temp if $linker eq '';
        &define_pretty_variable ($one_file . "_OBJECTS", '', @result)
     }
@@ -5837,8 +5838,22 @@ sub variable_conditions_sub
     # definitions.
     delete $vars_scanned{$var};

-    return @new_conds
-       if ! $parent;
+    # If there are no parents, then this call is the top level call.
+    if (! $parent)
+      {
+       # Now we want to return all permutations of the subvariable
+       # conditions.
+       my %allconds = ();
+       foreach my $item (@new_conds)
+       {
+           foreach (split (' ', $item))
+           {
+               s/^(.*)_(TRUE|FALSE)$/$1_TRUE/;
+               $allconds{$_} = 1;
+           }
+       }
+       return &variable_conditions_permutations (sort keys %allconds);
+      }

     # If we are being called on behalf of another variable, we need to
     # return all possible permutations of the conditions.  We have



reply via email to

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