]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
ansi2knr rework. strtod fix. aclocal fixes
authorTom Tromey <tromey@redhat.com>
Sat, 10 Aug 1996 23:15:36 +0000 (23:15 +0000)
committerTom Tromey <tromey@redhat.com>
Sat, 10 Aug 1996 23:15:36 +0000 (23:15 +0000)
17 files changed:
ChangeLog
Makefile.am
Makefile.in
NEWS
TODO
aclocal.in
automake.in
automake.texi
kr-extra.am [moved from kr-vars.am with 81% similarity]
lib/am/Makefile.am
tests/ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/defun.test [new file with mode: 0755]
tests/dup.test [new file with mode: 0755]
tests/mkinstall2.test
version.texi

index 9441717df5b59a979484bc705249d4dc5289da32..ec8e77c4a79a6b04a55a00ec84f29e6cf0b9dbaf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,24 @@
+Sat Aug 10 10:29:30 1996  Tom Tromey  <tromey@creche.cygnus.com>
+
+       * aclocal.in (macro_seen): New global.
+       (add_file): Set macro_seen entry.  Only push required macro on
+       @rlist if not already seen.  Test defun.test.
+
+       * automake.in (get_object_extension): Handle directory prefix on
+       `ansi2knr' option.
+
+       * kr-extra.am: New file.
+
+       * kr-vars.am: Removed.
+
+       * automake.in (handle_options): Handle directory prefix on
+       `ansi2knr' option.
+
+       * automake.in (scan_configure): Recognize AM_FUNC_STRTOD.
+
+       * aclocal.in (add_file): Error if macro is duplicated.  Test
+       dup.test.
+
 Fri Aug  9 09:18:46 1996  Tom Tromey  <tromey@creche.cygnus.com>
 
        * automake.in (handle_programs): Substitute @XLINK@.  Make sure
index a0dde7f4348f28ac207ff63cd06d2f3dc6a6c188..f27786cf7bf2324cdf1d676745e5f3c0570055b8 100644 (file)
@@ -13,7 +13,7 @@ info_TEXINFOS = automake.texi
 
 pkgdata_DATA = clean-kr.am clean.am compile-kr.am compile-vars.am \
 compile.am data.am dejagnu.am depend.am dist-vars.am footer.am \
-header.am header-vars.am kr-vars.am libraries.am library.am \
+header.am header-vars.am kr-extra.am libraries.am library.am \
 mans-vars.am program.am programs.am remake-hdr.am remake-subd.am \
 remake.am scripts.am subdirs.am tags.am tags-subd.am tags-clean.am \
 texi-version.am texinfos-vars.am texinfos.am libraries-clean.am \
index 588b739fc44e4e429253b9eda741c14bb123e63e..3935c33ee883810dd209bc890fed4efbc5ab73d0 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.1b from Makefile.am
+# Makefile.in generated automatically by automake 1.1c from Makefile.am
 
 # Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
@@ -51,7 +51,7 @@ info_TEXINFOS = automake.texi
 
 pkgdata_DATA = clean-kr.am clean.am compile-kr.am compile-vars.am \
 compile.am data.am dejagnu.am depend.am dist-vars.am footer.am \
-header.am header-vars.am kr-vars.am libraries.am library.am \
+header.am header-vars.am kr-extra.am libraries.am library.am \
 mans-vars.am program.am programs.am remake-hdr.am remake-subd.am \
 remake.am scripts.am subdirs.am tags.am tags-subd.am tags-clean.am \
 texi-version.am texinfos-vars.am texinfos.am libraries-clean.am \
diff --git a/NEWS b/NEWS
index d2f5b4209ed81683d8739793e96caaa96b18e5a3..02d139fffaeaf3a83e34dd4e4c75496e1e894e3c 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ New in 1.1b:
 * Included `aclocal' program
 * Automake will now generate rules to regenerate aclocal.m4, if appropriate
 * Now uses `AM_' macro names everywhere
