]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
More fixes
authorTom Tromey <tromey@redhat.com>
Sun, 1 Dec 1996 20:35:52 +0000 (20:35 +0000)
committerTom Tromey <tromey@redhat.com>
Sun, 1 Dec 1996 20:35:52 +0000 (20:35 +0000)
14 files changed:
ChangeLog
README-alpha
TODO
automake.in
automake.texi
lib/am/libtool.am
lib/am/progs.am
libtool.am
ltlibs.am
m4/header.m4
progs.am
tests/ChangeLog
tests/extra2.test [new file with mode: 0755]
version.texi

index e1d1bb7adc84266297e7cd07f37d1fe19be669dd..7f0363c42134eec8bbca02089293699441032419 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,26 @@
 Sun Nov 24 00:33:50 1996  Tom Tromey  <tromey@cygnus.com>
 
+       * automake.in (handle_source_transform): Don't define
+       EXTRA_prog_SOURCES unnecessarily.  Test extra2.test.
+
+       * automake.in (initialize_per_input): New variables
+       included_generic_compile, included_knr_compile,
+       included_libtool_compile.
+       (get_object_extension): Use them.
+
+       * automake.in (handle_single_transform_list): Removed
+       Objective-C/C++ support (didn't really work anyway).
+       (handle_single_transform_list): Handle assembly specially.
+
+       * automake.in (handle_yacc_lex_cxx): Set --mode=compile or
+       --mode=link when running libtool.
+
+       * ltlibs.am: Set --mode=install when running libtool.
+       (uninstall-@DIR@PROGRAMS): Set --mode=uninstall when running
+       libtool.
+       * libtool.am (.c.lo): Set --mode=compile when running libtool.
+       * progs.am: Set --mode=install when running libtool.
+
        Fix for bug reported by François Pinard:
        * automake.in (do_check_merge_target): New sub.
        (do_one_merge_target): No longer handle `check'.
index 61b8d337b8981704ee245f8506608459d5d40d34..fceb60542e0c8d56aec753d83c29923afb290975 100644 (file)
@@ -4,6 +4,12 @@ GNU mailing list or newsgroup.
 
 A few notes on this particular release:
 
+* automake now requires a very recent version of autoconf.
+
+* Fortran support will be in the next release
+
+A few things that I still haven't gotten to fixing:
+
 * The `missing' program is still not in use.
 
 * The `acinstall' program is distributed but not used; I still must
diff --git a/TODO b/TODO
index 951dd67780cfb7ddccf2d3f9fb5ea5b5a0a220a5..6ce01b7e6eb1e333e52c6d2ae4ce1c8d26a27b0f 100644 (file)
--- a/TODO
+++ b/TODO
@@ -11,7 +11,12 @@ Priorities for release:
   * Scan multiple input files when Makefile is generated?
     This would provide flexibility for large projects; subsumes
     the "Makefile.tmpl" idea
-    Figuring out when to update the sub-parts is hard, maybe
+
+   [ can't do this.  must explain why in manual.
+     basically, solving all the problems is too hard
+     like: how to remove redundancies between generated .in files
+     instead should implement `include' directive for Makefile.am ]
+
   * figure out what to pass as CONFIG_HEADER to config.status
 
 * look @ jim's $(t:=foo) problem
@@ -19,6 +24,10 @@ Priorities for release:
 * should install-foo target for a new dir (eg fooexecdir) be run via
   install-data or install-exec?  Consider examining name of variable.
 
+* no mention of $(LIBTOOL) in "clean" Makefile (?)
+
+* compatibility with older versions of autoconf if not --gnu
+
 ================================================================
 
 * only remove libtool at top level?
index d443252c45eba1e285ac31c555a61faada5e14b7..3d98e8de4e4cab92735e9c8938e0dd56d79b2243 100755 (executable)
@@ -591,11 +591,14 @@ sub get_object_extension
 {
     local ($out) = @_;
 
+    # Always set this.
+    $dir_holds_sources = 1;
+
     # Maybe require libtool library object files.
-    local ($l) = '';
+    local ($l, $extension) = ('', 'o');
     $l = 'l' if ($out =~ /^lib.*\.la$/);
 
-    if (! $dir_holds_sources)
+    if (! $included_generic_compile)
     {
        # Boilerplate.
        local ($xform) = '';
@@ -623,22 +626,29 @@ sub get_object_extension
            }
        }
 
-       # Check for automatic de-ANSI-fication.
-       $dir_holds_sources = 'o';
        push (@suffixes, '.c', '.o');
        push (@clean, 'compile');
 
-       if ($seen_libtool)
-       {
-           # Output the libtool compilation rules.
-           $output_rules .= &file_contents ('libtool');
-           &push_phony_cleaners ('libtool');
+       $included_generic_compile = 1;
+    }
 
-           push (@suffixes, '.lo');
-           push (@clean, 'libtool');
-       }
+    if ($seen_libtool && ! $included_libtool_compile)
+    {
+       # Output the libtool compilation rules.
+       $output_rules .= &file_contents ('libtool');
+       &push_phony_cleaners ('libtool');
+
+       push (@suffixes, '.lo');
+       push (@clean, 'libtool');
+
+       $included_libtool_compile = 1;
+    }
 
