minor bug fixes. added postscript generation
authorTom Tromey <tromey@redhat.com>
Fri, 6 Dec 1996 05:16:14 +0000 (05:16 +0000)
committerTom Tromey <tromey@redhat.com>
Fri, 6 Dec 1996 05:16:14 +0000 (05:16 +0000)
ChangeLog
Makefile.in
automake.in
lib/am/texinfos.am
m4/Makefile.in
tests/ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/remake.test [new file with mode: 0755]
texinfos.am

index 5d4f465..f6cc871 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 Thu Dec  5 02:52:20 1996  Tom Tromey  <tromey@cygnus.com>
 
+       Suggestion from Mark Galassi:
+       * texinfos.am (DVIPS): New macro.
+       (.dvi.ps): New rule.
+
+       * automake.in (handle_dependencies): Check to make sure
+       --build-directory specified before searching for .P files.
+       (handle_configure): Correctly handle ":" syntax when running
+       config.status.
+
        * remake.am: Removed rules to regenerate Makefile and Makefile.in;
        now handled by handle_configure.
 
index 77ba8de..ba7eb24 100644 (file)
@@ -95,7 +95,7 @@ default: all
 
 .SUFFIXES:
 .SUFFIXES: .texi .texinfo .info .dvi
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in 
        cd $(top_srcdir) && automake --gnits Makefile
 
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
@@ -173,6 +173,8 @@ automake.info: automake.texi version.texi
 automake.dvi: automake.texi version.texi
 
 
+DVIPS = dvips
+
 .texi.info:
        cd $(srcdir) \
          && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
@@ -187,6 +189,8 @@ automake.dvi: automake.texi version.texi
 
 .texinfo.dvi:
        TEXINPUTS=$(srcdir):$$TEXINPUTS $(TEXI2DVI) $<
+.dvi.ps:
+       $(DVIPS) $< -o $@
 
 install-info-am: $(INFO_DEPS)
        $(NORMAL_INSTALL)
index 7b73079..11d8b73 100755 (executable)
@@ -1168,7 +1168,7 @@ sub handle_lib_objects
        elsif ($lsearch eq '@LEXLIB@')
        {
            # FIXME: variable_value_as_list requires us to force
-           # @LEXLIB@ here, where we're really prefer $(LEXLIB).
+           # @LEXLIB@ here, where we'd really prefer $(LEXLIB).
            # Nasty -- this will have to wait until many cleanups are
            # made, I think.
            $lex_ok = 1;
@@ -2199,11 +2199,8 @@ sub handle_dependencies
            }
        }
     }
