From 959554f19973d1cff02a45f931042426486c79c2 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Fri, 27 Apr 2001 10:45:13 +0000 Subject: [PATCH] * Automake/: New directory. * Automake/Struct.pm: New file, based on Perl 5.6's Class::Struct. * automake.in (Language): Use Automake::Struct. * tests/defs: Adjust to find Struct. --- ChangeLog | 7 +++++ Makefile.am | 11 ++++--- Makefile.in | 72 +++++++++++++++++++++++++++++----------------- THANKS | 2 +- automake.in | 12 ++++++-- configure | 6 ++-- configure.in | 7 +++-- lib/am/Makefile.am | 11 ++++--- tests/defs | 7 +++-- 9 files changed, 91 insertions(+), 44 deletions(-) diff --git a/ChangeLog b/ChangeLog index 80312d1d..54d0c0e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2001-04-27 Akim Demaille + + * Automake/: New directory. + * Automake/Struct.pm: New file, based on Perl 5.6's Class::Struct. + * automake.in (Language): Use Automake::Struct. + * tests/defs: Adjust to find Struct. + 2001-04-23 Pavel Roskin * automake.in: Add forward declaration for register_language(). diff --git a/Makefile.am b/Makefile.am index 26ed9c11..84cc8110 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,12 +5,15 @@ MAINT_CHARSET = latin1 ## We need `.' in SUBDIRS because we want `check' to build `.' before ## tests. -SUBDIRS = . m4 tests +SUBDIRS = . m4 Automake tests bin_SCRIPTS = automake aclocal info_TEXINFOS = automake.texi -amfiles = ansi2knr.am check.am clean-hdr.am clean.am compile.am \ + +amdir = $(pkgdatadir)/am + +dist_am_DATA = ansi2knr.am check.am clean-hdr.am clean.am compile.am \ configure.am data.am dejagnu.am depend.am depend2.am distdir.am \ ext-compile.am footer.am header-vars.am header.am install.am java.am \ lex.am library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \ @@ -18,8 +21,8 @@ mans-vars.am mans.am multilib.am program.am progs.am python.am \ remake-hdr.am scripts.am subdirs.am tags.am texi-vers.am texibuild.am \ texinfos.am yacc.am -dist_pkgdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 \ -$(amfiles) + +dist_pkgdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 ## These must all be executable when installed. However, if we use ## _SCRIPTS, then the program transform will be applied, which is not diff --git a/Makefile.in b/Makefile.in index cab9e677..a9d1749b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -76,12 +76,14 @@ install_sh = @install_sh@ AUTOMAKE_OPTIONS = gnits 1.4 MAINT_CHARSET = latin1 -SUBDIRS = . m4 tests +SUBDIRS = . m4 Automake tests bin_SCRIPTS = automake aclocal info_TEXINFOS = automake.texi -amfiles = ansi2knr.am check.am clean-hdr.am clean.am compile.am \ +amdir = $(pkgdatadir)/am + +dist_am_DATA = ansi2knr.am check.am clean-hdr.am clean.am compile.am \ configure.am data.am dejagnu.am depend.am depend2.am distdir.am \ ext-compile.am footer.am header-vars.am header.am install.am java.am \ lex.am library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \ @@ -90,9 +92,7 @@ remake-hdr.am scripts.am subdirs.am tags.am texi-vers.am texibuild.am \ texinfos.am yacc.am -dist_pkgdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 \ -$(amfiles) - +dist_pkgdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 scriptdir = $(pkgdatadir) dist_script_DATA = config.guess config.sub install-sh mdate-sh missing \ @@ -125,20 +125,20 @@ TEXI2DVI = texi2dvi INFO_DEPS = automake.info DVIS = automake.dvi TEXINFOS = automake.texi -DATA = $(dist_pkgdata_DATA) $(dist_script_DATA) +DATA = $(dist_am_DATA) $(dist_pkgdata_DATA) $(dist_script_DATA) RECURSIVE_TARGETS = info-recursive dvi-recursive install-info-recursive \ uninstall-info-recursive all-recursive install-data-recursive \ install-exec-recursive installdirs-recursive install-recursive \ uninstall-recursive check-recursive installcheck-recursive -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_am_DATA) $(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_SUBDIRS = $(SUBDIRS) all: all-recursive @@ -272,6 +272,23 @@ maintainer-clean-aminfo: rm -f $$i-[0-9]*; \ fi; \ done +install-dist_amDATA: $(dist_am_DATA) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(amdir) + @list='$(dist_am_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(amdir)/$$f"; \ + $(INSTALL_DATA) $$d$$p $(DESTDIR)$(amdir)/$$f; \ + done + +uninstall-dist_amDATA: + @$(NORMAL_UNINSTALL) + @list='$(dist_am_DATA)'; for p in $$list; do \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(amdir)/$$f"; \ + rm -f $(DESTDIR)$(amdir)/$$f; \ + done install-dist_pkgdataDATA: $(dist_pkgdata_DATA) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(pkgdatadir) @@ -486,7 +503,7 @@ all-am: Makefile $(INFO_DEPS) $(SCRIPTS) $(DATA) installdirs: installdirs-recursive installdirs-am: - $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(infodir) $(DESTDIR)$(pkgdatadir) $(DESTDIR)$(scriptdir) + $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(infodir) $(DESTDIR)$(amdir) $(DESTDIR)$(pkgdatadir) $(DESTDIR)$(scriptdir) install: install-recursive install-exec: install-exec-recursive @@ -532,8 +549,8 @@ info: info-recursive info-am: $(INFO_DEPS) -install-data-am: install-dist_pkgdataDATA install-dist_scriptDATA \ - install-info-am +install-data-am: install-dist_amDATA install-dist_pkgdataDATA \ + install-dist_scriptDATA install-info-am @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook @@ -575,8 +592,9 @@ mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-aminfo mostlyclean-generic mostlyclean-vti -uninstall-am: uninstall-binSCRIPTS uninstall-dist_pkgdataDATA \ - uninstall-dist_scriptDATA uninstall-info-am +uninstall-am: uninstall-binSCRIPTS uninstall-dist_amDATA \ + uninstall-dist_pkgdataDATA uninstall-dist_scriptDATA \ + uninstall-info-am uninstall-info: uninstall-info-recursive @@ -585,18 +603,20 @@ uninstall-info: uninstall-info-recursive distclean distclean-generic distclean-recursive distclean-tags \ distdir dvi dvi-am dvi-recursive info info-am info-recursive \ install install-am install-binSCRIPTS install-data \ - install-data-am install-data-recursive install-dist_pkgdataDATA \ - install-dist_scriptDATA install-exec install-exec-am \ - install-exec-recursive install-info install-info-recursive \ - install-man install-recursive install-strip installcheck \ - installcheck-am installcheck-local installdirs installdirs-am \ - installdirs-recursive maintainer-clean maintainer-clean-aminfo \ + install-data-am install-data-recursive install-dist_amDATA \ + install-dist_pkgdataDATA install-dist_scriptDATA install-exec \ + install-exec-am install-exec-recursive install-info \ + install-info-recursive install-man install-recursive \ + install-strip installcheck installcheck-am installcheck-local \ + installdirs installdirs-am installdirs-recursive \ + maintainer-clean maintainer-clean-aminfo \ maintainer-clean-generic maintainer-clean-recursive \ maintainer-clean-vti mostlyclean mostlyclean-aminfo \ mostlyclean-generic mostlyclean-recursive mostlyclean-vti tags \ tags-recursive uninstall uninstall-am uninstall-binSCRIPTS \ - uninstall-dist_pkgdataDATA uninstall-dist_scriptDATA \ - uninstall-info-recursive uninstall-recursive + uninstall-dist_amDATA uninstall-dist_pkgdataDATA \ + uninstall-dist_scriptDATA uninstall-info-recursive \ + uninstall-recursive install-data-hook: diff --git a/THANKS b/THANKS index 84e6179a..354ff4b7 100644 --- a/THANKS +++ b/THANKS @@ -3,7 +3,7 @@ It would not be what it is today without the invaluable help of these people: Adam J. Richter adam@yggdrasil.com -Akim Demaille demaille@inf.enst.fr +Akim Demaille akim@freefriends.org Alex Hornby alex@anvil.co.uk Alexandre Duret-Lutz duret_g@epita.fr Alexander V. Lukyanov lav@yars.free.net diff --git a/automake.in b/automake.in index dd937c80..0b3152a3 100755 --- a/automake.in +++ b/automake.in @@ -28,7 +28,15 @@ eval 'exec @PERL@ -S $0 ${1+"$@"}' # Perl reimplementation by Tom Tromey . package Language; -use Class::Struct; + +BEGIN +{ + my $prefix = "@prefix@"; + my $perllibdir = $ENV{'perllibdir'} || "@datadir@/@PACKAGE@/lib"; + unshift @INC, "$perllibdir"; +} + +use Automake::Struct; struct ('ansi' => '$', 'autodep' => '$', 'compile' => '$', @@ -69,7 +77,7 @@ my $me = basename ($0); my $VERSION = "@VERSION@"; my $PACKAGE = "@PACKAGE@"; my $prefix = "@prefix@"; -my $am_dir = "@datadir@/@PACKAGE@"; +my $am_dir = "@datadir@/@PACKAGE@/am"; # String constants. my $IGNORE_PATTERN = '^##([^#].*)?$'; diff --git a/configure b/configure index b0a275a7..8a698560 100755 --- a/configure +++ b/configure @@ -1018,7 +1018,8 @@ done ac_given_srcdir=$srcdir ac_given_INSTALL="$INSTALL" -trap 'rm -fr `echo "Makefile automake aclocal m4/Makefile tests/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "Makefile automake aclocal + Automake/Makefile m4/Makefile tests/Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then diff --git a/configure.in b/configure.in index dbe333b8..db1aa4f2 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,4 @@ -dnl Process this file with autoconf to produce a configure script. +# Process this file with autoconf to produce a configure script. AC_INIT(automake.in) AM_INIT_AUTOMAKE(automake, 1.4e) @@ -14,5 +14,6 @@ $PERL -e 'require 5.005;' || { AC_MSG_ERROR([perl 5.005 or better is required]) } -AC_OUTPUT([Makefile automake aclocal m4/Makefile tests/Makefile], -[chmod +x automake aclocal]) +AC_OUTPUT([Makefile automake aclocal + Automake/Makefile m4/Makefile tests/Makefile], + [chmod +x automake aclocal]) diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am index 26ed9c11..84cc8110 100644 --- a/lib/am/Makefile.am +++ b/lib/am/Makefile.am @@ -5,12 +5,15 @@ MAINT_CHARSET = latin1 ## We need `.' in SUBDIRS because we want `check' to build `.' before ## tests. -SUBDIRS = . m4 tests +SUBDIRS = . m4 Automake tests bin_SCRIPTS = automake aclocal info_TEXINFOS = automake.texi -amfiles = ansi2knr.am check.am clean-hdr.am clean.am compile.am \ + +amdir = $(pkgdatadir)/am + +dist_am_DATA = ansi2knr.am check.am clean-hdr.am clean.am compile.am \ configure.am data.am dejagnu.am depend.am depend2.am distdir.am \ ext-compile.am footer.am header-vars.am header.am install.am java.am \ lex.am library.am libs.am libtool.am lisp.am ltlib.am ltlibrary.am \ @@ -18,8 +21,8 @@ mans-vars.am mans.am multilib.am program.am progs.am python.am \ remake-hdr.am scripts.am subdirs.am tags.am texi-vers.am texibuild.am \ texinfos.am yacc.am -dist_pkgdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 \ -$(amfiles) + +dist_pkgdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 ## These must all be executable when installed. However, if we use ## _SCRIPTS, then the program transform will be applied, which is not diff --git a/tests/defs b/tests/defs index 6a162e31..6d981411 100644 --- a/tests/defs +++ b/tests/defs @@ -71,8 +71,11 @@ echo "=== Running test $0" # See how Automake should be run. We put --foreign as the default # strictness to avoid having to create lots and lots of files. A test # can override this by specifying a different strictness. -test -z "$AUTOMAKE" \ - && AUTOMAKE="$PERL ../../automake --amdir=$srcdir/.. --foreign" +if test -z "$AUTOMAKE"; then + perllibdir=$srcdir/.. + export perllibdir + AUTOMAKE="$PERL ../../automake --amdir=$srcdir/.. --foreign" +fi # See how aclocal should be run. test -z "$ACLOCAL" \ -- 2.43.5