-       if (defined $options{'ansi2knr'})
+    # Check for automatic de-ANSI-fication.
+    if (defined $options{'ansi2knr'})
+    {
+       $extension = '$o';
+       if (! $included_knr_compile)
        {
            if (! $am_c_prototypes)
            {
@@ -649,8 +659,8 @@ sub get_object_extension
                $am_c_prototypes = 1;
            }
 
-           $dir_holds_sources = '$o';
            push (@suffixes, '._c', '._o');
+           push (@suffixes, '._lo') if $seen_libtool;
 
            # Only require ansi2knr files if they should appear in
            # this directory.
@@ -686,11 +696,11 @@ sub get_object_extension
            push (@clean, 'kr');
            &push_phony_cleaners ('kr');
 
-           # FIXME - should be able to do libtool objects, too.
+           $included_knr_compile = 1;
        }
     }
 
-    return '.' . $l . $dir_holds_sources;
+    return '.' . $l . $extension;
 }
 
 # Handle yacc and lex.
@@ -768,7 +778,7 @@ sub handle_yacc_lex_cxx
     if ($seen_libtool)
     {
        &define_configure_variable ("LIBTOOL");
-       $libtool = '$(LIBTOOL) ';
+       $libtool = '$(LIBTOOL) --mode=link ';
     }
 
     #
@@ -790,7 +800,7 @@ sub handle_yacc_lex_cxx
            $output_rules .= ("$ext.o:\n"
                              . "\t\$(CXXCOMPILE) -c \$<\n");
            $output_rules .= ("$ext.lo:\n"
-                             . "\t\$(LIBTOOL) $(CXXCOMPILE) -c \$<\n")
+                             . "\t\$(LIBTOOL) --mode=compile $(CXXCOMPILE) -c \$<\n")
                if ($seen_libtool);
        }
 
@@ -917,10 +927,13 @@ sub handle_single_transform_list
            {
                # FORTRAN support.  FIXME: not finished.
            }
-           elsif (s/\.[clysmM]$/._o/)
+           elsif (s/\.s$/.o/)
+           {
+               # .s is assembly.  Just rewrite it.  FIXME: not finished.
+           }
+           elsif (s/\.[cly]$/._o/)
            {
-               # .c is C.  .l is lex.  .y is yacc.  .s is assembly.
-               # .M is Objective-C++.  .m is Objective-C.
+               # .c is C.  .l is lex.  .y is yacc.
 
                # Note: first we rewrite (eg) foo.c to foo._o and push
                # the file onto the list of objects that require
@@ -929,10 +942,6 @@ sub handle_single_transform_list
                # required.
                $de_ansi_objects{$_} = 1;
                s/\._o$/$obj/;
-
-               # FIXME: of course, this should only happen for C
-               # source.  The multi-language support must really be
-               # cleaned up more globally.
                $seen_c_source = 1;
            }
            else
@@ -999,10 +1008,6 @@ sub handle_source_transform
            push (@objects, $unxformed . $obj);
            push (@files, $unxformed . '.c');
        }
