Globals, initialized...
(&initialize_per_input): here.
+2001-03-05 Akim Demaille <akim@epita.fr>
+
+ * automake.in ($in_file_name, $am_file_name, $relative_dirs):
+ Globals, initialized...
+ (&initialize_per_input): here.
+
2001-03-05 Akim Demaille <akim@epita.fr>
* automake.in ($am_relative_dir): Global.
echo "Don't use \`local' with parens: use several \`local' above." >&2; \
exit 1; \
fi
-## Up to now we manage to limit to 6 uses of local.
+## Up to now we manage to limit to 1 use of local.
@locals=`grep -c '^[ \t]*local [^*]' $(srcdir)/automake.in`; \
case $$locals in \
- [0-6] ) \
- echo "Wow, congrats! There are $$locals \`local' now!." >&2; \
+ [0] ) \
+ echo "Wow, congrats! There are no \`local' now!." >&2; \
echo "Please update Makefile.am (maintainer-check)." >&2; \
exit 1; \
;; \
- 7 ) ;; \
+ 1 ) ;; \
* ) \
echo "Too many \`local'! Are you sure you need $$locals of them?" >&2; \
- echo "Up to now 7 was enough." >&2; \
+ echo "Up to now 1 was enough." >&2; \
exit 1; \
;; \
esac
-# Makefile.in generated automatically by automake 1.4e from Makefile.am
+# generated automatically by automake 1.4e from
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
TEXINFOS = automake.texi
DATA = $(dist_pkgdata_DATA) $(dist_script_DATA)
-DIST_COMMON = README $(dist_pkgdata_DATA) $(dist_script_DATA) AUTHORS \
-COPYING ChangeLog INSTALL Makefile.am Makefile.in NEWS README-alpha \
-THANKS TODO aclocal.in aclocal.m4 ansi2knr.1 ansi2knr.c automake.in \
-compile config.guess config.sub configure configure.in depcomp \
-elisp-comp install-sh mdate-sh missing mkinstalldirs py-compile \
-stamp-vti texinfo.tex version.texi ylwrap
+DIST_COMMON = README $(dist_pkgdata_DATA) $(dist_script_DATA) AUTHORS \
+COPYING ChangeLog INSTALL NEWS README-alpha THANKS TODO aclocal.in \
+aclocal.m4 ansi2knr.1 ansi2knr.c automake.in compile config.guess \
+config.sub configure configure.in depcomp elisp-comp install-sh \
+mdate-sh missing mkinstalldirs py-compile stamp-vti texinfo.tex \
+version.texi ylwrap
DIST_SUBDIRS = $(SUBDIRS)
all: all-recursive
fi
@locals=`grep -c '^[ \t]*local [^*]' $(srcdir)/automake.in`; \
case $$locals in \
- [0-6] ) \
- echo "Wow, congrats! There are $$locals \`local' now!." >&2; \
+ [0] ) \
+ echo "Wow, congrats! There are no \`local' now!." >&2; \
echo "Please update Makefile.am (maintainer-check)." >&2; \
exit 1; \
;; \
- 7 ) ;; \
+ 1 ) ;; \
* ) \
echo "Too many \`local'! Are you sure you need $$locals of them?" >&2; \
- echo "Up to now 7 was enough." >&2; \
+ echo "Up to now 1 was enough." >&2; \
exit 1; \
;; \
esac
# Perl reimplementation by Tom Tromey <tromey@cygnus.com>.
require 5.005;
-use strict;
+# FIXME: use strict;
use File::Basename;
use IO::File;
## Variables reset by &initialize_per_input. ##
## ------------------------------------------ ##
+# Basename and relative dir of the input file.
+my $am_file_name;
+my $am_relative_dir;
+
+# Same but wrt Makefile.in.
+my $in_file_name;
+my $relative_dir;
+
+# These two variables are used when generating each Makefile.in.
+# They hold the Makefile.in until it is ready to be printed.
my $output_rules;
my $output_vars;
my $output_trailer;
# This holds the set of included files.
my @include_stack;
-# This holds the "relative directory" of the current Makefile.in.
-# Eg for src/Makefile.in, this is "src".
-my $relative_dir;
-
-# Same but wrt Makefile.am.
-my $am_relative_dir;
-
# This holds a list of files that are included in the
# distribution.
my %dist_common;
# (Re)-Initialize per-Makefile.am variables.
sub initialize_per_input ()
{
+ # Basename and relative dir of the input file.
+ $am_file_name = '';
+ $am_relative_dir = '';
+
+ # Same but wrt Makefile.in.
+ $in_file_name = '';
+ $relative_dir = '';
+
# These two variables are used when generating each Makefile.in.
# They hold the Makefile.in until it is ready to be printed.
$output_rules = '';
{
my ($output, $makefile) = @_;
- # Name of input file ("Makefile.in") and output file
- # ("Makefile.am"). These have no directory components.
- (my $am_file_name = $makefile) =~ s/^.*\///;
- my $in_file_name = $am_file_name . '.in';
- $am_file_name .= '.am';
+ # Name of input file ("Makefile.am") and output file
+ # ("Makefile.in"). These have no directory components.
+ $am_file_name = basename ($makefile) . '.am';
+ $in_file_name = basename ($makefile) . '.in';
# $OUTPUT is encoded. If it contains a ":" then the first element
# is the real output file, and all remaining elements are input
# check must be done for every run, even those where we are only
# looking at a subdir Makefile. We must set relative_dir so that
# the file-finding machinery works.
- # Needs dynamic scopes.
- local $relative_dir = '.';
+ # FIXME: Is this broken because it needs dynamic scopes.
+ # My tests seems to show it's not the case.
+ $relative_dir = '.';
&require_config_file ($FOREIGN, 'install-sh', 'mkinstalldirs', 'missing');
&am_error ("\`install.sh' is an anachronism; use \`install-sh' instead")
if -f $config_aux_path[0] . '/install.sh';
echo "Don't use \`local' with parens: use several \`local' above." >&2; \
exit 1; \
fi
-## Up to now we manage to limit to 6 uses of local.
+## Up to now we manage to limit to 1 use of local.
@locals=`grep -c '^[ \t]*local [^*]' $(srcdir)/automake.in`; \
case $$locals in \
- [0-6] ) \
- echo "Wow, congrats! There are $$locals \`local' now!." >&2; \
+ [0] ) \
+ echo "Wow, congrats! There are no \`local' now!." >&2; \
echo "Please update Makefile.am (maintainer-check)." >&2; \
exit 1; \
;; \
- 7 ) ;; \
+ 1 ) ;; \
* ) \
echo "Too many \`local'! Are you sure you need $$locals of them?" >&2; \
- echo "Up to now 7 was enough." >&2; \
+ echo "Up to now 1 was enough." >&2; \
exit 1; \
;; \
esac
-# Makefile.in generated automatically by automake 1.4e from Makefile.am
+# generated automatically by automake 1.4e from
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
DIST_SOURCES =
DATA = $(m4data_DATA)
-DIST_COMMON = Makefile.am Makefile.in
+DIST_COMMON =
all: all-am
.SUFFIXES:
-# Makefile.in generated automatically by automake 1.4e from Makefile.am
+# generated automatically by automake 1.4e from
# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
# Free Software Foundation, Inc.
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_CLEAN_FILES =
DIST_SOURCES =
-DIST_COMMON = Makefile.am Makefile.in
+DIST_COMMON =
all: all-am
.SUFFIXES: