+Fri Jan 26 00:15:25 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * automake.in (file_contents_with_transform): Changed error
+ message.
+ (handle_configure): Define $contents{'CONFIG_HEADER'}.
+
+ * texi-version.am: Many changes to support multiple .texi files.
+ Replaced "version.texi" with "@VTEXI@". Replaced "vti" with
+ "@VTI@".
+ * automake.in (handle_configure): install.sh is an anachronism.
+ (handle_texinfo): Generalized for multiple .texi files. Handle
+ 'clean-info' internally.
+ * texi-clean.am: Removed.
+ * Makefile.am: Updated for removal.
+
+Wed Jan 24 22:55:32 1996 Tom Tromey <tromey@creche.cygnus.com>
+
+ * automake.in (grep_for_vers_texi): New function.
+ (handle_texinfo): Use grep_for_vers_texi, not system("grep").
+ (handle_texinfo): Changes to generalize to multiple .texi files.
+
Tue Jan 23 14:22:16 1996 Tom Tromey <tromey@creche.cygnus.com>
Fixes from Gord Matzigkeit:
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-clean.am texi-version.am texinfos-vars.am texinfos.am \
+texi-version.am texinfos-vars.am texinfos.am \
libraries-clean.am scripts-clean.am programs-clean.am data-clean.am \
COPYING INSTALL install-sh mdate-sh mkinstalldirs texinfo.tex \
config.guess config.sub
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-clean.am texi-version.am texinfos-vars.am texinfos.am \
+texi-version.am texinfos-vars.am texinfos.am \
libraries-clean.am scripts-clean.am programs-clean.am data-clean.am \
COPYING INSTALL install-sh mdate-sh mkinstalldirs texinfo.tex \
config.guess config.sub
stamp-vti: automake.texi $(top_srcdir)/configure.in
echo "@set UPDATED `cd $(srcdir) && $(SHELL) mdate-sh automake.texi`" \
- > version.tmp
- echo "@set EDITION $(VERSION)" >> version.tmp
- echo "@set VERSION $(VERSION)" >> version.tmp
- if cmp -s version.tmp $(srcdir)/version.texi; then \
- rm version.tmp; \
+ > vti.tmp
+ echo "@set EDITION $(VERSION)" >> vti.tmp
+ echo "@set VERSION $(VERSION)" >> vti.tmp
+ if cmp -s vti.tmp $(srcdir)/version.texi; then \
+ rm vti.tmp; \
else \
- mv version.tmp $(srcdir)/version.texi; \
+ mv vti.tmp $(srcdir)/version.texi; \
fi
echo timestamp > $(srcdir)/stamp-vti
mostlyclean-vti:
- rm -f version.tmp
+ rm -f vti.tmp
clean-vti:
maintainer-clean-vti:
rm -f stamp-vti version.texi
-automake.info: automake.texi version.texi
+
+automake.info: automake.texi
.texi.info:
done
mostlyclean-info:
- rm -f automake.aux automake.cp automake.cps automake.dvi \
- automake.fn automake.fns automake.ky automake.log \
- automake.pg automake.toc automake.tp automake.vr automake.op
+ automake.aux automake.cp automake.cps automake.dvi automake.fn \
+ automake.fns automake.ky automake.log automake.pg automake.toc \
+ automake.tp automake.vr automake.op
clean-info:
LIBOBJS directly, handles AC_CONFIG_HEADER more precisely, etc.
* TEXINFOS and MANS now obsolete; use info_TEXINFOS and man_MANS instead.
* CONFIG_HEADER variable now obsolete
+* Can handle multiple Texinfo sources
\f
New in 0.28:
* Added --gnu and --gnits options
including Metaconfig. Perl uses it.
Should handle directory hierarchies deeper than 2. Right now there is
-no support for this at all.
-
-================================================================
-
-Known Bugs:
-
-version.texi handling is broken -- it assumes you only have one .texi
-file per directory.
- (*) In any case, the UPDATED information would be different for
- each .texi file included in a package -- that is my problem.
- Now, if no package will ever have more than one .texi file
- (in a given directory), I can just stop worrying about it.
-
-If there is ever more than one, we will need to change the name of
-'version.texi' to be based on the name of the primary .texi file.
-Will have to be careful here not to violate MS-DOS name limits. Also
-will need more than one stamp-vti.
-
-[ actually, we could just number them. version0.texi, version1.texi,
-etc ] [ actually, we can't, because the user could be reasonably
-expected to want to make dependencies using the name of the .texi file
-] [ actually, the real reason we can't is because it wouldn't be
-obvious what name to include in the primary .texi file. Duh ]
+no support for this at all. Here are some of the issues:
+* Should handle AC_CONFIG_SUBDIRS, ie must handle configure.in in subdirs
+* Must handle SUBDIRS in subdir Makefile.am's
+* Must handle AC_CONFIG_AUX_DIR
+ * FIXME must already look in .. and ../..
+ * Look for install.sh and give error!
+* All this means there should be a "configure_dir" macro which points
+ to the directory in which config.status resides. This should be used
+ in eg remake-subd.am.
================================================================
lib_LIBADD code conditionally included in a library
This probably needs to be redone anyway.
-AM_TEXINFOS override form
SUFFIXES additional suffixes
Document customary ordering of Makefile.am. From Franc,ois.
How to deal with @LIBOBJS@.
configure scanning
putting .h files into blah_SOURCES is ok now
+version.texi handling
================================================================
'bin', 'sbin', 'libexec', 'noinst');
}
+# Search a file for a "version.texi" Texinfo include. Return the name
+# of the include file if found, or the empty string if not. A
+# "version.texi" file is actually any file whose name matches
+# "vers*.texi".
+sub grep_for_vers_texi
+{
+ local ($filename) = @_;
+
+ if (! open (TEXI, $filename))
+ {
+ &am_error ("couldn't open \`$filename': $!");
+ return '';
+ }
+
+ while (<TEXI>)
+ {
+ if (/^\@include\s+(vers[^.]*\.texi)\s*$/)
+ {
+ # Found it.
+ close (TEXI);
+ return $1;
+ }
+ }
+
+ close (TEXI);
+ return '';
+}
+
# Handle all Texinfo source.
+# Anyplace marked FIXME in this code is for multi-texi changes.
sub handle_texinfo
{
- &am_error ("\`TEXINFOS' is an anachronism")
+ &am_error ("\`TEXINFOS' is an anachronism; use \`info_TEXINFOS'")
if defined $contents{'TEXINFOS'};
return if ! defined $contents{'info_TEXINFOS'};
return;
}
- local ($infobase);
- ($infobase = $texis[0]) =~ s/\.texi$//;
+ local (@infos_list, @info_deps_list, @dvis_list, @texi_deps);
+ local ($infobase, $info_cursor);
+ local (%versions);
+ local ($done) = 0;
+ local ($vti);
+ local ($tc_cursor, @texi_cleans);
- # If 'version.texi' is referenced by input file, then include
- # automatic versioning capability.
- system ("grep version.texi " . $relative_dir . "/" . $texis[0]
- . " > /dev/null 2>&1");
- if (! ($? >> 8))
+ foreach $info_cursor (@texis)
{
- # Got a hit.
- push (@texis, 'version.texi');
- &push_dist_common ('version.texi', 'stamp-vti');
- push (@clean, 'vti');
+ ($infobase = $info_cursor) =~ s/\.texi$//;
- $output_rules .=
- &file_contents_with_transform ('s/\@TEXI\@/' . $texis[0] . '/go',
- 'texi-version');
- &push_phony_cleaners ('vti');
+ # If 'version.texi' is referenced by input file, then include
+ # automatic versioning capability.
+ local ($vtexi)
+ = &grep_for_vers_texi ($relative_dir . "/" . $info_cursor);
+ if ($vtexi)
+ {
+ &am_error ("\`$vtexi', included in \`$info_cursor', also included in \`$versions{$vtexi}'")
+ if (defined $versions{$vtexi});
+ $versions{$vtexi} = $info_cursor;
- &require_file ($NORMAL, 'mdate-sh');
- }
+ # Got a hit.
+ push (@texis, $vtexi);
+ # We number the stamp-vti files. This is doable since the
+ # actual names don't matter much. We only number starting
+ # with the second one, so that the common case looks nice.
+ $vti = 'vti' . ($done ? $done : '');
+ &push_dist_common ($vtexi, 'stamp-' . $vti);
+ push (@clean, $vti);
- # If user specified file_TEXINFOS, then use that as explicit
- # dependency list.
- if (defined $contents{$infobase . "_TEXINFOS"})
- {
- push (@texis, "\$" . $infobase . '_TEXINFOS');
- &push_dist_common ("\$" . $infobase . '_TEXINFOS');
- }
+ $output_rules .=
+ &file_contents_with_transform
+ ('s/\@TEXI\@/' . $info_cursor . '/g; '
+ . 's/\@VTI\@/' . $vti . '/g; '
+ . 's/\@VTEXI\@/' . $vtexi . '/g',
+ 'texi-version');
- if (@texis)
- {
- $output_rules .= ($infobase . ".info: "
- . join (' ', @texis) . "\n\n");
+ &push_phony_cleaners ($vti);
+
+ # Only require once.
+ &require_file ($NORMAL, 'mdate-sh') if ! $done;
+ ++$done;
+ }
+
+ # If user specified file_TEXINFOS, then use that as explicit
+ # dependency list.
+ @texi_deps = ();
+ push (@texi_deps, $info_cursor);
+ if (defined $contents{$infobase . "_TEXINFOS"})
+ {
+ push (@texi_deps, "\$" . $infobase . '_TEXINFOS');
+ &push_dist_common ("\$" . $infobase . '_TEXINFOS');
+ }
+
+ $output_rules .= ("\n" . $infobase . ".info: "
+ . join (' ', @texi_deps) . "\n\n");
+
+ push (@infos_list, $infobase . '.info*');
+ push (@info_deps_list, $infobase . '.info');
+ push (@dvis_list, $infobase . '.dvi');
+
+ # Generate list of things to clean for this target. We do
+ # this explicitly because otherwise too many things could be
+ # removed. In particular the ".log" extension might
+ # reasonably be used in other contexts by the user.
+ foreach $tc_cursor ('aux', 'cp', 'cps', 'dvi', 'fn', 'fns',
+ 'ky', 'log', 'pg', 'toc', 'tp', 'vr', 'op')
+ {
+ push (@texi_cleans, $infobase . '.' . $tc_cursor);
+ }
}
# Some boilerplate.
push (@phony, 'install-info', 'uninstall-info');
# How to clean.
- $output_rules .=
- &file_contents_with_transform ('s/\@TEXI\@/' . $infobase . '/go',
- 'texi-clean');
+ $output_rules .= "\nmostlyclean-info:\n";
+ &pretty_print_rule ("\t", "\t ", @texi_cleans);
+ $output_rules .= ("\nclean-info:\n\ndistclean-info:\n\n"
+ . "maintainer-clean-info:\n\t"
+ . 'rm -f $(INFOS)' . "\n");
&push_phony_cleaners ('info');
push (@suffixes, '.texi', '.info', '.dvi');
unshift (@install_data, 'install-info');
unshift (@all, 'info');
- $output_vars .= ("INFOS = " . $infobase . ".info*\n"
- . "INFO_DEPS = " . $infobase . ".info\n"
- . "DVIS = " . $infobase . ".dvi\n"
+ $output_vars .= ("INFOS = " . join (' ', @infos_list) . "\n"
+ . "INFO_DEPS = " . join (' ', @info_deps_list) . "\n"
+ . "DVIS = " . join (' ', @dvis_list) . "\n"
# This next isn't strictly needed now -- the
# places that look here could easily be changed
# to look in info_TEXINFOS. But this is probably
# Handle any man pages.
sub handle_man_pages
{
- &am_error ("\`MANS' is an anachronism")
+ &am_error ("\`MANS' is an anachronism; use \`man_MANS'")
if defined $contents{'MANS'};
return if ! defined $contents{'man_MANS'};
# Look for some files we need.
&require_file ($NORMAL, 'install-sh', 'mkinstalldirs');
+ &am_error
+ ("\`install.sh' is an anachronism; use \`install-sh' instead")
+ if -f $relative_dir . '/install.sh';
+
# If we have a configure header, require it.
if ($config_header)
{
$top_reldir = '';
}
- &am_error ("\`CONFIG_HEADER' is an anachronism")
+ &am_error ("\`CONFIG_HEADER' is an anachronism; now determined from \`configure.in'")
if defined $contents{'CONFIG_HEADER'};
- # Generate CONFIG_HEADER define.
+ # Generate CONFIG_HEADER define, and define interally.
$output_vars .= "CONFIG_HEADER = ${top_reldir}${config_name}\n"
if $config_name;
+ $contents{'CONFIG_HEADER'} = "${top_reldir}${config_name}";
}
# Handle C headers.
local ($file) = $am_dir . '/' . $basename . '.am';
open (FC_FILE, $file)
- || die "automake: installation error: cannot open \"$file\"\n";
+ || die "automake: installation error: cannot open \`$file'\n";
local ($was_rule) = 0;
local ($result_vars) = '';
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-clean.am texi-version.am texinfos-vars.am texinfos.am \
+texi-version.am texinfos-vars.am texinfos.am \
libraries-clean.am scripts-clean.am programs-clean.am data-clean.am \
COPYING INSTALL install-sh mdate-sh mkinstalldirs texinfo.tex \
config.guess config.sub
+++ /dev/null
-## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
-
-## This program is free software; you can redistribute it and/or modify
-## it under the terms of the GNU General Public License as published by
-## the Free Software Foundation; either version 2, or (at your option)
-## any later version.
-
-## This program is distributed in the hope that it will be useful,
-## but WITHOUT ANY WARRANTY; without even the implied warranty of
-## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-## GNU General Public License for more details.
-
-## You should have received a copy of the GNU General Public License
-## along with this program; if not, write to the Free Software
-## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-## 02111-1307, USA.
-## We substitute the name of the texinfo file here because otherwise
-## too many things could be removed. In particular the ".log"
-## extension might be used in other contexts by the user
-mostlyclean-info:
- rm -f @TEXI@.aux @TEXI@.cp @TEXI@.cps @TEXI@.dvi \
- @TEXI@.fn @TEXI@.fns @TEXI@.ky @TEXI@.log \
- @TEXI@.pg @TEXI@.toc @TEXI@.tp @TEXI@.vr @TEXI@.op
-
-clean-info:
-
-distclean-info:
-
-maintainer-clean-info:
- rm -f $(INFOS)
## along with this program; if not, write to the Free Software
## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
## 02111-1307, USA.
-version.texi: stamp-vti
+@VTEXI@: stamp-@VTI@
## Depend on configure.in so that version number updates cause a
## rebuild.
-stamp-vti: @TEXI@ $(top_srcdir)/configure.in
+stamp-@VTI@: @TEXI@ $(top_srcdir)/configure.in
echo "@set UPDATED `cd $(srcdir) && $(SHELL) mdate-sh @TEXI@`" \
- > version.tmp
- echo "@set EDITION $(VERSION)" >> version.tmp
- echo "@set VERSION $(VERSION)" >> version.tmp
- if cmp -s version.tmp $(srcdir)/version.texi; then \
- rm version.tmp; \
+ > @VTI@.tmp
+ echo "@set EDITION $(VERSION)" >> @VTI@.tmp
+ echo "@set VERSION $(VERSION)" >> @VTI@.tmp
+ if cmp -s @VTI@.tmp $(srcdir)/@VTEXI@; then \
+ rm @VTI@.tmp; \
else \
- mv version.tmp $(srcdir)/version.texi; \
+ mv @VTI@.tmp $(srcdir)/@VTEXI@; \
fi
- echo timestamp > $(srcdir)/stamp-vti
+ echo timestamp > $(srcdir)/stamp-@VTI@
-mostlyclean-vti:
- rm -f version.tmp
+mostlyclean-@VTI@:
+ rm -f @VTI@.tmp
-clean-vti:
+clean-@VTI@:
-distclean-vti:
+distclean-@VTI@:
-maintainer-clean-vti:
- rm -f stamp-vti version.texi
+maintainer-clean-@VTI@:
+ rm -f stamp-@VTI@ @VTEXI@