]> sourceware.org Git - automake.git/commitdiff
2001-05-13 Tom Tromey <tromey@redhat.com>
authorTom Tromey <tromey@redhat.com>
Sun, 13 May 2001 16:40:28 +0000 (16:40 +0000)
committerTom Tromey <tromey@redhat.com>
Sun, 13 May 2001 16:40:28 +0000 (16:40 +0000)
* tests/Makefile.am (TESTS): Added python.test.
* tests/python.test: New file.
* automake.in (handle_languages): Use
config_aux_dir_set_in_configure_in.
(handle_python): Correctly mention AM_PATH_PYTHON.  Use
py-compile, not py_comp.  Define py_compile macro.

2001-05-13  Derek Price  <dprice@openavenue.com>

* automake.in (require_file_with_conf_line,
require_file_with_line, require_file): Pass a @require_file_path
of $relative_dir instead of '.' to require_file_internal so that
all the special casing of '.' can be removed elsewhere.
(require_config_file, require_conf_file_with_line,
require_conf_file_with_conf_line): Remove special casing for '.'
and make sure $config_aux_dir is maintained properly.
(require_file_internal): Remove special casing of '.' and set
@require_file_path when missing files are added.
(maybe_push_required_file): Remove special casing of '.'
(handle_dependencies): Remove a workaround for a bug now fixed
and remove $config_aux_dir special casing.
(handle_configure): Remove special casing for $config_aux_dir
(handle_python): Ditto.
(yacc_lex_finish_helper): Change $config_aux_dir switch to
switch on the value of $config_aux_dir_set_in_configure_in.
(handle_texinfo): Ditto.
(scan_one_configure_file): Set $config_aux_dir and
$config_aux_dir_set_in_configure_in properly so special casing
on the value of $config_aux_dir can be removed elsewhere.
* tests/depcomp.test: New file.
* tests/confsub.test: Look for depcomp in $(top_srcdir) instead of the
first subdir containing a C file.
* tests/libobj2.test: Ditto.
* tests/Makefile.am (TESTS): Added 'depcomp.test'.

ChangeLog
automake.in
tests/Makefile.am
tests/Makefile.in
tests/confsub.test
tests/depcomp.test [new file with mode: 0755]
tests/libobj2.test
tests/python.test [new file with mode: 0755]

index 0f40844298cd86deff68f57bb37d047824bdfff9..641e1bb0d68470b1b3808520dcd58afe904f6b79 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,40 @@
+2001-05-13  Tom Tromey  <tromey@redhat.com>
+
+       * tests/Makefile.am (TESTS): Added python.test.
+       * tests/python.test: New file.
+       * automake.in (handle_languages): Use
+       config_aux_dir_set_in_configure_in.
+       (handle_python): Correctly mention AM_PATH_PYTHON.  Use
+       py-compile, not py_comp.  Define py_compile macro.
+
+2001-05-13  Derek Price  <dprice@openavenue.com>
+
+       * automake.in (require_file_with_conf_line,
+       require_file_with_line, require_file): Pass a @require_file_path
+       of $relative_dir instead of '.' to require_file_internal so that
+       all the special casing of '.' can be removed elsewhere.
+       (require_config_file, require_conf_file_with_line,
+       require_conf_file_with_conf_line): Remove special casing for '.'
+       and make sure $config_aux_dir is maintained properly.
+       (require_file_internal): Remove special casing of '.' and set
+       @require_file_path when missing files are added.
+       (maybe_push_required_file): Remove special casing of '.'
+       (handle_dependencies): Remove a workaround for a bug now fixed
+       and remove $config_aux_dir special casing.
+       (handle_configure): Remove special casing for $config_aux_dir
+       (handle_python): Ditto.
+       (yacc_lex_finish_helper): Change $config_aux_dir switch to
+       switch on the value of $config_aux_dir_set_in_configure_in.
+       (handle_texinfo): Ditto.
+       (scan_one_configure_file): Set $config_aux_dir and
+       $config_aux_dir_set_in_configure_in properly so special casing
+       on the value of $config_aux_dir can be removed elsewhere.
+       * tests/depcomp.test: New file.
+       * tests/confsub.test: Look for depcomp in $(top_srcdir) instead of the
+       first subdir containing a C file.
+       * tests/libobj2.test: Ditto.
+       * tests/Makefile.am (TESTS): Added 'depcomp.test'.
+
 2001-05-12  Tom Tromey  <tromey@redhat.com>
 
        * tests/gcj.test: Updated for gcj dependency tracking.
        * automake.in (handle_ltlibraries): Allow _LDFLAGS to be
        conditionally defined.  Fixes PR automake/77 and ldflags.test.
 