-       else
-       {
-           &define_variable ("EXTRA_" . $one_file . "_SOURCES", '');
-       }
 
        ($temp, @result) = &handle_single_transform_list (@files);
        $linker = $temp if $linker eq '';
@@ -3933,10 +3938,17 @@ sub initialize_per_input
     @sources = ();
     @objects = ();
 
-    # TRUE if current directory holds any C source files.  (Actually
-    # holds object extension, but this information is encapsulated in
-    # the function get_object_extension).
-    $dir_holds_sources = '';
+    # TRUE if current directory holds any C source files.
+    $dir_holds_sources = 0;
+
+    # These variables track inclusion of various compile-related .am
+    # files.  $included_generic_compile is TRUE if the basic code has
+    # been included.  $included_knr_compile is TRUE if the ansi2knr
+    # code has been included.  $included_libtool_compile is TRUE if
+    # libtool support has been included.
+    $included_generic_compile = 0;
+    $included_knr_compile = 0;
+    $included_libtool_compile = 0;
 
     # TRUE if current directory holds any headers.
     $dir_holds_headers = 0;
index 8e58e9aabe0b51183421e0377f591119e29dfb1b..3d896a102b9cc42be9710f319090dff7c92f8add 100644 (file)
@@ -7,14 +7,6 @@
 
 @include version.texi
 
-@c Yes, this appears in many Texinfo files.  He's just a likeable guy.
-@ifinfo
-@set Francois Franc,ois
-@end ifinfo
-@tex
-@set Francois Fran\noexpand\ptexc cois
-@end tex
-
 @dircategory GNU admin
 @direntry
 * automake: (automake).                Making Makefile.in's
@@ -28,7 +20,7 @@
 @ifinfo
 This file documents GNU automake @value{VERSION}
 
-Copyright (C) 1995 Free Software Foundation, Inc.
+Copyright (C) 1995, 96 Free Software Foundation, Inc.
 
 Permission is granted to make and distribute verbatim copies of
 this manual provided the copyright notice and this permission notice
@@ -59,7 +51,7 @@ by the Foundation.
 @c copyright page
 @page
 @vskip 0pt plus 1filll
-Copyright @copyright{} 1995 Free Software Foundation, Inc.
+Copyright @copyright{} 1995, 96 Free Software Foundation, Inc.
 @sp 2
 This is the first edition of the GNU Automake documentation,@*
 and is consistent with GNU Automake @value{VERSION}.@*
index 0c3e6a4f281817c02829033ce913916956d54ad4..512b839bed1188f2dc54e3d9794e12b41826c5e4 100644 (file)
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 .c.lo:
-       $(LIBTOOL) $(COMPILE) -c $<
+## Note that we explicitly set the libtool mode.  This avoids any lossage
+## if the program doesn't have a name that libtool expects.
+       $(LIBTOOL) --mode=compile $(COMPILE) -c $<
 
 mostlyclean-libtool:
-## Don't remove 'core.*' because some distributions have eg "core.c".
        rm -f *.lo
 
 clean-libtool:
index bd667e477d7d0740e25f64d0d47c01af8a574f96..401a3a307a6e3cfda34e1140a060b7da6667effd 100644 (file)
@@ -25,7 +25,9 @@ install-@DIR@PROGRAMS: $(@DIR@_PROGRAMS)
 ## It is harmless to unconditionally use $(LIBTOOL) here because it
 ## will be null in non-libtoolized packages, and even if it is set to
 ## a real libtool, its behaviour is identical to normal INSTALL_PROGRAM.
-           $(LIBTOOL) $(INSTALL_PROGRAM) $$p $(@DIR@dir)/`echo $$p|sed '$(transform)'`; \
+## Note that we explicitly set the libtool mode.  This avoids any lossage
+## if the program doesn't have a name that libtool expects.
+           $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(@DIR@dir)/`echo $$p|sed '$(transform)'`; \
          else :; fi; \
        done
 
index 0c3e6a4f281817c02829033ce913916956d54ad4..512b839bed1188f2dc54e3d9794e12b41826c5e4 100644 (file)
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 .c.lo:
-       $(LIBTOOL) $(COMPILE) -c $<
+## Note that we explicitly set the libtool mode.  This avoids any lossage
+## if the program doesn't have a name that libtool expects.
+       $(LIBTOOL) --mode=compile $(COMPILE) -c $<
 
 mostlyclean-libtool:
