]> sourceware.org Git - automake.git/commitdiff
Bug fixes
authorTom Tromey <tromey@redhat.com>
Mon, 10 Jun 1996 05:28:21 +0000 (05:28 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 10 Jun 1996 05:28:21 +0000 (05:28 +0000)
18 files changed:
ChangeLog
TODO
automake.in
automake.texi
compile-kr.am
compile-vars.am
compile.am
lib/am/compile.am
lib/am/texinfos.am
remake.am
tests/ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/mkinstall2.test [new file with mode: 0755]
tests/texinfo2.test [new file with mode: 0755]
tests/yacc.test [new file with mode: 0755]
texinfos.am
version.texi

index 819724d9ae68425a5530d35474ab1483bebf5a6b..6876cd6ba63de7719e82379932613b2e68b06e71 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,25 @@
+Sun Jun  9 17:45:48 1996  Tom Tromey  <tromey@creche.cygnus.com>
+
+       * texinfos.am (install-info): Don't install ~ files.  Bug report
+       from Greg McGary.
+       * automake.in (handle_texinfo): Don't push '.info*' onto
+       @infos_list.
+
+       * automake.in (handle_gettext): Ensure po and intl in SUBDIRS when
+       using gettext.
+       (handle_dist): Pass --with-included-gettext to configure if using
+       gettext.
+
+       * compile-kr.am (._c._o): Pass -c to $(COMPILE).
+       (.c._o): Ditto.
+       * compile.am (.c.o): Pass -c to $(COMPILE).
+       * compile-vars.am (COMPILE): Don't include -c.
+
+       * remake.am ($(srcdir)/Makefile.in): Pass --strictness to
+       automake.
+       * automake.in (handle_configure): Supply --strictness arg to
+       automake.
+
 Fri Jun  7 12:31:31 1996  Tom Tromey  <tromey@creche.cygnus.com>
 
        * automake.in (handle_tests): Fix quoting on `pwd`.
@@ -5,6 +27,13 @@ Fri Jun  7 12:31:31 1996  Tom Tromey  <tromey@creche.cygnus.com>
        (handle_man_pages): Don't put man directory on @installdirs if
        no-installman is specified.
        (handle_texinfo): Handle no-installinfo option.
+       (handle_options): Compare version against $num_version, not
+       $VERSION.
+       (handle_source_transform): Generate rules for output of lex,
+       yacc.  Bug report from Thomas Morgan.  Test yacc.test.
+       (handle_dist): "distcheck" now runs "make dvi".
+       (handle_tests): Support $(TESTS_ENVIRONMENT).  Idea from Ulrich
+       Drepper.
 
        * dejagnu.am (check-DEJAGNU): Depend on site.exp.
 
diff --git a/TODO b/TODO
index 39a7bcfc3f31b505ea8c4eab0ad6d556eab3b03a..9e60ca7a4abea4e52456cdd949f7e06eb28c8c67 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,8 +1,9 @@
 Priorities for release:
   [ none ]
 
-** Write test case to check that no-installman suppresses dirs on
-    "make installdirs"
+** Consider using implicit .y.c and .l.c rules instead of current
+   lex/yacc trickery
+
 
 consider supporting "var+= stuff" syntax.  rewrite to just var=... on
 output.  This is sometimes convenient when you want to write a
@@ -42,9 +43,6 @@ Consider: "cvs" option adds some cvs-specific rules?
 Consider adding an option that statically rewrites @MAINT@ to "#M#".
 (this would be useful at Cygnus)
 
-Automake and Cygnus: info target separate from all.  Always make
-install-info target.  install-info separate from install.
-
 Automake: should EXTRA_DIST files be statically findable?
 
 Automake: devo/inet/Makefile.am has "all-local".  "install" depends on
@@ -147,6 +145,8 @@ Lex, yacc support:
   for yacc and lex source
 * if AC_PROG_LEX used, ensure LEXLIB is in foo_LDADD
 * require AC_DECL_YYTEXT for lex
+* Actually use $seen_prog_yacc
+* Require AC_PROG_LEX or equivalent
 
 require AC_PROG_CXX if any C++ source files found?
 Better support for C++ all around
@@ -226,6 +226,8 @@ These can both be handled via dist-hook:
 . Consider allowing eg "foo/bar" to appear in EXTRA_DIST, and generating
   code to make directory foo at dist time
 
+consider having no-gzip option that turns off gzip/GNU tar.
+
 ================================================================
 
 Document:
@@ -278,8 +280,6 @@ document new variables introduced when AC_CANONICAL_* used
 
 document _LISP handling
 
-document no-installinfo option
-
 ================================================================
 
 Libraries:
index 1eda9f32a086d57c58c5b0abd1fb6a008f9b2939..50123a93198ec8f5c495b320ceb0a41289fe48c2 100755 (executable)
@@ -448,7 +448,7 @@ sub handle_options
            # Got a version number.  Is the syntax too strict?
            local ($num_version);
            ($num_version = $VERSION) =~ tr/0-9//d;
-           if ($VERSION < $_)
+           if ($num_version < $_)
            {
                &am_line_error ('AUTOMAKE_OPTIONS',
                                "require version $_, only have $VERSION");
@@ -583,11 +583,31 @@ sub handle_source_transform
                # Skip things that look like configure substitutions.
                next if /^\@.*\@$/;
 
+               # Include .c file for lex or yacc source in distribution.
                if (/^(.*)\.[yl]$/)
                {
-                   # Automatically include generated .c file in
-                   # distribution.
+                   # Yacc source.
                    &push_dist_common ($1 . '.c');
+                   if (! defined $targets{$1 . '.c'})
+                   {
+                       # Generate a target.
+                       $output_rules .= ($1 . '.c: ' . $_ . "\n"
+                                         . "\t"
+                                         . 'cd $(srcdir) && $(YACC) $< && mv y.tab.c '
+                                         . $1 . '.c' . "\n");
+                   }
+               }
+               elsif (/^(.*)\.l$/)
+               {
+                   # Lex source.
+                   &push_dist_common ($1 . '.c');
+                   if (! defined $targets{$1 . '.c'})
+                   {
+                       $output_rules .= ($1 . '.c: ' . $_ . "\n"
+                                         . "\t"
+                                         . 'cd $(srcdir) && $(LEX) $< && mv lex.yy.c '
+                                         . $1 . '.c' . "\n");
+                   }
                }
 
                # Transform source files into .o files.
@@ -924,7 +944,8 @@ sub handle_texinfo
        $output_rules .= ("\n" . $infobase . ".info: "
                          . join (' ', @texi_deps) . "\n\n");
 
-       push (@infos_list, $infobase . '.info*');
+       push (@infos_list, $infobase . '.info', '.info-[0-9]',
+             '.info-[0-9][0-9]');
        push (@info_deps_list, $infobase . '.info');
        push (@dvis_list, $infobase . '.dvi');
 
@@ -1258,7 +1279,7 @@ sub handle_dist
     if ($relative_dir eq '.')
     {
        # Rule to check whether a distribution is viable.
-       $output_rules .= '# This target untars the dist file and tries a VPATH configuration.  Then
+       $output_rules .= ('# This target untars the dist file and tries a VPATH configuration.  Then
 # it guarantees that the distribution is self-contained by making another
 # tarfile.
 distcheck: dist
@@ -1268,8 +1289,12 @@ distcheck: dist
        mkdir $(distdir)/=inst
        dc_install_base=`cd $(distdir)/=inst && pwd`; \\
        cd $(distdir)/=build \\
-         && ../configure --srcdir=.. --prefix=$$dc_install_base \\
+         && ../configure '
+
+                         . ($seen_gettext ? '--with-included-gettext ' : '')
+                         . '--srcdir=.. --prefix=$$dc_install_base \\
          && $(MAKE) \\
+         && $(MAKE) dvi \\
          && $(MAKE) check \\
          && $(MAKE) install \\
          && $(MAKE) installcheck \\
@@ -1278,7 +1303,7 @@ distcheck: dist
        @echo "========================"; \\
        echo "$(distdir).tar.gz is ready for distribution"; \\
        echo "========================"
-';
+');
 
        $output_rules .= 'dist: distdir' . "\n\t";
        $output_rules .= 'chmod -R a+r $(distdir)' . "\n\t";
@@ -1417,7 +1442,10 @@ sub handle_configure
            $output_vars .= "ACLOCAL = aclocal.m4\n";
            &push_dist_common ('aclocal.m4');
        }
-       $output_rules .= &file_contents ('remake');
+       $output_rules .= &file_contents_with_transform ('s/\@STRICTNESS\@/'
+                                                       . $strictness_name
+                                                       . '/g',
+                                                       'remake');
 
        &am_error
            ("\`install.sh' is an anachronism; use \`install-sh' instead")
@@ -1533,10 +1561,7 @@ sub handle_gettext
 {
     return if ! $seen_gettext || $relative_dir ne '.';
 
-    # As of 0.10.6, gettext still wants @INTLSUB@ and @POSUB@ in
-    # SUBDIRS.  This is going to change in a future version.  So for
-    # now we simply do no checking.
-    if (0 && &variable_defined ('SUBDIRS'))
+    if (&variable_defined ('SUBDIRS'))
     {
        &am_line_error
            ('SUBDIRS',
@@ -1973,7 +1998,7 @@ sub handle_tests
          all=`expr $$all + 1`; \\
          if test -f $$tst; then dir=.; \\
          else dir="$(srcdir)"; fi; \\
-         if $$dir/$$tst; then \\
+         if $(TESTS_ENVIRONMENT) $$dir/$$tst; then \\
            echo "PASS: $$tst"; \\
          else \\
            failed=`expr $$failed + 1`; \\
index 66f588a9714dfd909fd7f8459ec444b5507bb139..10a04d6e47b3d8726ea9af1a67a7b137dc1b419b 100644 (file)
@@ -933,7 +933,8 @@ also contain the file @file{texinfo.tex}.  This file is supplied with
 Automake.
 
 Automake generates an @code{install-info} target; some people apparently
-use this.
+use this.  By default, info pages are installed by @samp{make install}.
+This can be prevented via the @code{no-installinfo} option.
 
 
 @node Man pages
@@ -1076,7 +1077,11 @@ If the variable @code{TESTS} is defined, its value is taken to be a list
 of programs to run in order to do the testing.  The programs can either
 be derived objects or source objects; the generated rule will look both
 in @var{srcdir} and @file{.}.  The number of failures will be printed at
-the end of the run.
+the end of the run.  The variable @code{TESTS_ENVIRONMENT} can be used
+to set environment variables for the test run; the environment variable
+@code{srcdir} is set in the rule.
+@vindex TESTS
+@vindex TESTS_ENVIRONMENT
 
 If @samp{dejagnu} appears in @code{AUTOMAKE_OPTIONS}, then the a
 @code{dejagnu}-based test suite is assumed.  The value of the variable
@@ -1116,6 +1121,13 @@ installed by default.  However, an @code{install-man} target will still
 be available for optional installation.
 @trindex install-man
 
+@item @code{no-installinfo}
+The generated @file{Makefile.in} will not cause info pages to be built
+or installed by default.  However, @code{info} and @code{install-info}
+targets will still be available.
+@trindex info
+@trindex install-info
+
 @item @code{ansi2knr}
 Turn on automatic de-ANSI-fication.
 
index ec71200d69501aea8a0d9d78a17fc41cdd9925eb..c1c0814819839f3074c97099c51aa7c7eba3fb3a 100644 (file)
        $(ANSI2KNR) $< > $*.tmp && mv $*.tmp $@
 
 ._c._o:
-       @echo $(COMPILE) $<
+       @echo $(COMPILE) -c $<
        @rm -f _$*.c
-       @ln $< _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
+       @ln $< _$*.c && $(COMPILE) -c _$*.c && mv _$*.o $@ && rm _$*.c
 
 .c._o:
        $(ANSI2KNR) $< > $*.tmp && mv $*.tmp $*._c
-       @echo $(COMPILE) $*._c
+       @echo $(COMPILE) -c $*._c
        @rm -f _$*.c
-       @ln $*._c _$*.c && $(COMPILE) _$*.c && mv _$*.o $@ && rm _$*.c
+       @ln $*._c _$*.c && $(COMPILE) -c _$*.c && mv _$*.o $@ && rm _$*.c
 
 ansi2knr: ansi2knr.o
        $(LINK) ansi2knr.o $(LIBS)
index b46e510d8e873a741b88be370b90e994af2b614a..2815629ffba428b060851c58123f9efd01fae906 100644 (file)
@@ -19,12 +19,11 @@ CC = @CC@
 LEX = @LEX@
 YACC = @YACC@
 
-## FIXME?
 DEFS = @DEFS@ -I. -I$(srcdir) @CONFIG_INCLUDE_SPEC@
 CPPFLAGS = @CPPFLAGS@
 CFLAGS = @CFLAGS@
 LDFLAGS = @LDFLAGS@
 LIBS = @LIBS@
 
-COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
 LINK = $(CC) $(LDFLAGS) -o $@
index 6ae415c1958e2cc0746dcc159fdc013798474e8b..a8ac4a0a9868cf2958b9bbfcdd60230a9d97035b 100644 (file)
@@ -16,7 +16,7 @@
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 .c.o:
-       $(COMPILE) $<
+       $(COMPILE) -c $<
 
 mostlyclean-compile:
 ## Don't remove 'core.*' because some distributions have eg "core.c".
index 6ae415c1958e2cc0746dcc159fdc013798474e8b..a8ac4a0a9868cf2958b9bbfcdd60230a9d97035b 100644 (file)
@@ -16,7 +16,7 @@
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 .c.o:
-       $(COMPILE) $<
+       $(COMPILE) -c $<
 
 mostlyclean-compile:
 ## Don't remove 'core.*' because some distributions have eg "core.c".
index 7b22be90b5a70351a5496c52d6961f67cc445df9..bcf2791c817c62a6559d40e22271211cd9698468 100644 (file)
 ## break a possible install-sh reference.
 install-info: $(INFO_DEPS)
        $(mkinstalldirs) $(infodir)
-       for file in $(INFO_DEPS); do            \
+       for file in $(INFO_DEPS); do \
 ## We use these strange circumlocutions because we want the "ifile" to
 ## be relative, for the install.
-         for ifile in `cd $(srcdir) && echo $$file*`; do \
-           $(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile; \
-         done;                                 \
+         for ifile in `cd $(srcdir) && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
+           test -f $(srcdir)/$$ifile \
+             && $(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile; \
+         done; \
 ## We need the 'else' because in some broken versions of sh 'if' will
 ## return false if the test fails.  We use ':' because the GNU
 ## standards prohibit us from using 'true'.
index 46cd74129ed4fb1b73e5ac5e576592621d4b1945..b1874763b22b9dca8706e732ec17ad7c7ac91b0b 100644 (file)
--- a/remake.am
+++ b/remake.am
@@ -16,7 +16,7 @@
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
 $(srcdir)/Makefile.in: @MAINT@Makefile.am configure.in
-       cd $(srcdir) && automake Makefile
+       cd $(srcdir) && automake --strictness=@STRICTNESS@ Makefile
 
 # For an explanation of the following Makefile rules, see node
 # `Automatic Remaking' in GNU Autoconf documentation.
index 912a411f2517ce66a3fb84d79e9d6a85179bc1e2..1c061dd8cf3a2c5d152663c56efadd2b2bb19a51 100644 (file)
@@ -1,3 +1,15 @@
+Sun Jun  9 23:20:03 1996  Tom Tromey  <tromey@creche.cygnus.com>
+
+       * texinfo2.test: New file.
+
+Sat Jun  8 10:00:42 1996  Tom Tromey  <tromey@creche.cygnus.com>
+
+       * mkinstall2.test: New file.
+
+Fri Jun  7 18:17:11 1996  Tom Tromey  <tromey@creche.cygnus.com>
+
+       * yacc.test: New file.
+
 Sun Jun  2 09:04:52 1996  Tom Tromey  <tromey@creche.cygnus.com>
 
        * dejagnu.test: New file.
index 549d4b5bdd74c17697404cc0bd6455b332b4ad15..428215eec31d01c35b976775bab437a49b9cc5e5 100644 (file)
@@ -8,6 +8,7 @@ confincl.test spelling.test prefix.test badprog.test depend.test exdir.test \
 canon.test installsh.test empty.test rulepat.test insh.test canon2.test \
 target.test extra.test noinst.test instman.test mkinstall.test auxdir.test \
 canon3.test mdate2.test subdir.test backsl.test package.test number.test \
-insh2.test outdir.test fpinstall.test fpinst2.test texinfo.test dejagnu.test
+insh2.test outdir.test fpinstall.test fpinst2.test texinfo.test dejagnu.test \
+yacc.test mkinstall2.test texinfo2.test
 
 EXTRA_DIST = defs $(TESTS)
index 5afe4ff813f6f942af8abb159348d923edf1eab5..289ec7625398e003e214caf252bdb80506a9131e 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.0 from Makefile.am
+# Makefile.in generated automatically by automake 1.1a from Makefile.am
 
 # Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
@@ -46,7 +46,8 @@ confincl.test spelling.test prefix.test badprog.test depend.test exdir.test \
 canon.test installsh.test empty.test rulepat.test insh.test canon2.test \
 target.test extra.test noinst.test instman.test mkinstall.test auxdir.test \
 canon3.test mdate2.test subdir.test backsl.test package.test number.test \
-insh2.test outdir.test fpinstall.test fpinst2.test texinfo.test dejagnu.test
+insh2.test outdir.test fpinstall.test fpinst2.test texinfo.test dejagnu.test \
+yacc.test mkinstall2.test texinfo2.test
 
 EXTRA_DIST = defs $(TESTS)
 mkinstalldirs = $(top_srcdir)/mkinstalldirs
diff --git a/tests/mkinstall2.test b/tests/mkinstall2.test
new file mode 100755 (executable)
index 0000000..4d64b2e
--- /dev/null
@@ -0,0 +1,22 @@
+#! /bin/sh
+
+# Test to make sure no-installman suppresses man dir creation.
+
+. $srcdir/defs || exit 1
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = no-installman
+man_MANS = foo.1
+END
+
+: > foo.1
+
+cat > mkinstalldirs << 'END'
+echo "$@"
+END
+
+chmod +x mkinstalldirs
+
+$AUTOMAKE || exit 1
+
+make -s -f Makefile.in installdirs | grep -v man
diff --git a/tests/texinfo2.test b/tests/texinfo2.test
new file mode 100755 (executable)
index 0000000..d5ad987
--- /dev/null
@@ -0,0 +1,20 @@
+#! /bin/sh
+
+# Test to ensure that a ".info~" file doesn't end up in the
+# distribution.  Bug report from Greg McGary.
+
+. $srcdir/defs || exit 1
+
+cat > Makefile.am << 'END'
+info_TEXINFOS = textutils.texi
+magic:
+       @echo $(DISTFILES)
+END
+
+: > texinfo.tex
+: > textutils.texi
+: > textutils.info~
+
+$AUTOMAKE || exit 1
+
+test -z `make -s -f Makefile.in magic | grep '~'`
diff --git a/tests/yacc.test b/tests/yacc.test
new file mode 100755 (executable)
index 0000000..40d0888
--- /dev/null
@@ -0,0 +1,15 @@
+#! /bin/sh
+
+# Test to make sure intermediate .c file is built from yacc source.
+# Bug from Thomas Morgan.
+
+. $srcdir/defs || exit 1
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = zardoz
+zardoz_SOURCES = zardoz.y
+END
+
+$AUTOMAKE || exit 1
+
+grep '^zardoz.c:' Makefile.in
index 7b22be90b5a70351a5496c52d6961f67cc445df9..bcf2791c817c62a6559d40e22271211cd9698468 100644 (file)
 ## break a possible install-sh reference.
 install-info: $(INFO_DEPS)
        $(mkinstalldirs) $(infodir)
-       for file in $(INFO_DEPS); do            \
+       for file in $(INFO_DEPS); do \
 ## We use these strange circumlocutions because we want the "ifile" to
 ## be relative, for the install.
-         for ifile in `cd $(srcdir) && echo $$file*`; do \
-           $(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile; \
-         done;                                 \
+         for ifile in `cd $(srcdir) && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
+           test -f $(srcdir)/$$ifile \
+             && $(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile; \
+         done; \
 ## We need the 'else' because in some broken versions of sh 'if' will
 ## return false if the test fails.  We use ':' because the GNU
 ## standards prohibit us from using 'true'.
index 87c7f95e0e84285564a6b6183d6f8867649cfe19..98dd01c7aa5cc92912581f9f5e464a2ce60b0b76 100644 (file)
@@ -1,3 +1,3 @@
-@set UPDATED 25 May 1996
+@set UPDATED 8 June 1996
 @set EDITION 1.1a
 @set VERSION 1.1a
This page took 0.052662 seconds and 5 git commands to generate.