+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
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 \
-# 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
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 \
* 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
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
# Output file name.
$output_file = 'aclocal.m4';
+# Which macros have been seen.
+%macro_seen = ();
+
# Which files have been seen.
%file_seen = ();
'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) . ')';
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";
{
&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.
}
$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');
$libsources{'getopt.c'} = 1;
$libsources{'getopt1.c'} = 1;
}
+ elsif (/AM_FUNC_STRTOD/)
+ {
+ $libsources{'strtod.c'} = 1;
+ }
elsif (/LIBOBJS="(.*)\s+\$LIBOBJS"/
|| /LIBOBJS="\$LIBOBJS\s+(.*)"/)
{
@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
@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.
@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
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).
@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}
## 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:
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 \
+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.
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)
-# 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
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
--- /dev/null
+#! /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
--- /dev/null
+#! /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
$AUTOMAKE || exit 1
-make -s -f Makefile.in installdirs | grep -v man
+(make -s -f Makefile.in installdirs | grep man) && exit 1
+exit 0
-@set UPDATED 4 August 1996
+@set UPDATED 10 August 1996
@set EDITION 1.1c
@set VERSION 1.1c