-## Don't remove 'core.*' because some distributions have eg "core.c".
        rm -f *.lo
 
 clean-libtool:
index 92b159759cb83b21ddd3a182763ff60f506c88c9..12996e354fc0188bb57c87ba9ffb19974ac4d4d3 100644 (file)
--- a/ltlibs.am
+++ b/ltlibs.am
@@ -22,11 +22,13 @@ install-@DIR@PROGRAMS: $(@DIR@_PROGRAMS)
 ## a syntax error in sh.
        list="$(@DIR@_PROGRAMS)"; for p in $$list; do \
          if test -f $$p; then \
-           $(LIBTOOL) $(INSTALL_PROGRAM) $$p $(@DIR@dir)/$$p; \
+## Note that we explicitly set the libtool mode.  This avoids any lossage
+## if the program doesn't have a name that libtool expects.
+           $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(@DIR@dir)/$$p; \
          else :; fi; \
        done
 
 uninstall-@DIR@PROGRAMS:
        list="$(@DIR@_PROGRAMS)"; for p in $$list; do \
-         $(LIBTOOL) rm -f $(@DIR@dir)/$$p; \
+         $(LIBTOOL) --mode=uninstall rm -f $(@DIR@dir)/$$p; \
        done
index 6b15c345ac474555b1b92cd92325e268b3c3eeba..c25922325ba74aa0ed4a819938d4b5796cd19e19 100644 (file)
@@ -1,7 +1,7 @@
 # Like AC_CONFIG_HEADER, but automatically create stamp file.
 
 AC_DEFUN(AM_CONFIG_HEADER,
-[AC_PREREQ([2.11.2])
+[AC_PREREQ([2.12])
 AC_CONFIG_HEADER([$1])
 dnl When config.status generates a header, we must update the stamp-h file.
 dnl This file resides in the same directory as the config header
index bd667e477d7d0740e25f64d0d47c01af8a574f96..401a3a307a6e3cfda34e1140a060b7da6667effd 100644 (file)
--- a/progs.am
+++ b/progs.am
@@ -25,7 +25,9 @@ install-@DIR@PROGRAMS: $(@DIR@_PROGRAMS)
 ## It is harmless to unconditionally use $(LIBTOOL) here because it
 ## will be null in non-libtoolized packages, and even if it is set to
 ## a real libtool, its behaviour is identical to normal INSTALL_PROGRAM.
-           $(LIBTOOL) $(INSTALL_PROGRAM) $$p $(@DIR@dir)/`echo $$p|sed '$(transform)'`; \
+## Note that we explicitly set the libtool mode.  This avoids any lossage
+## if the program doesn't have a name that libtool expects.
+           $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(@DIR@dir)/`echo $$p|sed '$(transform)'`; \
          else :; fi; \
        done
 
index 8aefc528aba78a940972bd7c54ae343131dc61cc..c6bff3acf8929d320213c93095d826478e68232e 100644 (file)
@@ -1,3 +1,7 @@
+Sun Nov 24 14:36:00 1996  Tom Tromey  <tromey@cygnus.com>
+
+       * extra2.test: New file.
+
 Fri Nov 22 00:10:04 1996  Tom Tromey  <tromey@cygnus.com>
 
        * stdlib.test: New file.
diff --git a/tests/extra2.test b/tests/extra2.test
new file mode 100755 (executable)
index 0000000..27a6f0e
--- /dev/null
@@ -0,0 +1,18 @@
+#! /bin/sh
+
+# Check to make sure EXTRA_foo_SOURCES not defined unnecessarily.
+
+. $srcdir/defs || exit 1
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo
+END
+
+$AUTOMAKE || exit 1
+
+grep EXTRA_foo_SOURCES Makefile.in && exit 1
+exit 0
index 21068a39aa088134a31b56b68243901707710a1f..fc7b81946353a50566e86fde9029063a06d84b30 100644 (file)
@@ -1,3 +1,3 @@
-@set UPDATED 21 November 1996
+@set UPDATED 28 November 1996
 @set EDITION 1.1h
 @set VERSION 1.1h