+* ansi2knr option can have directory prefix (eg `../lib/ansi2knr')
 \f
 New in 1.0:
 * Bug fixes
diff --git a/TODO b/TODO
index 33b146f3a1235cff15d0e5ce608df7069d4065c9..efee47651c8fa31d93825513bddf20b04ad91bc2 100644 (file)
--- a/TODO
+++ b/TODO
@@ -147,12 +147,6 @@ Omit program transform vars from header if no program installed.  This
 is currently pretty hard to do.  (But with beautification code it
 would probably be easy)
 
-It should be possible to have ansi2knr in just one place in a package.
-Jim Meyering says just rely on configure to make links as appropriate.
-Maybe introduce syntax like this:
-       AUTOMAKE_OPTIONS = ../ansi2knr
-?  Consider putting it into AC_CONFIG_AUX_DIR
-
 Lex, yacc support:
 * It would be nice to automatically support using bison's better features
   to rename the output files.  This requires autoconf support
index 457c7773e4e54737f48b05d5167f5ef0195d5b21..4180c347be3d3af8228a60e88fa9c5d1df3266e7 100644 (file)
@@ -24,6 +24,9 @@ $output = '';
 # Output file name.
 $output_file = 'aclocal.m4';
 
+# Which macros have been seen.
+%macro_seen = ();
+
 # Which files have been seen.
 %file_seen = ();
 
@@ -44,12 +47,13 @@ $verbosity = 0;
      'fp_WITH_REGEX',
      'gm_PROG_LIBTOOL',
      'jm_MAINTAINER_MODE',
-     'md_PATH_PROG',
-     'md_TYPE_PTRDIFF_T',
-     'ud_GNU_GETTEXT',
-     'ud_LC_MESSAGES',
-     'ud_PATH_LISPDIR',
-     'ud_WITH_NLS'
+# These aren't quite obsolete.
+#      'md_PATH_PROG',
+#      'md_TYPE_PTRDIFF_T',
+#      'ud_GNU_GETTEXT',
+#      'ud_LC_MESSAGES',
+#      'ud_PATH_LISPDIR',
+#      'ud_WITH_NLS'
      );
 
 $obsolete_rx = '(' . join ('|', @obsolete_macros) . ')';
@@ -211,10 +215,23 @@ sub add_file
     while (<FILE>)
     {
        $output .= $_;
+
+       # See if we're defining a macro that was already seen.  This
+       # is mostly a special case for `acinclude.m4'.
+       if (/AC_DEFUN\(\[?([^])]*)\]?/)
+        {
+           if ($1 ne $file && $file_seen{$1})
+           {
+               warn "$fullfile: $.: duplicated macro \`$1'\n";
+               $exit_status = 1;
+           }
+           $macro_seen{$1} = 1;
+       }
+
        # See if some other macro is required.
        if (/AC_REQUIRE\(\[?([^])]*)\]?\)/)
        {
-           push (@rlist, $1);
+           push (@rlist, $1) unless defined $macro_seen{$1};
        }
     }
     $output .= "\n";
index 553df4ff3344c000c3a1ff1b28fc4107ba588660..7f21d1890ea2bf0580547309537d3ebd61e6a05a 100755 (executable)
@@ -456,10 +456,16 @@ sub handle_options
        {
            &set_strictness ($_);
        }
-       elsif ($_ eq 'no-installman' || $_ eq 'ansi2knr'
+       elsif (/ansi2knr/)
+       {
+           # An option like "../lib/ansi2knr" is allowed.  With no
+           # path prefix, we assume the required programs are in this
+           # directory.  We save the actual option for later.
+           $options{'ansi2knr'} = $_;
+       }
+       elsif ($_ eq 'no-installman' || $_ eq 'no-installinfo'
               || $_ eq 'dist-shar' || $_ eq 'dist-zip'
-              || $_ eq 'dist-tarZ' || $_ eq 'dejagnu'
-              || $_ eq 'no-installinfo')
+              || $_ eq 'dist-tarZ' || $_ eq 'dejagnu')
        {
            # Explicitly recognize these.
        }
@@ -536,10 +542,20 @@ sub get_object_extension
            $dir_holds_sources = '$o';
            push (@suffixes, '._c', '._o');
 
-           &require_file_with_line ('AUTOMAKE_OPTIONS', $FOREIGN,
-                                    'ansi2knr.c', 'ansi2knr.1');
+           # Only require ansi2knr files if they should appear in
+           # this directory.
+           if ($options{'ansi2knr'} eq 'ansi2knr')
+           {
+               &require_file_with_line ('AUTOMAKE_OPTIONS', $FOREIGN,
+                                        'ansi2knr.c', 'ansi2knr.1');
+               $output_rules .= &file_contents ('kr-extra');
+               push (@clean, 'krextra');
+               &push_phony_cleaners ('krextra');
+           }
+
+           $output_vars .= "o = .\@U\@o\n";
+           $output_vars .= "ANSI2KNR = " . $options{'ansi2knr'} . "\n";
 
-           $output_vars .= &file_contents ('kr-vars');
            $output_rules .= &file_contents ('compile-kr');
            $output_rules .= &file_contents ('clean-kr');
 
@@ -2286,6 +2302,10 @@ sub scan_configure
            $libsources{'getopt.c'} = 1;
            $libsources{'getopt1.c'} = 1;
        }