+2000-12-05  Derek Price  <dprice@openavenue.com>
+
+       * automake.in (require_file_with_conf_line,
+       require_file_with_line, require_file): Pass a @require_file_path
+       of $relative_dir instead of '.' to require_file_internal so that
+       all the special casing of '.' can be removed elsewhere.
+       (require_config_file, require_conf_file_with_line,
+       require_conf_file_with_conf_line): Remove special casing for '.'
+       and make sure $config_aux_dir is maintained properly.
+       (require_file_internal): Remove special casing of '.' and set
+       @require_file_path when missing files are added.
+       (maybe_push_required_file): Remove special casing of '.'
+       (handle_dependencies): Remove a workaround for a bug now fixed
+       and remove $config_aux_dir special casing.
+       (handle_configure): Remove special casing for $config_aux_dir
+       (handle_python): Ditto.
+       (yacc_lex_finish_helper): Change $config_aux_dir switch to
+       switch on the value of $config_aux_dir_set_in_configure_in.
+       (handle_texinfo): Ditto.
+       (scan_one_configure_file): Set $config_aux_dir and
+       $config_aux_dir_set_in_configure_in properly so special casing
+       on the value of $config_aux_dir can be removed elsewhere.
+
+       * tests/depcomp.test: New file.
+       * tests/confsub.test: Look for depcomp in $(top_srcdir) instead of the
+       first subdir containing a C file.
+       * tests/libobj2.test: Ditto.
+       * tests/Makefile.am (TESTS): Added 'depcomp.test'.
+
 2000-11-25  Tom Tromey  <tromey@cygnus.com>
 
        * automake.in (file_contents_with_transform): Added file name and
index a286507a2f997d1aa4527460d2aa0f7b9b2cf67b..f980d5f141c2ba6cadfceaa14a6e7095e55fd23e 100755 (executable)
@@ -364,6 +364,7 @@ my $ac_output_line = 0;
 # can be set by AC_CONFIG_AUX_DIR.
 my @config_aux_path = ('.', '..', '../..');
 my $config_aux_dir = '';
+my $config_aux_dir_set_in_configure_in = 0;
 
 # Whether AM_GNU_GETTEXT has been seen in configure.ac.
 my $seen_gettext = 0;
@@ -400,7 +401,7 @@ my $package_version_line = 0;
 # TRUE if we've seen AM_PATH_LISPDIR.
 my $seen_lispdir = 0;
 
-# TRUE if we've seen AM_CHECK_PYTHON.
+# TRUE if we've seen AM_PATH_PYTHON.
 my $seen_pythondir = 0;
 
 # TRUE if we've seen AC_EXEEXT.
@@ -1447,23 +1448,8 @@ sub handle_languages
        # be empty.
        if (&saw_sources_p (0) && keys %dep_files)
        {
-           my $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.
-           my $depcomp_dir = ($config_aux_dir_specified ? $config_aux_dir
-                              : '.');
-           $require_file_found{'depcomp'} = 1 if -f "$depcomp_dir/depcomp";
-
            # Set location of depcomp.
-           my $prefix = ($config_aux_dir_specified ? $config_aux_dir
-                         : '$(top_srcdir)');
-
-           &define_variable ('depcomp', "\$(SHELL) $prefix/depcomp");
+           &define_variable ('depcomp', "\$(SHELL) $config_aux_dir/depcomp");
 
            &require_config_file ($FOREIGN, 'depcomp');
 
@@ -2859,14 +2845,14 @@ sub handle_texinfo
                                          'mdate-sh');
 
            my $conf_dir;
-           if ($config_aux_dir eq '.' || $config_aux_dir eq '')
+           if ($config_aux_dir_set_in_configure_in)
            {
-               $conf_dir = '$(srcdir)/';
+               $conf_dir = $config_aux_dir;
+               $conf_dir .= '/' unless $conf_dir =~ /\/$/;
            }
            else
            {
-               $conf_dir = $config_aux_dir;
-               $conf_dir .= '/' unless $conf_dir =~ /\/$/;
+               $conf_dir = '$(srcdir)/';
            }
            $output_rules .= &file_contents ('texi-vers',
                                             ('TEXI'  => $info_cursor,
@@ -2909,7 +2895,7 @@ sub handle_texinfo
        &define_variable ('TEXINFO_TEX', "$texinfodir/texinfo.tex");
 
     }
-    elsif ($config_aux_dir ne '.' && $config_aux_dir ne '')
+    elsif ($config_aux_dir_set_in_configure_in)
     {
         $texinfodir = $config_aux_dir;
        &define_variable ('TEXINFO_TEX', "$texinfodir/texinfo.tex");
@@ -3580,16 +3566,8 @@ sub handle_configure
     }
 
     # Set location of mkinstalldirs.
-    if ($config_aux_dir ne '.' && $config_aux_dir ne '')
-    {
-       &define_variable ('mkinstalldirs', ('$(SHELL) ' . $config_aux_dir
-                                           . '/mkinstalldirs'));
-    }
-    else
-    {
-       &define_variable ('mkinstalldirs',
-                         '$(SHELL) $(top_srcdir)/mkinstalldirs');
-    }
+    &define_variable ('mkinstalldirs',
+                     ('$(SHELL) ' . $config_aux_dir . '/mkinstalldirs'));
 
     &am_line_error ('CONFIG_HEADER',
                    "`CONFIG_HEADER' is an anachronism; now determined from `$configure_ac'")
@@ -4123,10 +4101,11 @@ sub handle_python
     return if ! @pyfiles;
 
     # Found some python.
-    &am_error ("`python_PYTHON' defined but `AM_CHECK_PYTHON' not in `$configure_ac'")
+    &am_error ("`python_PYTHON' defined but `AM_PATH_PYTHON' not in `$configure_ac'")
        if ! $seen_pythondir && &variable_defined ('python_PYTHON');
 
-    &require_file_with_conf_line ('AM_CHECK_PYTHON', $FOREIGN, 'py_comp');
+    &require_file_with_conf_line ('AM_PATH_PYTHON', $FOREIGN, 'py-compile');
+    &define_variable ('py_compile', $config_aux_dir . '/py-compile');
 }
 
 # Handle Java.