-    else
+    elsif ($build_directory ne '')
     {
-       # FIXME: consider requiring --build-dir here.  What about case
-       # where this is done via an option?
-
        # Include any auto-generated deps that are present.  Note that
        # $build_directory ends in a "/".
        if (-d ($build_directory . $relative_dir . "/.deps")
@@ -2353,6 +2350,10 @@ sub handle_configure
 
     # Handle $local:$input syntax again.
     local ($amfile, $infile, $colon_infile);
+
+    $input = &basename ($input);
+    $local = &basename ($local);
+
     $amfile = $input . '.am';
     # We know we can always add '.in' because it really should be an
     # error if the .in was missing originally.
@@ -2380,7 +2381,6 @@ sub handle_configure
                      . "\n"
                      . "\tcd \$(top_builddir) \\\n"
                      . "\t  && CONFIG_FILES="
-                     # FIXME: is this right?
                      . (($relative_dir eq '.') ? '$@' : '$(subdir)/$@')
                      . $colon_infile
                      . ' CONFIG_HEADERS= $(SHELL) ./config.status'
@@ -2500,15 +2500,16 @@ sub handle_configure
 
        @inputs = &rewrite_inputs_into_dependencies (@inputs);
 
-       # FIXME: when using autoconf ":" syntax, should we set CONFIG_FILES
-       # to $local:$input?
        $output_rules .= ($local . ': '
                          . '$(top_builddir)/config.status '
                          . join (' ', @inputs) . "\n"
                          . "\t"
                          . 'cd $(top_builddir) && CONFIG_FILES='
                          . ($relative_dir eq '.' ? '' : '$(subdir)/')
-                         . '$@ CONFIG_HEADERS= ./config.status'
+                         . '$@' . (length (@inputs) > 1
+                                   ? (':' . join (':', @inputs))
+                                   : '')
+                         . ' CONFIG_HEADERS= ./config.status'
                          . "\n");
        push (@actual_other_files, $local);
 
@@ -3074,10 +3075,7 @@ sub handle_tests
     {
        push (@check_tests, 'check-TESTS');
        push (@phony, 'check-TESTS');
-       # FIXME: use $(SHELL) here?  That is what Ulrich suggests.
-       # Maybe a new macro, $(TEST_SHELL), a la $(CONFIG_SHELL)?  For
-       # now we just execute the file directly; this allows test
-       # files which are compiled -- a possibly useful feature.
+
        $output_rules .= 'check-TESTS: $(TESTS)
        @failed=0; all=0; \\
        srcdir=$(srcdir); export srcdir; \\
index 60ca823..cc21db2 100644 (file)
@@ -42,6 +42,11 @@ CYGNUS       $(MAKEINFO) $<
 .texinfo.dvi:
        TEXINPUTS=$(srcdir):$$TEXINPUTS $(TEXI2DVI) $<
 
+## The way to make PostScript, for those who want it.
+DVIPS = dvips
+.dvi.ps:
+       $(DVIPS) $< -o $@
+
 ## Look in both . and srcdir because the info pages might have been
 ## rebuilt in the build directory.  Can't cd to srcdir; that might
 ## break a possible install-sh reference.
index 369153d..8ee40f9 100644 (file)
@@ -65,10 +65,10 @@ TAR = tar
 default: all
 
 .SUFFIXES:
-$(srcdir)/m4/Makefile.in: m4/Makefile.am $(top_srcdir)/configure.in
-       cd $(top_srcdir) && automake --gnits m4/Makefile
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in 
+       cd $(top_srcdir) && automake --gnits Makefile
 
-m4/Makefile: $(srcdir)/m4/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
        cd $(top_builddir) \
          && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
 
index 32ce217..97b716b 100644 (file)
@@ -1,5 +1,6 @@
 Thu Dec  5 18:23:17 1996  Tom Tromey  <tromey@cygnus.com>
 
+       * remake.test: New file.
        * colon3.test: New file.
        * colon2.test: New file.
        * cxxo.test: New file.
index 08a8f95..372d6f4 100644 (file)
@@ -19,7 +19,7 @@ confsub.test primary.test primary2.test depend2.test spell3.test \
 comment2.test vpath.test symlink.test discover.test acinclude.test req.test \
 acsilent.test distdir.test lex2.test libobj4.test libobj5.test version.test \
 ranlib.test confvar.test confvar2.test stdlib.test cxxo.test colon2.test \
-colon3.test
+colon3.test remake.test
 
 EXTRA_DIST = defs $(TESTS)
 
index d049757..06071e5 100644 (file)
@@ -57,7 +57,8 @@ gnits.test interp2.test colneq.test implicit.test spell.test spell2.test \
 confsub.test primary.test primary2.test depend2.test spell3.test \
 comment2.test vpath.test symlink.test discover.test acinclude.test req.test \
 acsilent.test distdir.test lex2.test libobj4.test libobj5.test version.test \
-ranlib.test confvar.test confvar2.test stdlib.test cxxo.test colon2.test
+ranlib.test confvar.test confvar2.test stdlib.test cxxo.test colon2.test \
+colon3.test remake.test
 
 EXTRA_DIST = defs $(TESTS)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -75,10 +76,10 @@ TAR = tar
 default: all
 
 .SUFFIXES:
-$(srcdir)/tests/Makefile.in: tests/Makefile.am $(top_srcdir)/configure.in
-       cd $(top_srcdir) && automake --gnits tests/Makefile
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in 
+       cd $(top_srcdir) && automake --gnits Makefile
 
-tests/Makefile: $(srcdir)/tests/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
        cd $(top_builddir) \
          && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
 
diff --git a/tests/remake.test b/tests/remake.test
new file mode 100755 (executable)
index 0000000..cf28765
--- /dev/null
@@ -0,0 +1,20 @@
+#! /bin/sh
+
+# Make sure remaking rules in subdir are correctly generated.
+
+. $srcdir/defs || exit 1
+
+cat > configure.in << 'END'
+PACKAGE=nonesuch
+VERSION=nonesuch
+AC_ARG_PROGRAM
+AC_PROG_INSTALL
+AC_OUTPUT(sub/Makefile)
+END
+
+mkdir sub
+: > sub/Makefile.am
+
+$AUTOMAKE || exit 1
+
+grep '^Makefile' sub/Makefile.in
index 60ca823..cc21db2 100644 (file)
@@ -42,6 +42,11 @@ CYGNUS       $(MAKEINFO) $<
 .texinfo.dvi:
        TEXINPUTS=$(srcdir):$$TEXINPUTS $(TEXI2DVI) $<
 
+## The way to make PostScript, for those who want it.
+DVIPS = dvips
+.dvi.ps:
+       $(DVIPS) $< -o $@
+
 ## Look in both . and srcdir because the info pages might have been
 ## rebuilt in the build directory.  Can't cd to srcdir; that might
 ## break a possible install-sh reference.