+       elsif (/AM_FUNC_STRTOD/)
+       {
+           $libsources{'strtod.c'} = 1;
+       }
        elsif (/LIBOBJS="(.*)\s+\$LIBOBJS"/
               || /LIBOBJS="\$LIBOBJS\s+(.*)"/)
        {
index bcdcf364f764744cc1e56186723bd790b3468f34..52bcdebfb23dc7af9554e1978deb34194f39f2d2 100644 (file)
@@ -472,8 +472,9 @@ exist.
 @item AC_FUNC_GETLOADAVG
 @item AC_FUNC_MEMCMP
 @item AC_STRUCT_ST_BLOCKS
-@item fp_FUNC_FNMATCH
+@item AM_FUNC_FNMATCH
 @item AC_FUNC_FNMATCH
+@item AM_FUNC_STRTOD
 @item AC_REPLACE_FUNCS
 @item AC_REPLACE_GNU_GETOPT
 Automake will ensure that the appropriate source files are part of the
@@ -484,10 +485,11 @@ information.
 @cvindex AC_FUNC_GETLOADAVG
 @cvindex AC_FUNC_MEMCMP
 @cvindex AC_STRUCT_ST_BLOCKS
-@cvindex fp_FUNC_FNMATCH
+@cvindex AM_FUNC_FNMATCH
 @cvindex AC_FUNC_FNMATCH
 @cvindex AC_REPLACE_FUNCS
 @cvindex AC_REPLACE_GNU_GETOPT
+@cvindex AM_FUNC_STRTOD
 
 Automake will also detect statements which put @samp{.o} files into
 @code{LIBOBJS}, and will treat these additional files in a similar way.
@@ -498,12 +500,15 @@ This is required if any libraries are built in the package.
 @cvindex AC_PROG_RANLIB
 
 @item AC_PROG_INSTALL
-@item fp_PROG_INSTALL
-@code{fp_PROG_INSTALL} is required if any scripts (@pxref{Scripts}) are
+@item AM_PROG_INSTALL
+
+@code{AM_PROG_INSTALL} is required if any scripts (@pxref{Scripts}) are
 installed by the package.  Otherwise, @code{AC_PROG_INSTALL} is
-required.
+required.  @code{AM_INIT_AUTOMAKE} automatically calls
+@code{AM_PROG_INSTALL}.
 @cvindex AC_PROG_INSTALL
-@cvindex fp_PROG_INSTALL
+@cvindex AM_PROG_INSTALL
+@cvindex AM_INIT_AUTOMAKE
 
 @item AM_PROG_LIBTOOL
 Automake will turn on processing for @code{libtool} (@pxref{Top, , The
@@ -518,9 +523,9 @@ will check the @file{po} directory to ensure that all the named
 named.
 @cvindex ALL_LINGUAS
 
-@item fp_C_PROTOTYPES
+@item AM_C_PROTOTYPES
 This is required when using automatic de-ANSI-fication, see @ref{ANSI}.
-@cvindex fp_C_PROTOTYPES
+@cvindex AM_C_PROTOTYPES
 
 @item ud_GNU_GETTEXT
 This macro is required for packages which use GNU gettext (FIXME xref).
@@ -536,11 +541,6 @@ This macro adds a @samp{--enable-maintainer-mode} option to
 @cvindex jm_MAINTAINER_MODE
 @end table
 
-The @samp{fp_} macros are from @value{Francois} Pinard, the @samp{jm_}
-macro is from Jim Meyering, and the @samp{ud_} macro is from Ulrich
-Drepper..  Both sets are included with Automake.  @code{automake} will
-tell where the macros can be found if they are missing.
-
 
 @node Top level
 @chapter The top-level @file{Makefile.am}
similarity index 81%
rename from kr-vars.am
rename to kr-extra.am
index 2102715764faa793ac0d4de8b2e374306e417ad1..cf4fab40e8290480c51ecfa13ebf36968893ee5c 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
-ANSI2KNR = @ANSI2KNR@
-o = .@U@o
+ansi2knr: ansi2knr.o
+       $(LINK) ansi2knr.o $(LIBS)
+
+ansi2knr.o: $(CONFIG_HEADER)
+
+mostlyclean-krextra:
+
+clean-krextra:
+
+distclean-krextra:
+       rm -f ansi2knr
+
+maintainer-clean-krextra:
index a0dde7f4348f28ac207ff63cd06d2f3dc6a6c188..f27786cf7bf2324cdf1d676745e5f3c0570055b8 100644 (file)
@@ -13,7 +13,7 @@ info_TEXINFOS = automake.texi
 
 pkgdata_DATA = clean-kr.am clean.am compile-kr.am compile-vars.am \
 compile.am data.am dejagnu.am depend.am dist-vars.am footer.am \
-header.am header-vars.am kr-vars.am libraries.am library.am \
+header.am header-vars.am kr-extra.am libraries.am library.am \
 mans-vars.am program.am programs.am remake-hdr.am remake-subd.am \
 remake.am scripts.am subdirs.am tags.am tags-subd.am tags-clean.am \
 texi-version.am texinfos-vars.am texinfos.am libraries-clean.am \
index fa6bd1e5abd6abcb5c3ce98d51e2779b10119065..1b10f908114f611bd69384f4d3b0b0ee2ad004d9 100644 (file)
@@ -1,3 +1,9 @@
+Sat Aug 10 10:09:45 1996  Tom Tromey  <tromey@creche.cygnus.com>
+
+       * defun.test: New file.
+
+       * dup.test: New file.
+
 Fri Aug  9 09:18:07 1996  Tom Tromey  <tromey@creche.cygnus.com>
 
        * canon4.test: New file.
index cccbc9d5213ab15432f36d2d8986dbede8c3b5d1..3994ee5819041f3b7b1611f34502b5f1c3956619 100644 (file)
@@ -12,6 +12,6 @@ insh2.test outdir.test fpinstall.test fpinst2.test texinfo.test dejagnu.test \
 yacc.test mkinstall2.test texinfo2.test ansi.test depacl.test depacl2.test \
 error.test colon.test vtexi2.test tags.test comment.test libfiles.test \
 man.test info.test obsolete.test lex.test scripts.test subdir2.test \
-exsource.test canon4.test
+exsource.test canon4.test dup.test defun.test
 
 EXTRA_DIST = defs $(TESTS)
index 9db317bfcc63230f2822c9ab3ef1cf331cde2239..8ba411da77d8317afec140456d73b1a545df4c17 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.1b from Makefile.am
+# Makefile.in generated automatically by automake 1.1c from Makefile.am
 
 # Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
@@ -50,7 +50,7 @@ insh2.test outdir.test fpinstall.test fpinst2.test texinfo.test dejagnu.test \
 yacc.test mkinstall2.test texinfo2.test ansi.test depacl.test depacl2.test \
 error.test colon.test vtexi2.test tags.test comment.test libfiles.test \
 man.test info.test obsolete.test lex.test scripts.test subdir2.test \
-exsource.test canon4.test
+exsource.test canon4.test dup.test defun.test
 
 EXTRA_DIST = defs $(TESTS)
 mkinstalldirs = $(top_srcdir)/mkinstalldirs
diff --git a/tests/defun.test b/tests/defun.test
new file mode 100755 (executable)
index 0000000..dae8540
--- /dev/null
@@ -0,0 +1,13 @@
+#! /bin/sh
+
+# Make sure aclocal picks up on all macro definitions.
+
+. $srcdir/defs || exit 1
+
+cat > acinclude.m4 << 'END'
+AC_DEFUN([AM_FUNC_TWO],)
+AC_DEFUN([AM_FUNC_STRTOD],
+AC_REQUIRE([AM_FUNC_TWO]))
+END
+
+$ACLOCAL
diff --git a/tests/dup.test b/tests/dup.test
new file mode 100755 (executable)
index 0000000..e873839
--- /dev/null
@@ -0,0 +1,16 @@
+#! /bin/sh
+
+# Make sure aclocal catches duplicate definitions in acinclude.m4.
+
+. $srcdir/defs || exit 1
+
+cat > configure.in << 'END'
+AM_FUNC_STRTOD
+END
+
+cat > acinclude.m4 << 'END'
+AC_DEFUN([AM_FUNC_STRTOD])
+END
+
+$ACLOCAL && exit 1
+exit 0
index 4d64b2e811b03e3aae2ad89c893708b5b65a381a..bda84a272de496cff1885998d2c0b84a0eb20731 100755 (executable)
@@ -19,4 +19,5 @@ chmod +x mkinstalldirs
 
 $AUTOMAKE || exit 1
 
-make -s -f Makefile.in installdirs | grep -v man
+(make -s -f Makefile.in installdirs | grep man) && exit 1
+exit 0
index 262db4faf4aa10b63d7a73f4ff7c15efaece04b5..5321dbada4aa661f47c23358dff2e3b17272a5e4 100644 (file)
@@ -1,3 +1,3 @@
-@set UPDATED 4 August 1996
+@set UPDATED 10 August 1996
 @set EDITION 1.1c
 @set VERSION 1.1c