DISTFILES containing a directory and files in that directory.
[platform/upstream/automake.git] / automake.in
index 156dfba..9367a08 100755 (executable)
@@ -285,12 +285,10 @@ use constant COMPILE_ORDINARY => 2;
 use constant INTERNAL => new Automake::Location;
 
 # Serialization keys for message queues.
-use constant {
-  QUEUE_MESSAGE   => "msg",
-  QUEUE_CONF_FILE => "conf file",
-  QUEUE_LOCATION  => "location",
-  QUEUE_STRING    => "string"
-};
+use constant QUEUE_MESSAGE   => "msg";
+use constant QUEUE_CONF_FILE => "conf file";
+use constant QUEUE_LOCATION  => "location";
+use constant QUEUE_STRING    => "string";
 \f
 
 ## ---------------------------------- ##
@@ -3573,6 +3571,7 @@ sub handle_tags
                          . "\tdone\n");
        push (@tag_deps, 'tags-recursive');
        &depend ('.PHONY', 'tags-recursive');
+       &depend ('.MAKE', 'tags-recursive');
 
        $output_rules .= ("ctags-recursive:\n"
                          . "\tlist=\'\$(SUBDIRS)\'; for subdir in \$\$list; do \\\n"
@@ -3583,6 +3582,7 @@ sub handle_tags
                          . "\tdone\n");
        push (@ctag_deps, 'ctags-recursive');
        &depend ('.PHONY', 'ctags-recursive');
+       &depend ('.MAKE', 'ctags-recursive');
     }
 
     if (&saw_sources_p (1)
@@ -4505,6 +4505,7 @@ sub handle_all ($)
                        . '$(MAKE) $(AM_MAKEFLAGS) '
                        . (var ('SUBDIRS') ? 'all-recursive' : 'all-am')
                        . "\n\n");
+        depend ('.MAKE', 'all');
       }
     else
       {
@@ -4535,13 +4536,19 @@ sub do_check_merge_target ()
       # `all', to ensure all the primary targets are built.  Then it
       # must build the local check rules.
       $output_rules .= "check-am: all-am\n";
+      if (@check)
+        {
+         pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t  ",
+                            @check);
+         depend ('.MAKE', 'check-am');
+       }
+    }
+  if (@check_tests)
+    {
       pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t  ",
-                        @check)
-       if @check;
+                        @check_tests);
+      depend ('.MAKE', 'check-am');
     }
-  pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t  ",
-                    @check_tests)
-    if @check_tests;
 
   depend '.PHONY', 'check', 'check-am';
   # Handle recursion.  We have to honor BUILT_SOURCES like for `all:'.
@@ -4551,6 +4558,8 @@ sub do_check_merge_target ()
                       : '')
                    . (var ('SUBDIRS') ? 'check-recursive' : 'check-am')
                    . "\n");
+  depend ('.MAKE', 'check')
+    if var ('BUILT_SOURCES');
 }
 
 # handle_clean ($MAKEFILE)