+2003-08-06 Alexandre Duret-Lutz <adl@gnu.org>
+
+ * lib/Automake/Config.in: New file.
+ * lib/Automake/Makefile.am (nodist_perllib_DATA, do_subst,
+ CLEANFILES): New variables.
+ (Config.pm): New rule.
+ * Makefile.am (maintainer-check): Adjust expected differences
+ between automake.in and automake.
+ * aclocal.in, automake.in: Use Automake::Config.
+
2003-08-05 Alexandre Duret-Lutz <adl@gnu.org>
* tests/ltconv.test: s/rm/rm -f/ to placate maintainer-check.
## This check avoids accidental configure substitutions in the source.
## There are exactly 8 lines that should be modified. This works out
## to 28 lines of diffs.
- @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 28; then \
+ @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 20; then \
echo "found too many diffs between automake.in and automake"; 1>&2; \
diff -c $(srcdir)/automake.in automake; \
exit 1; \
# Some simple checks, and then ordinary check. These are only really
# guaranteed to work on my machine.
maintainer-check: automake aclocal
- @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 28; then \
+ @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 20; then \
echo "found too many diffs between automake.in and automake"; 1>&2; \
diff -c $(srcdir)/automake.in automake; \
exit 1; \
unshift @INC, $perllibdir;
}
+use Automake::Config;
use Automake::General;
use Automake::Configure_ac;
use Automake::XFile;
use Automake::FileUtils;
use File::stat;
-# Some constants.
-$VERSION = '@VERSION@';
-$APIVERSION = '@APIVERSION@';
-$PACKAGE = '@PACKAGE@';
# Note that this isn't pkgdatadir, but a separate directory.
# Note also that the versioned directory is handled later.
$acdir = '@datadir@/aclocal';
package Automake;
use strict;
+use Automake::Config;
use Automake::General;
use Automake::XFile;
use Automake::Channels;
## Constants. ##
## ----------- ##
-# Parameters set by configure. Not to be changed. NOTE: assign
-# VERSION as string so that e.g. version 0.30 will print correctly.
-my $VERSION = '@VERSION@';
-my $PACKAGE = '@PACKAGE@';
-my $libdir = '@datadir@/@PACKAGE@-@APIVERSION@';
-
# Some regular expressions. One reason to put them here is that it
# makes indentation work better in Emacs.
mkdir automake-$APIVERSION
cp -rf lib/* automake-$APIVERSION
+dosubst ()
+{
+ sed -e "s%@PERL@%$PERL%g" \
+ -e "s%@VERSION@%$VERSION%g" \
+ -e "s%@APIVERSION@%$APIVERSION%g" \
+ -e "s%@PACKAGE@%$PACKAGE%g" \
+ -e "s%@datadir@%$datadir%g" \
+ -e "s%@SHELL@%$BOOTSTRAP_SHELL%g" $1 > $2
+}
+
+
+# Create temporary replacement for lib/Automake/Config.pm
+dosubst automake-$APIVERSION/Automake/Config.in \
+ automake-$APIVERSION/Automake/Config.pm
+
# Create temporary replacement for aclocal
-sed -e "s%@PERL@%$PERL%g" \
- -e "s%@VERSION@%$VERSION%g" \
- -e "s%@APIVERSION@%$APIVERSION%g" \
- -e "s%@PACKAGE@%$PACKAGE%g" \
- -e "s%@datadir@%$datadir%g" \
- -e "s%@SHELL@%$BOOTSTRAP_SHELL%g" \
- aclocal.in >aclocal.tmp
+dosubst aclocal.in aclocal.tmp
# Overwrite amversion.m4
-sed -e "s%@VERSION@%$VERSION%g" \
- -e "s%@APIVERSION@%$APIVERSION%g" \
- m4/amversion.in >m4/amversion.m4
+dosubst m4/amversion.in m4/amversion.m4
# Create temporary replacement for automake
-sed -e "s%@PERL@%$PERL%g" \
- -e "s%@VERSION@%$VERSION%g" \
- -e "s%@APIVERSION@%$APIVERSION%g" \
- -e "s%@PACKAGE@%$PACKAGE%g" \
- -e "s%@datadir@%$datadir%g" \
- -e "s%@SHELL@%$BOOTSTRAP_SHELL%g" \
- automake.in >automake.tmp
+dosubst automake.in automake.tmp
# Run the autotools.
$PERL ./aclocal.tmp -I m4
# Remove temporary files and directories
rm -rf aclocal-$APIVERSION automake-$APIVERSION
rm -f aclocal.tmp automake.tmp
+rm -f lib/Automake/Config.pm
--- /dev/null
+# Copyright (C) 2003 Free Software Foundation, Inc. -*- Perl -*-
+
+# 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.
+
+package Automake::Config;
+use strict;
+
+use vars qw (@ISA @EXPORT);
+
+@ISA = qw (Exporter);
+@EXPORT = qw ($APIVERSION $PACKAGE $VERSION $libdir);
+
+use vars qw ($APIVERSION $PACKAGE $VERSION $libdir);
+
+# Parameters set by configure. Not to be changed. NOTE: assign
+# VERSION as string so that e.g. version 0.30 will print correctly.
+$APIVERSION = '@APIVERSION@';
+$PACKAGE = '@PACKAGE@';
+$VERSION = '@VERSION@';
+$libdir = '@datadir@/@PACKAGE@-@APIVERSION@';
+
+1;;
+
+### Setup "GNU" style for perl-mode and cperl-mode.
+## Local Variables:
+## perl-indent-level: 2
+## perl-continued-statement-offset: 2
+## perl-continued-brace-offset: 0
+## perl-brace-offset: 0
+## perl-brace-imaginary-offset: 0
+## perl-label-offset: -2
+## cperl-indent-level: 2
+## cperl-brace-offset: 0
+## cperl-continued-brace-offset: 0
+## cperl-label-offset: -2
+## cperl-extra-newline-before-brace: t
+## cperl-merge-trailing-else: nil
+## cperl-continued-statement-offset: 2
+## End:
Version.pm \
XFile.pm \
Wrap.pm
+
+nodist_perllib_DATA = \
+ Config.pm
+
+CLEANFILES = $(nodist_perllib_DATA)
+
+## We can't use configure to do the substitution here; we must do it
+## by hand. We use a funny notation here to avoid configure
+## substitutions in our text.
+do_subst = sed -e 's,[@]datadir[@],$(datadir),g' -e 's,[@]PERL[@],$(PERL),g' \
+ -e 's,[@]configure_input[@],@configure_input@,g' \
+ -e 's,[@]PACKAGE[@],$(PACKAGE),g' \
+ -e 's,[@]VERSION[@],$(VERSION),g' \
+ -e 's,[@]APIVERSION[@],$(APIVERSION),g' \
+ -e 's,[@]SHELL[@],$(SHELL),g'
+
+Config.pm: Config.in
+ $(do_subst) <$(srcdir)/Config.in >$@
install-recursive installcheck-recursive installdirs-recursive \
pdf-recursive ps-recursive uninstall-info-recursive \
uninstall-recursive
-am__installdirs = $(DESTDIR)$(perllibdir)
+am__installdirs = $(DESTDIR)$(perllibdir) $(DESTDIR)$(perllibdir)
dist_perllibDATA_INSTALL = $(INSTALL_DATA)
-DATA = $(dist_perllib_DATA)
+nodist_perllibDATA_INSTALL = $(INSTALL_DATA)
+DATA = $(dist_perllib_DATA) $(nodist_perllib_DATA)
ETAGS = etags
ETAGSFLAGS =
CTAGS = ctags
XFile.pm \
Wrap.pm
+nodist_perllib_DATA = \
+ Config.pm
+
+CLEANFILES = $(nodist_perllib_DATA)
+do_subst = sed -e 's,[@]datadir[@],$(datadir),g' -e 's,[@]PERL[@],$(PERL),g' \
+ -e 's,[@]configure_input[@],@configure_input@,g' \
+ -e 's,[@]PACKAGE[@],$(PACKAGE),g' \
+ -e 's,[@]VERSION[@],$(VERSION),g' \
+ -e 's,[@]APIVERSION[@],$(APIVERSION),g' \
+ -e 's,[@]SHELL[@],$(SHELL),g'
+
all: all-recursive
.SUFFIXES:
echo " rm -f $(DESTDIR)$(perllibdir)/$$f"; \
rm -f $(DESTDIR)$(perllibdir)/$$f; \
done
+install-nodist_perllibDATA: $(nodist_perllib_DATA)
+ @$(NORMAL_INSTALL)
+ $(mkinstalldirs) $(DESTDIR)$(perllibdir)
+ @list='$(nodist_perllib_DATA)'; for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " $(nodist_perllibDATA_INSTALL) $$d$$p $(DESTDIR)$(perllibdir)/$$f"; \
+ $(nodist_perllibDATA_INSTALL) $$d$$p $(DESTDIR)$(perllibdir)/$$f; \
+ done
+
+uninstall-nodist_perllibDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(nodist_perllib_DATA)'; for p in $$list; do \
+ f="`echo $$p | sed -e 's|^.*/||'`"; \
+ echo " rm -f $(DESTDIR)$(perllibdir)/$$f"; \
+ rm -f $(DESTDIR)$(perllibdir)/$$f; \
+ done
# This directory's subdirectories are mostly independent; you can cd
# into them and run `make' without going through this Makefile.
all-am: Makefile $(DATA)
installdirs: installdirs-recursive
installdirs-am:
- $(mkinstalldirs) $(DESTDIR)$(perllibdir)
+ $(mkinstalldirs) $(DESTDIR)$(perllibdir) $(DESTDIR)$(perllibdir)
install: install-recursive
install-exec: install-exec-recursive
install-data: install-data-recursive
mostlyclean-generic:
clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
distclean-generic:
-rm -f $(CONFIG_CLEAN_FILES)
info-am:
-install-data-am: install-dist_perllibDATA
+install-data-am: install-dist_perllibDATA install-nodist_perllibDATA
install-exec-am:
ps-am:
-uninstall-am: uninstall-dist_perllibDATA uninstall-info-am
+uninstall-am: uninstall-dist_perllibDATA uninstall-info-am \
+ uninstall-nodist_perllibDATA
uninstall-info: uninstall-info-recursive
distdir dvi dvi-am html html-am info info-am install \
install-am install-data install-data-am \
install-dist_perllibDATA install-exec install-exec-am \
- install-info install-info-am install-man install-strip \
- installcheck installcheck-am installdirs installdirs-am \
- maintainer-clean maintainer-clean-generic \
- maintainer-clean-recursive mostlyclean mostlyclean-generic \
- mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \
- uninstall uninstall-am uninstall-dist_perllibDATA \
- uninstall-info-am
-
+ install-info install-info-am install-man \
+ install-nodist_perllibDATA install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic maintainer-clean-recursive \
+ mostlyclean mostlyclean-generic mostlyclean-recursive pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+ uninstall-dist_perllibDATA uninstall-info-am \
+ uninstall-nodist_perllibDATA
+
+
+Config.pm: Config.in
+ $(do_subst) <$(srcdir)/Config.in >$@
# 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:
-@set UPDATED 31 July 2003
-@set UPDATED-MONTH July 2003
+@set UPDATED 5 August 2003
+@set UPDATED-MONTH August 2003
@set EDITION 1.7a
@set VERSION 1.7a
-@set UPDATED 31 July 2003
-@set UPDATED-MONTH July 2003
+@set UPDATED 5 August 2003
+@set UPDATED-MONTH August 2003
@set EDITION 1.7a
@set VERSION 1.7a