@@ -4451,6 +4430,7 @@ sub scan_one_autoconf_file
        if (/$AC_CONFIG_AUX_DIR_PATTERN/o)
        {
            @config_aux_path = &unquote_m4_arg ($1);
+           $config_aux_dir_set_in_configure_in = 1;
        }
 
        # Check for ansi2knr.
@@ -5024,7 +5004,7 @@ sub yacc_lex_finish_helper
     # allow parallel builds to work correctly.  FIXME: for now, no
     # line number.
     &require_config_file ($FOREIGN, 'ylwrap');
-    if ($config_aux_dir ne '.' && $config_aux_dir ne '')
+    if ($config_aux_dir_set_in_configure_in)
     {
        &define_variable ('YLWRAP', $config_aux_dir . "/ylwrap");
     }
@@ -7314,8 +7294,7 @@ sub maybe_push_required_file
 {
     my ($dir, $file, $fullfile) = @_;
 
-    # FIXME: Once again, special-case `.'.
-    if ($dir eq $relative_dir || $dir eq '.')
+    if ($dir eq $relative_dir)
     {
        &push_dist_common ($file);
     }
@@ -7356,16 +7335,8 @@ sub require_file_internal
        my $dangling_sym = 0;
        foreach my $dir (@require_file_paths)
        {
-           if ($dir eq '.')
-           {
-               $fullfile = $relative_dir . "/" . $file;
-               $errdir = $relative_dir unless $errdir;
-           }
-           else
-           {
-               $fullfile = $dir . "/" . $file;
-               $errdir = $dir unless $errdir;
-           }
+           $fullfile = $dir . "/" . $file;
+           $errdir = $dir unless $errdir;
 
            # Use different name for "error filename".  Otherwise on
            # an error the bad file will be reported as eg
@@ -7396,7 +7367,7 @@ sub require_file_internal
        {
            if ($strictness >= $mystrict)
            {
-               if ($dangling_sym && ($force_missing || $add_missing))
+               if ($dangling_sym && $add_missing)
                {
                    unlink ($fullfile);
                }
@@ -7449,6 +7420,9 @@ sub require_file_internal
 
                    &maybe_push_required_file (dirname ($errfile),
                                               $file, $errfile);
+
+                   # Prune the path list.
+                   @require_file_paths = &dirname ($errfile);
                }
 
                if ($suppress)
@@ -7486,19 +7460,19 @@ sub require_file_internal
 # configure.ac, not the current Makefile.am.
 sub require_file_with_conf_line
 {
-    @require_file_paths = '.';
+    @require_file_paths = $relative_dir;
     &require_file_internal (1, @_);
 }
 
 sub require_file_with_line
 {
-    @require_file_paths = '.';
+    @require_file_paths = $relative_dir;
     &require_file_internal (0, @_);
 }
 
 sub require_file
 {
-    @require_file_paths = '.';
+    @require_file_paths = $relative_dir;
     &require_file_internal (0, '', @_);
 }
 
@@ -7510,14 +7484,8 @@ sub require_config_file
     &require_file_internal (1, '', @_);
     my $dir = $require_file_paths[0];
     @config_aux_path = @require_file_paths;
-    if ($dir eq '.')
-    {
-       $config_aux_dir = '.';
-    }
-    else
-    {
-       $config_aux_dir = '$(top_srcdir)/' . $dir;
-    }
+     # Avoid unsightly '/.'s.
+    $config_aux_dir = '$(top_srcdir)' . ($dir eq '.' ? "" : "/$dir");
 }
 
 # Assumes that the line number is in Makefile.am.
@@ -7527,14 +7495,8 @@ sub require_conf_file_with_line
     &require_file_internal (0, @_);
     my $dir = $require_file_paths[0];
     @config_aux_path = @require_file_paths;
-    if ($dir eq '.')
-    {
-       $config_aux_dir = '.';
-    }
-    else
-    {
-       $config_aux_dir = '$(top_srcdir)/' . $dir;
-    }
+     # Avoid unsightly '/.'s.
+    $config_aux_dir = '$(top_srcdir)' . ($dir eq '.' ? "" : "/$dir");
 }
 
 # Assumes that the line number is in configure.ac.
@@ -7544,14 +7506,8 @@ sub require_conf_file_with_conf_line
     &require_file_internal (1, @_);
     my $dir = $require_file_paths[0];
     @config_aux_path = @require_file_paths;
-    if ($dir eq '.')
-    {
-       $config_aux_dir = '.';
-    }
-    else
-    {
-       $config_aux_dir = '$(top_srcdir)/' . $dir;
-    }
+    # avoid unsightly '/.'s.
+    $config_aux_dir = '$(top_srcdir)' . ($dir eq '.' ? "" : "/$dir");
 }
 
 ################################################################
