# Makefile.in generated automatically by automake 0.26 from Makefile.am
-# Copyright (C) 1994, 1995 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.
SHELL = /bin/sh
# The following requires a fixed version of the Emacs 19.30 etags.
ETAGS_ARGS = automake.in --lang=none \
--regex='/^@node[ \t]+\([^,]+\)/\1/' automake.texi
-
-
SCRIPTS= $(bin_SCRIPTS)
+
MAKEINFO = makeinfo
TEXI2DVI = texi2dvi
-
INFOS = automake.info*
INFO_DEPS = automake.info
DVIS = automake.dvi
ChangeLog THANKS README version.texi mdate-sh TODO INSTALL Makefile.am \
texinfo.tex NEWS aclocal.m4 install-sh
+
PACKAGE = @PACKAGE@
VERSION = @VERSION@
DISTFILES = $(SOURCES) $(HEADERS) $(TEXINFOS) $(INFOS) $(MANS) \
$(DIST_OTHER) $(DIST_COMMON) $(DATA)
-
default: all
+
mostlyclean-binSCRIPTS:
clean-binSCRIPTS:
maintainer-clean-vti:
rm -f stamp-vti version.texi
-
automake.info: automake.texi version.texi
+
.texi.info:
$(MAKEINFO) -I$(srcdir) $<
id: ID
ID:
- here=`pwd`; cd $(srcdir) && mkid -f $$here/ID $(SOURCES) $(HEADERS)
+ here=`pwd` && cd $(srcdir) && mkid -f $$here/ID $(SOURCES) $(HEADERS)
tags: TAGS
TAGS:
- here=`pwd`; cd $(srcdir) && etags $(ETAGS_ARGS) $(SOURCES) $(HEADERS) -o $$here/TAGS
+ here=`pwd` && cd $(srcdir) && etags $(ETAGS_ARGS) $(SOURCES) $(HEADERS) -o $$here/TAGS
mostlyclean-tags:
chmod -R a+r $(distdir)
tar -chozf $(distdir).tar.gz $(distdir)
rm -rf $(distdir)
-
all: info $(SCRIPTS) $(DATA)
info: $(INFO_DEPS)
dvi: $(DVIS)
-check:
+check: all
installcheck:
installdirs:
$(top_srcdir)/mkinstalldirs $(bindir) $(infodir) $(pkgdatadir)
+
mostlyclean-generic:
test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
maintainer-clean-generic:
test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-
mostlyclean: mostlyclean-binSCRIPTS mostlyclean-vti mostlyclean-info \
mostlyclean-tags mostlyclean-generic
-
clean: clean-binSCRIPTS clean-vti clean-info clean-tags clean-generic \
mostlyclean
-
distclean: distclean-binSCRIPTS distclean-vti distclean-info \
distclean-tags distclean-generic clean
-
rm -f config.status
maintainer-clean: maintainer-clean-binSCRIPTS maintainer-clean-vti \
maintainer-clean-info maintainer-clean-tags maintainer-clean-generic \
distclean
-
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
rm -f config.status
-.PHONY: default binSCRIPTS uninstall-binSCRIPTS mostlyclean-vti \
-distclean-vti clean-vti maintainer-clean-vti install-info \
-uninstall-info mostlyclean-info distclean-info clean-info \
+.PHONY: default mostlyclean-binSCRIPTS distclean-binSCRIPTS \
+clean-binSCRIPTS maintainer-clean-binSCRIPTS uninstall-binSCRIPTS \
+mostlyclean-vti distclean-vti clean-vti maintainer-clean-vti \
+install-info uninstall-info mostlyclean-info distclean-info clean-info \
maintainer-clean-info uninstall-pkgdataDATA tags id mostlyclean-tags \
distclean-tags clean-tags maintainer-clean-tags dist all info dvi check \
installcheck install-exec install-data install uninstall installdirs \
mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
# Some simple checks:
# * syntax check with perl4 and perl5.
# * make sure the scripts don't use 'true'
# Tag before making distribution. Also, don't make a distribution if
# checks fail. Also, make sure the NEWS file is up-to-date.
cvs-dist: maintainer-check
- if sed 1q NEWS | grep -e "$(VERSION)"; then :; else \
+ @if sed 1q NEWS | grep -e "$(VERSION)"; then :; else \
echo "NEWS not updated; not releasing" 1>&2; \
exit 1; \
fi
cvs tag `echo "Release-$(VERSION)" | sed 's/\./-/g'`
$(MAKE) dist
-
.SUFFIXES:
.SUFFIXES: .texi .info .dvi
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
-
$prefix = "@prefix@";
$am_dir = "@datadir@/@PACKAGE@";
-\f
+# String constants.
+$IGNORE_PATTERN = "^##([^#].*)?\$";
+$WHITE_PATTERN = "^[ \t]*\$";
+$COMMENT_PATTERN = "^#";
+$RULE_PATTERN = "^([a-zA-Z_.][-.a-zA-Z0-9_.]*) *:";
+$MACRO_PATTERN = "^([A-Za-z][A-Za-z0-9_]*)[ \t]*=[ \t]*(.*)\$";
+
# Constants to define the "strictness" level.
$NORMAL = 0;
}
elsif ($arglist[0] =~ /^-/)
{
- print STDERR "automake: unrecognized option -- \`$arglist[0]'\n";
- exit 1;
+ die "automake: unrecognized option -- \`$arglist[0]'\n";
}
else
{
push (@make_list, $_);
}
- if ($#make_list >= 0)
- {
- print "automake: using ", join (' ', @make_list), "\n";
- }
- else
- {
- print STDERR "automake: no \"Makefile.am\" found or specified\n";
- exit 1;
- }
+ die "automake: no \"Makefile.am\" found or specified\n"
+ if $#make_list < 0;
}
return (@make_list);
sub require_argument
{
local ($arg, @arglist) = @_;
- if ($#arglist >= 0)
- {
- print STDERR "automake: no argument given for option \`$arg'\n";
- exit 1;
- }
+ die "automake: no argument given for option \`$arg'\n"
+ if $#arglist >= 0;
}
################################################################
# FIXME with new 'dist' target, don't need Makefile.in. Probably
# should remove it here.
&push_dist_common ('Makefile.in', 'Makefile.am');
- push (@sources, '$(SOURCES)') if (defined $contents{'SOURCES'});
- push (@objects, '$(OBJECTS)') if (defined $contents{'OBJECTS'});
-
- # Generate header before reading .am file. The header must come
- # before anything else, and read_am_file copies code into the
- # output.
- &generate_header;
+ push (@sources, '$(SOURCES)') if defined $contents{'SOURCES'};
+ push (@objects, '$(OBJECTS)') if defined $contents{'OBJECTS'};
# This is always the default target. This gives us freedom to do
# things in whatever order is convenient.
################################################################
-# Generate header of Makefile.in.
-sub generate_header
-{
- $output_vars =
- ($output_vars
- . "# Makefile.in generated automatically by automake "
- . $VERSION
- . " from Makefile.am\n");
-
- $output_vars .= &file_contents ('header-vars');
-}
-
# Return object extension. Just once, put some code into the output.
sub get_object_extension
{
'programs', 'PROGRAMS',
'bin', 'sbin', 'libexec', 'noinst');
# FIXME error if PROGRAMS defined but no blah_PROGRAMS defined.
- return if ($#proglist < 0);
+ return if $#proglist < 0;
local ($obj) = &get_object_extension;
local ($one_file, $munge);
'libraries', 'LIBRARIES',
'lib', 'pkglib', 'noinst');
# FIXME error if LIBRARIES defined but no blah_LIBRARIES defined.
- return if ($#liblist < 0);
+ return if $#liblist < 0;
# Generate _LIBFILES variables. Too bad we can't do this in
# am_install_var.
sub handle_texinfo
{
local ($texis) = &am_variable ('TEXINFOS');
- return if (!$texis);
+ return if ! $texis;
local (@texis) = split (/\s+/, $texis);
if ($#texis > 0)
# Handle any man pages.
sub handle_man_pages
{
- return if (! defined $contents{'MANS'});
+ return if ! defined $contents{'MANS'};
# We generate the manpage install code by hand to avoid the use of
# basename in the generated Makefile.
local (%sections, %inames, %secmap, %fullsecmap);
foreach (@mans)
{
- m/^(.*)\.([0-9])([a-z]*)$/;
+ # FIXME: statement without effect:
+ /^(.*)\.([0-9])([a-z]*)$/;
$sections{$2} = 1;
$inames{$1} = $_;
$secmap{$1} = $2;
local ($tagging) = 0;
push (@phony, 'tags');
- if (defined ($contents{'SUBDIRS'}))
+ if (defined $contents{'SUBDIRS'})
{
$output_rules .= &file_contents ('tags');
$tagging = 1;
}
- elsif ($dir_holds_sources || defined ($contents{'ETAGS_ARGS'}))
+ elsif ($dir_holds_sources || defined $contents{'ETAGS_ARGS'})
{
$output_rules .= &file_contents ('tags-subd');
push (@phony, 'id');
}
else
{
- $output_rules .= &file_contents (defined ($contents{'SUBDIRS'})
+ $output_rules .= &file_contents (defined $contents{'SUBDIRS'}
? 'dist-subd-top'
: 'dist');
}
# Handle subdirectories.
sub handle_subdirs
{
- return if (! defined ($contents{'SUBDIRS'}));
+ return if ! defined $contents{'SUBDIRS'};
$output_rules .= &file_contents ('subdirs');
&require_file ($NORMAL, 'mkinstalldirs');
}
- if (defined ($contents{'CONFIG_HEADER'})
- && $contents{'CONFIG_HEADER'} !~ m,/,)
+ if (defined $contents{'CONFIG_HEADER'}
+ && $contents{'CONFIG_HEADER'} !~ /\//)
{
# Header defined and in this directory.
if (-f 'acconfig.h')
{
$output_trailer .= ".SUFFIXES: " . join (' ', @suffixes) . "\n";
}
- $output_trailer .= "\n" . &file_contents ('footer');
+ $output_trailer .= &file_contents ('footer');
}
# Deal with installdirs target.
&do_one_merge_target ('all', @all);
&do_one_merge_target ('info', @info);
&do_one_merge_target ('dvi', @dvi);
+ push (@check, 'all');
&do_one_merge_target ('check', @check);
&do_one_merge_target ('installcheck', @installcheck);
$output_rules .= ("install-exec: "
. join (' ', @install_exec)
. "\n\n");
- push (@install, 'install-exec') if (!$recursive_install);
+ push (@install, 'install-exec') if !$recursive_install;
push (@phony, 'install-exec');
}
if ($#install_data >= 0)
$output_rules .= ("install-data: "
. join (' ', @install_data)
. "\n\n");
- push (@install, 'install-data') if (!$recursive_install);
+ push (@install, 'install-data') if !$recursive_install;
push (@phony, 'install-data');
}
# clean<-mostlyclean derivation). In this case the target is
# implicitly known to be 'clean'.
local ($flag) = $target;
- if (!$flag)
- {
- $target = 'clean';
- }
+ $target = 'clean' if ! $flag;
grep (($_ = $name . 'clean-' . $_) && 0, @deps);
if ($flag)
}
}
&pretty_print_rule ($name . $target . ": ", '', @deps);
- $output_rules .= "\n";
# FIXME shouldn't we really print these messages before running
# the dependencies?
{
local ($amfile) = @_;
- if (! open (AMFILE, $amfile))
- {
- print STDERR "automake: couldn't open $amfile: $!\n";
- exit 1;
- }
+ local ($header_vars) = &file_contents ('header-vars');
+
+ open (AM_FILE, $amfile) || die "automake: couldn't open $amfile: $!\n";
+
+ $output_vars .= ("# Makefile.in generated automatically by automake "
+ . $VERSION . " from Makefile.am\n");
local ($saw_bk) = 0;
local ($was_rule) = 0;
+ local ($spacing) = '';
+ local ($comment) = '';
local ($last_var_name) = '';
- local ($saved_comments) = '';
- while (<AMFILE>)
+ while (<AM_FILE>)
{
- chop;
+ if (/$IGNORE_PATTERN/o)
+ {
+ # Merely delete comments beginning with two hashes.
+ }
+ elsif (/$WHITE_PATTERN/o)
+ {
+ # Stick a single white line before the incoming macro or rule.
+ $spacing = "\n";
+ }
+ elsif (/$COMMENT_PATTERN/o)
+ {
+ # Stick comments before the incoming macro or rule.
+ $comment .= $spacing . $_;
+ $spacing = '';
+ }
+ else
+ {
+ last;
+ }
+ }
+
+ $output_vars .= $comment . "\n" . $header_vars;
+ $comment = '';
+ $spacing = "\n";
- if ($saw_bk)
+ while ($_)
+ {
+ if (/$IGNORE_PATTERN/o)
+ {
+ # Merely delete comments beginning with two hashes.
+ }
+ elsif (/$WHITE_PATTERN/o)
+ {
+ # Stick a single white line before the incoming macro or rule.
+ $spacing = "\n";
+ }
+ elsif (/$COMMENT_PATTERN/o)
+ {
+ # Stick comments before the incoming macro or rule.
+ $comment .= $spacing . $_;
+ $spacing = '';
+ }
+ elsif ($saw_bk)
{
if ($was_rule)
{
- $output_trailer .= $_ . "\n";
+ $output_trailer .= $_;
+ $saw_bk = /\\$/;
}
else
{
- $output_vars .= $_ . "\n";
+ $output_vars .= $_;
if (substr ($_, -1) eq "\\")
{
$contents{$last_var_name} .= substr ($_, 0,
{
$contents{$last_var_name} .= $_;
}
+ $saw_bk = /\\$/;
}
}
- elsif (/^\#/)
- {
- # Got a comment. We save comments until we get a
- # non-comment, and then we add the last comments.
- $saved_comments .= $_ . "\n";
- }
- elsif ($_ eq '@kr@')
- {
- # Special case: this means we want automatic
- # de-ANSI-fication. FIXME think of a better way.
- $contents{'@kr@'} = 1;
- }
- elsif (m/^ *([a-zA-Z_.][-.a-zA-Z0-9_.]*) *:/)
+ elsif (/$RULE_PATTERN/o)
{
+ # warn "** Saw rule .$1.\n";
# Found a rule.
$was_rule = 1;
# Value here doesn't matter; for targets we only note
# existence.
$contents{$1} = 1;
- $output_trailer .= $saved_comments . $_ . "\n";
- $saved_comments = '';
+ $output_trailer .= $comment . $spacing . $_;
+ $comment = $spacing = '';
+ $saw_bk = /\\$/;
}
- elsif (m/^ *([A-Za-z][A-Za-z0-9_]*)[ \t]*=[ \t]*(.*)$/)
+ elsif (/$MACRO_PATTERN/o)
{
- # Found a variable reference.
+ # warn "** Saw macro .$1.\n";
+ # Found a macro definition.
$was_rule = 0;
$last_var_name = $1;
if (substr ($2, -1) eq "\\")
{
$contents{$1} = $2;
}
- $output_vars .= $saved_comments . $_ . "\n";
- $saved_comments = '';
+ $output_vars .= $comment . $spacing . $_;
+ $comment = $spacing = '';
+ $saw_bk = /\\$/;
}
- elsif (m/^$/)
+ elsif ($_ eq "\@kr\@\n")
{
- # Special rule: if looking at a blank line, append it to
- # whatever we saw last.
- if ($was_rule)
- {
- $output_trailer .= $saved_comments . "\n";
- }
- else
- {
- $output_vars .= $saved_comments . "\n";
- }
- $saved_comments = '';
+ # Special case: this means we want automatic
+ # de-ANSI-fication. FIXME think of a better way.
+ $contents{'@kr@'} = 1;
}
else
{
# This isn't an error; it is probably a continued rule.
# In fact, this is what we assume.
- $output_trailer .= $_ . "\n";
+ $was_rule = 1;
+ $output_trailer .= $comment . $spacing . $_;
+ $comment = $spacing = '';
+ $saw_bk = /\\$/;
}
- $saw_bk = (substr ($_, -1) eq "\\");
+ $_ = <AM_FILE>;
}
- # Include trailing comments with variables for now.
- $output_vars .= $saved_comments;
-
- # Include some space after user code.
- $output_vars .= "\n";
- $output_trailer .= "\n";
+ $output_trailer .= $comment;
}
################################################################
################################################################
-# Return contents of a file from $am_dir.
+# Return contents of a file from $am_dir, automatically skipping
+# macros or rules which are already known.
sub file_contents
{
local ($basename) = @_;
local ($file) = $am_dir . '/' . $basename . '.am';
- if (! open (FC_FILE, $file))
- {
- print STDERR "automake: installation error: cannot open \"$file\"\n";
- exit 1;
- }
+ open (FC_FILE, $file)
+ || die "automake: installation error: cannot open \"$file\"\n";
+
+ local ($was_rule) = 0;
+ local ($result_vars) = '';
+ local ($result_rules) = '';
+ local ($comment) = '';
+ local ($spacing) = "\n";
+ local ($skipping) = 0;
- # Lines starting with "##" are comments for developer use only.
- local ($result) = '';
while (<FC_FILE>)
{
- $result .= $_ unless ( m/^##/);
+ if (/$IGNORE_PATTERN/o)
+ {
+ # Merely delete comments beginning with two hashes.
+ }
+ elsif (/$WHITE_PATTERN/o)
+ {
+ # Stick a single white line before the incoming macro or rule.
+ $spacing = "\n";
+ }
+ elsif (/$COMMENT_PATTERN/o)
+ {
+ # Stick comments before the incoming macro or rule.
+ $comment .= $spacing . $_;
+ $spacing = '';
+ }
+ elsif ($saw_bk)
+ {
+ if ($was_rule)
+ {
+ $result_rules .= $_ if ! $skipping;
+ }
+ else
+ {
+ $result_vars .= $_ if ! $skipping;
+ }
+ $saw_bk = /\\$/;
+ }
+ elsif (/$RULE_PATTERN/o)
+ {
+ # warn "** Found rule .$1.\n";
+ # Found a rule.
+ $was_rule = 1;
+ $skipping = defined $contents{$1};
+ warn "** Skip $skipping\n" if $skipping;
+ $result_rules .= $comment . $spacing . $_ if ! $skipping;
+ $comment = $spacing = '';
+ $saw_bk = /\\$/;
+ }
+ elsif (/$MACRO_PATTERN/o)
+ {
+ # warn "** Found macro .$1.\n";
+ # Found a variable reference.
+ $was_rule = 0;
+ $skipping = defined $contents{$1};
+ warn "** Skip $skipping\n" if $skipping;
+ $result_vars .= $comment . $spacing . $_ if ! $skipping;
+ $comment = $spacing = '';
+ $saw_bk = /\\$/;
+ }
+ else
+ {
+ # This isn't an error; it is probably a continued rule.
+ # In fact, this is what we assume.
+ $was_rule = 1;
+ $result_rules .= $comment . $spacing . $_ if ! $skipping;
+ $comment = $spacing = '';
+ $saw_bk = /\\$/;
+ }
}
+
close (FC_FILE);
- return $result;
+ return $result_vars . $result_rules . $comment;
}
# Return contents of some Makefile.am variable. Allow for AM_ style
{
local ($varname) = @_;
- return (defined ($contents{'AM_' . $varname})
+ return (defined $contents{'AM_' . $varname}
? $contents{'AM_' . $varname}
: $contents{$varname});
}
($munge = $clean_templ) =~ s/\@DIR\@/$_/g;
$output_rules .= $munge;
push (@clean, $_ . $primary);
- push (@phony, $_ . $primary);
+ &push_phony_cleaners ($_ . $primary);
}
push (@used, '$(' . $one_name . ')');
}
else
{
- print STDERR "automake: level \`$name' not recognized\n";
- exit 1;
+ die "automake: level \`$name' not recognized\n";
}
}
local ($sub);
($sub = $file) =~ s,/+[^/]+,,g;
- if ($sub eq $file)
- {
- $sub = '.';
- }
-
+ $sub = '.' if $sub eq $file;
return $sub;
}
# Print an error message and set exit status.
sub am_error
{
- print STDERR "automake: ${am_file}.am: ", join (' ', @_), "\n";
+ warn "automake: ${am_file}.am: ", join (' ', @_), "\n";
$exit_status = 1;
}