]> sourceware.org Git - automake.git/commitdiff
(handle_dependencies): Set $require_file_found{'depcomp'}
authorJim Meyering <jim@meyering.net>
Sun, 6 Aug 2000 13:34:09 +0000 (13:34 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 6 Aug 2000 13:34:09 +0000 (13:34 +0000)
if the depcomp file exists, before calling require_config_file on
`depcomp'.  This makes require_file_internal skip its buggy existence
test that would make automake fail (with `required file `lib/depcomp'
not found') when AC_CONFIG_AUX_DIR is not set.

This change change does not fix the existing bug where, if `depcomp'
is not present in the build directory (at the top level), automake
still gives the inaccurate diagnostic about *lib*/depcomp rather
than ./depcomp.

automake.in

index 66ed92d37904e11a66d1032cece9b9f729504a90..7ffefe2a5ef2a855ec7a143ac94e94757230a7b8 100755 (executable)
@@ -3016,19 +3016,25 @@ sub handle_dependencies
        # be empty.
        if (&saw_sources_p (0) && keys %dep_files)
        {
-           &require_config_file ($FOREIGN, 'depcomp');
+           local ($config_aux_dir_specified) = ($config_aux_dir ne '.'
+                                                && $config_aux_dir ne '');
+
+           # Set $require_file_found{'depcomp'} if the depcomp file exists,
+           # before calling require_config_file on `depcomp'.  This makes
+           # require_file_internal skip its buggy existence test that would
+           # make automake fail (with `required file `lib/depcomp' not found')
+           # when AC_CONFIG_AUX_DIR is not set.  See tests/subdir4.test.
+           local ($depcomp_dir) = ($config_aux_dir_specified ? $config_aux_dir
+                                   : '.');
+           $require_file_found{'depcomp'} = 1 if -f "$depcomp_dir/depcomp";
 
            # Set location of depcomp.
-           if ($config_aux_dir ne '.' && $config_aux_dir ne '')
-           {
-               &define_variable ('depcomp', ('$(SHELL) ' . $config_aux_dir
-                                             . '/depcomp'));
-           }
-           else
-           {
-               &define_variable ('depcomp',
-                                 '$(SHELL) $(top_srcdir)/depcomp');
-           }
+           local ($prefix) = ($config_aux_dir_specified ? $config_aux_dir
+                              : '$(top_srcdir)');
+
+           &define_variable ('depcomp', "\$(SHELL) $prefix/depcomp");
+
+           &require_config_file ($FOREIGN, 'depcomp');
 
            local ($iter);
            local (@deplist) = sort keys %dep_files;
This page took 0.038937 seconds and 5 git commands to generate.