index 314a2c912de3a8eda4468bb829b2bd94f1820ca6..fc77fe1d40b392e0f601fd1051b92c5fd2943579 100644 (file)
@@ -92,6 +92,7 @@ defun2.test \
 dejagnu.test \
 depacl.test \
 depacl2.test \
+depcomp.test \
 depend.test \
 depend3.test \
 discover.test \
@@ -214,6 +215,7 @@ prefix.test \
 primary.test \
 primary2.test \
 proginst.test \
+python.test \
 ranlib.test \
 recurs.test \
 recurs2.test \
index 93ad14a391c971ce7aac37508957336b532b8a21..4bb65ed93c9a4bee2a41168d173a48804a1e9fb2 100644 (file)
@@ -164,6 +164,7 @@ defun2.test \
 dejagnu.test \
 depacl.test \
 depacl2.test \
+depcomp.test \
 depend.test \
 depend3.test \
 discover.test \
@@ -286,6 +287,7 @@ prefix.test \
 primary.test \
 primary2.test \
 proginst.test \
+python.test \
 ranlib.test \
 recurs.test \
 recurs2.test \
index a66679b47c1f0e065589b0844a0230d56aa79557..2e0778f77307d051b1d342b8a7033e477e359f35 100755 (executable)
@@ -27,8 +27,6 @@ END
 
 : > subdir/config.h.in
 
-mv depcomp subdir
-
 $ACLOCAL || exit 1
 $AUTOMAKE || exit 1
 
diff --git a/tests/depcomp.test b/tests/depcomp.test
new file mode 100755 (executable)
index 0000000..35964b5
--- /dev/null
@@ -0,0 +1,35 @@
+#! /bin/sh
+
+# Test to make sure depcomp is installed and found properly
+# when required for multiple directories
+
+. $srcdir/defs || exit 1
+
+cat > configure.in << 'END'
+AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+PACKAGE=nonesuch
+VERSION=nonesuch
+AC_PROG_CC
+AC_OUTPUT(subdir/Makefile subdir2/Makefile)
+END
+
+rm -f depcomp
+mkdir subdir
+mkdir subdir2
+
+cat > subdir/Makefile.am << 'END'
+noinst_PROGRAMS = foo
+foo_SOURCES = foo.c
+END
+
+cp subdir/Makefile.am subdir2/Makefile.am
+
+: > subdir/foo.c
+: > subdir2/foo.c
+
+$ACLOCAL || exit 1
+$AUTOMAKE --add-missing || exit 1
+
+# There used to be a bug where this was created in the first subdir with C
+# sources in it instead of in $top_srcdir or $ac_auxdir
+test -f depcomp || exit 1
index 305099f1e1a7325fe43798c4f0be7cc1c6dc6704..6a185cbea37395254d39a660730360dc1681cf0a 100755 (executable)
@@ -28,8 +28,6 @@ END
 
 : > subdir/fsusage.c
 
-mv depcomp subdir
-
 $ACLOCAL || exit 1
 $AUTOMAKE || exit 1
 
diff --git a/tests/python.test b/tests/python.test
new file mode 100755 (executable)
index 0000000..b3b52b9
--- /dev/null
@@ -0,0 +1,15 @@
+#! /bin/sh
+
+# Test to make sure py_compile is defined.
+
+. $srcdir/defs || exit 1
+
+echo 'AM_PATH_PYTHON' >> configure.in
+
+cat > Makefile.am << 'END'
+python_PYTHON = foo.py
+END
+
+$AUTOMAKE -a || exit 1
+
+grep '^py_compile =' Makefile.in
This page took 0.049818 seconds and 5 git commands to generate.