]> sourceware.org Git - automake.git/commitdiff
* automake.in (&generate_makefile) Use macro_define to define
authorAkim Demaille <akim@epita.fr>
Mon, 9 Apr 2001 09:02:36 +0000 (09:02 +0000)
committerAkim Demaille <akim@epita.fr>
Mon, 9 Apr 2001 09:02:36 +0000 (09:02 +0000)
SOURCES and OBJECTS.
(&variable_defined): Don't check for $conditional{VAR}{COND} as
this would make perl create $condition{VAR}, which we don't want.

ChangeLog
automake.in

index f9cfaaced5e6e21defd99b401a6101b2c97b4935..4449742f0f8e3c715c8ccc19f2b6e86c177fd3f3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2001-04-09  Akim Demaille  <akim@epita.fr>
+
+       * automake.in (&generate_makefile) Use macro_define to define
+       SOURCES and OBJECTS.
+       (&variable_defined): Don't check for $conditional{VAR}{COND} as
+       this would make perl create $condition{VAR}, which we don't want.
+
 2001-04-09  Akim Demaille  <akim@epita.fr>
 
        * automake.in (&variable_defined, &define_pretty_variable):
index 153401e914c619f254e6065ce75970621878b47a..4512a7b5cd5c7cb370ad5ceb2a8f54af96605976 100755 (executable)
@@ -1070,8 +1070,10 @@ sub generate_makefile
 
     # Re-init SOURCES and OBJECTS.  FIXME: other code shouldn't depend
     # on this (but currently does).
-    $conditional{'SOURCES'}{'TRUE'} = join (' ', @sources);
-    $conditional{'OBJECTS'}{'TRUE'} = join (' ', @objects);
+    macro_define ('SOURCES', 1, '', 'TRUE',
+                    join (' ', @sources), 'internal');
+    macro_define ('OBJECTS', 1, '', 'TRUE',
+                    join (' ', @objects), 'internal');
     &define_pretty_variable ('DIST_SOURCES', '', @dist_sources);
 
     &handle_multilib;
@@ -5694,25 +5696,30 @@ sub variable_defined ($$)
 
     $cond ||= 'TRUE';
 
-    if (!$var_is_am{$var})
-    {
-      if (!exists $conditional{$var}{$cond})
-       {
-         # The variable is not defined for the given condition.
-         return 0;
-       }
-
-      # Even a conditional examination is good enough for us.  FIXME:
-      # really should maintain examined status on a per-condition
-      # basis.
-      $content_seen{$var} = 1;
-      return 1;
-    }
+    # Unfortunately we can't just check for $conditional{VAR}{COND}
+    # as this would make perl create $condition{VAR}, which we
+    # don't want.
+    if (!exists $conditional{$var})
+      {
+       if (defined $targets{$var})
+         {
+           &am_line_error ($var, "`$var' is a target; expected a variable")
+         }
+       # The variable is not defined
+       return 0;
+      }
 
-    &am_line_error ($var, "`$var' is a target; expected a variable")
-      if defined $targets{$var};
+    if ($var_is_am{$var}
+       || !exists $conditional{$var}{$cond})
+      {
+       # The variable is not defined for the given condition.
+       return 0;
+      }
 
-    return 0;
+    # Even a conditional examination is good enough for us.  FIXME:
+    # really should maintain examined status on a per-condition basis.
+    $content_seen{$var} = 1;
+    return 1;
 }
 
 # Mark a variable as examined.
This page took 0.035853 seconds and 5 git commands to generate.