]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
test fixups
authorTom Tromey <tromey@redhat.com>
Sun, 16 Mar 1997 22:29:11 +0000 (22:29 +0000)
committerTom Tromey <tromey@redhat.com>
Sun, 16 Mar 1997 22:29:11 +0000 (22:29 +0000)
better error message w/ seen_c_source

16 files changed:
ChangeLog
Makefile.in
automake.in
tests/ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/canon.test
tests/checkall.test
tests/discover.test
tests/lex2.test
tests/libobj3.test
tests/noinst.test
tests/primary2.test
tests/seenc.test [new file with mode: 0755]
tests/spell2.test
tests/target.test

index f55aca70765e1e1c499bfdba49d311fbac22748e..96821c6be8f457ff7a1dd58b1fa3b89066484313 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+Sun Mar 16 14:33:41 1997  Tom Tromey  <tromey@cygnus.com>
+
+       * automake.in (handle_lib_objects): Set seen_c_source to line
+       number.
+       (handle_yacc_lex_cxx): Use seen_c_source as line number.
+       (am_line_error): Line of -1 means skip line-number check.
+
+       * automake.in (read_am_file): Change to keep perl -w quiet.
+       (check_typos): Removed extra check of EXTRA_ containing config
+       subs.
+
 Mon Mar 10 23:17:19 1997  Tom Tromey  <tromey@cygnus.com>
 
        * remake-hdr.am (stamp-h): Set CONFIG_HEADERS to
index 1beca88f022afc9d8015f9266bab29fbfd6f833c..57d5b7f997e563262f3361241b86451208c4f809 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.1g from Makefile.am
+# Makefile.in generated automatically by automake 1.1m from Makefile.am
 
 # Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
@@ -37,8 +37,11 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 transform = @program_transform_name@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+PACKAGE = @PACKAGE@
 PERL = @PERL@
 TAR = @TAR@
+VERSION = @VERSION@
 
 AUTOMAKE_OPTIONS = gnits
 MAINT_CHARSET = latin1
@@ -79,29 +82,29 @@ TEXINFOS = automake.texi
 DATA =  $(pkgdata_DATA)
 
 DIST_COMMON =  README AUTHORS COPYING ChangeLog INSTALL Makefile.am \
-Makefile.in NEWS README README-alpha THANKS TODO aclocal.in aclocal.m4 \
+Makefile.in NEWS README-alpha THANKS TODO aclocal.in aclocal.m4 \
 ansi2knr.1 ansi2knr.c automake.in config.guess config.sub configure \
 configure.in elisp-comp install-sh interlock mdate-sh mkinstalldirs \
 stamp-vti texinfo.tex version.texi ylwrap
 
 
-PACKAGE = @PACKAGE@
-VERSION = @VERSION@
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
 
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) \
-       $(TEXINFOS) $(MANS) $(EXTRA_DIST)
+GZIP = --best
 default: all
 
-aclocal.m4: configure.in
-       cd $(srcdir) && aclocal
+.SUFFIXES:
+.SUFFIXES: .texi .texinfo .info .dvi .ps
+$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL) 
+       cd $(top_srcdir) && automake --gnits Makefile
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
+       cd $(top_builddir) \
+         && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
 
-$(srcdir)/Makefile.in: Makefile.am configure.in
-       cd $(srcdir) && automake --strictness=gnits Makefile
+$(srcdir)/aclocal.m4:  configure.in 
+       cd $(srcdir) && aclocal
 
-# For an explanation of the following Makefile rules, see node
-# `Automatic Remaking' in GNU Autoconf documentation.
-Makefile: $(srcdir)/Makefile.in config.status $(BUILT_SOURCES)
-       CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
 config.status: configure
        $(SHELL) ./config.status --recheck
 $(srcdir)/configure: configure.in $(ACLOCAL) $(CONFIGURE_DEPENDENCIES)
@@ -114,12 +117,13 @@ aclocal: $(top_builddir)/config.status aclocal.in
 install-binSCRIPTS: $(bin_SCRIPTS)
        $(NORMAL_INSTALL)
        $(mkinstalldirs) $(bindir)
-       list="$(bin_SCRIPTS)"; for p in $$list; do \
+       @list="$(bin_SCRIPTS)"; for p in $$list; do \
          if test -f $$p; then \
+           echo " $(INSTALL_SCRIPT) $$p $(bindir)/`echo $$p|sed '$(transform)'`"; \
            $(INSTALL_SCRIPT) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \
          else if test -f $(srcdir)/$$p; then \
-           $(INSTALL_SCRIPT) $(srcdir)/$$p \
-             $(bindir)/`echo $$p|sed '$(transform)'`; \
+           echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(bindir)/`echo $$p|sed '$(transform)'`"; \
+           $(INSTALL_SCRIPT) $(srcdir)/$$p $(bindir)/`echo $$p|sed '$(transform)'`; \
          else :; fi; fi; \
        done
 
@@ -131,12 +135,13 @@ uninstall-binSCRIPTS:
 install-pkgdataSCRIPTS: $(pkgdata_SCRIPTS)
        $(NORMAL_INSTALL)
        $(mkinstalldirs) $(pkgdatadir)
-       list="$(pkgdata_SCRIPTS)"; for p in $$list; do \
+       @list="$(pkgdata_SCRIPTS)"; for p in $$list; do \
          if test -f $$p; then \
+           echo " $(INSTALL_SCRIPT) $$p $(pkgdatadir)/`echo $$p|sed '$(transform)'`"; \
            $(INSTALL_SCRIPT) $$p $(pkgdatadir)/`echo $$p|sed '$(transform)'`; \
          else if test -f $(srcdir)/$$p; then \
-           $(INSTALL_SCRIPT) $(srcdir)/$$p \
-             $(pkgdatadir)/`echo $$p|sed '$(transform)'`; \
+           echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(pkgdatadir)/`echo $$p|sed '$(transform)'`"; \
+           $(INSTALL_SCRIPT) $(srcdir)/$$p $(pkgdatadir)/`echo $$p|sed '$(transform)'`; \
          else :; fi; fi; \
        done
 
@@ -146,15 +151,16 @@ uninstall-pkgdataSCRIPTS:
        done
 
 version.texi: stamp-vti
+       cp $(srcdir)/stamp-vti $(srcdir)/version.texi
 
 stamp-vti: automake.texi $(top_srcdir)/configure.in
        echo "@set UPDATED `cd $(srcdir) \
          && $(SHELL) ./mdate-sh automake.texi`" > vti.tmp
        echo "@set EDITION $(VERSION)" >> vti.tmp
        echo "@set VERSION $(VERSION)" >> vti.tmp
-       cmp -s vti.tmp $(srcdir)/version.texi || cp vti.tmp $(srcdir)/version.texi
-       rm vti.tmp
-       echo timestamp > $(srcdir)/stamp-vti
+       cmp -s vti.tmp $(srcdir)/stamp-vti \
+         || cp vti.tmp $(srcdir)/stamp-vti
+       rm -f vti.tmp
 
 mostlyclean-vti:
        rm -f vti.tmp
@@ -170,6 +176,8 @@ automake.info: automake.texi version.texi
 automake.dvi: automake.texi version.texi
 
 
+DVIPS = dvips
+
 .texi.info:
        cd $(srcdir) \
          && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
@@ -178,27 +186,39 @@ automake.dvi: automake.texi version.texi
        TEXINPUTS=$(srcdir):$$TEXINPUTS \
          MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
 
+.texi:
+       cd $(srcdir) \
+         && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
+
 .texinfo.info:
        cd $(srcdir) \
          && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
 
+.texinfo:
+       cd $(srcdir) \
+         && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
+
 .texinfo.dvi:
        TEXINPUTS=$(srcdir):$$TEXINPUTS $(TEXI2DVI) $<
+.dvi.ps:
+       $(DVIPS) $< -o $@
 
 install-info-am: $(INFO_DEPS)
        $(NORMAL_INSTALL)
        $(mkinstalldirs) $(infodir)
-       for file in $(INFO_DEPS); do \
+       @for file in $(INFO_DEPS); do \
          for ifile in `cd $(srcdir) && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \
            if test -f $(srcdir)/$$ifile; then \
+             echo " $(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile"; \
              $(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile; \
            else : ; fi; \
          done; \
        done
        $(POST_INSTALL)
-       if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
+       @if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
          for file in $(INFO_DEPS); do \
-           install-info --info-dir=$(infodir) $$file; :;\
+           echo " install-info --info-dir=$(infodir) $(infodir)/$$file";\
+           install-info --info-dir=$(infodir) $(infodir)/$$file; :;\
          done; \
        else : ; fi
 
@@ -224,22 +244,25 @@ dist-info: $(INFO_DEPS)
 mostlyclean-info:
        rm -f automake.aux automake.cp automake.cps automake.dvi automake.fn \
          automake.fns automake.ky automake.log automake.pg \
-         automake.toc automake.tp automake.vr automake.op
+         automake.toc automake.tp automake.tps automake.vr \
+         automake.vrs automake.op automake.tr automake.cv
 
 clean-info:
 
 distclean-info:
 
 maintainer-clean-info:
-       for i in $(INFO_DEPS); do rm `eval echo $i*`; done
+       for i in $(INFO_DEPS); do rm -f `eval echo $$i*`; done
 
 install-pkgdataDATA: $(pkgdata_DATA)
        $(NORMAL_INSTALL)
        $(mkinstalldirs) $(pkgdatadir)
-       list="$(pkgdata_DATA)"; for p in $$list; do \
+       @list="$(pkgdata_DATA)"; for p in $$list; do \
          if test -f $(srcdir)/$$p; then \
+           echo " $(INSTALL_DATA) $(srcdir)/$$p $(pkgdatadir)/$$p"; \
            $(INSTALL_DATA) $(srcdir)/$$p $(pkgdatadir)/$$p; \
          else if test -f $$p; then \
+           echo " $(INSTALL_DATA) $$p $(pkgdatadir)/$$p"; \
            $(INSTALL_DATA) $$p $(pkgdatadir)/$$p; \
          fi; fi; \
        done
@@ -263,28 +286,30 @@ installdirs-recursive install-recursive uninstall-recursive  \
 check-recursive installcheck-recursive info-recursive dvi-recursive \
 mostlyclean-recursive clean-recursive distclean-recursive \
 maintainer-clean-recursive:
-       for subdir in $(SUBDIRS); do            \
+       @for subdir in $(SUBDIRS); do \
          target=`echo $@ | sed s/-recursive//`; \
-         (cd $$subdir && $(MAKE) $$target)     \
+         echo "Making $$target in $$subdir"; \
+         (cd $$subdir && $(MAKE) $$target) \
           || case "$(MFLAGS)" in *k*) fail=yes;; *) exit 1;; esac; \
        done && test -z "$$fail"
-
-tags: TAGS
-
 tags-recursive:
        list="$(SUBDIRS)"; for subdir in $$list; do \
          (cd $$subdir && $(MAKE) tags); \
        done
 
-TAGS: tags-recursive $(HEADERS) $(SOURCES) $(CONFIG_HEADER) \
-               $(TAGS_DEPENDENCIES)
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES)
+       here=`pwd` && cd $(srcdir) && mkid -f$$here/ID $(SOURCES) $(HEADERS)
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES)
        tags=; \
        here=`pwd`; \
-       for subdir in $(SUBDIRS); do \
+       list="$(SUBDIRS)"; for subdir in $$list; do \
          test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
        done; \
-       test -z "$(ETAGS_ARGS)$(CONFIG_HEADER)$(SOURCES)$(HEADERS)$$tags" \
-         || etags $(ETAGS_ARGS) $$tags $(CONFIG_HEADER) $(SOURCES) $(HEADERS)
+       test -z "$(ETAGS_ARGS)$(SOURCES)$(HEADERS)$$tags" \
+         || cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $(SOURCES) $(HEADERS) -o $$here/TAGS
 
 mostlyclean-tags:
 
@@ -301,7 +326,7 @@ distdir = $(PACKAGE)-$(VERSION)
 # tarfile.
 distcheck: dist
        rm -rf $(distdir)
-       $(TAR) zxf $(distdir).tar.gz
+       GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
        mkdir $(distdir)/=build
        mkdir $(distdir)/=inst
        dc_install_base=`cd $(distdir)/=inst && pwd`; \
@@ -319,11 +344,11 @@ distcheck: dist
        echo "========================"
 dist: distdir
        -chmod -R a+r $(distdir)
-       $(TAR) chozf $(distdir).tar.gz $(distdir)
+       GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
        rm -rf $(distdir)
 dist-all: distdir
        -chmod -R a+r $(distdir)
-       $(TAR) chozf $(distdir).tar.gz $(distdir)
+       GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
        rm -rf $(distdir)
 distdir: $(DISTFILES)
        @if sed 15q $(srcdir)/NEWS | fgrep -e "$(VERSION)" > /dev/null; then :; else \
@@ -335,7 +360,7 @@ distdir: $(DISTFILES)
        -chmod 755 $(distdir)
        here=`pwd`; distdir=`cd $(distdir) && pwd` \
          && cd $(srcdir) \
-         && automake --include-deps --build-dir=$$here --srcdir-name=$(srcdir) --output-dir=$$distdir --strictness=gnits
+         && automake --include-deps --build-dir=$$here --srcdir-name=$(srcdir) --output-dir=$$distdir --gnits
        @for file in $(DISTFILES); do \
          d=$(srcdir); \
          test -f $(distdir)/$$file \
@@ -400,23 +425,23 @@ maintainer-clean-generic:
 mostlyclean-am:  mostlyclean-vti mostlyclean-info mostlyclean-tags \
                mostlyclean-generic
 
-clean-am:  clean-vti clean-info clean-tags clean-generic mostlyclean-am 
+clean-am:  clean-vti clean-info clean-tags clean-generic mostlyclean-am
 
 distclean-am:  distclean-vti distclean-info distclean-tags \
-               distclean-generic clean-am 
+               distclean-generic clean-am
 
 maintainer-clean-am:  maintainer-clean-vti maintainer-clean-info \
                maintainer-clean-tags maintainer-clean-generic \
-               distclean-am 
+               distclean-am
 
-mostlyclean:  mostlyclean-am mostlyclean-recursive
+mostlyclean:  mostlyclean-recursive mostlyclean-am
 
-clean:  clean-am clean-recursive
+clean:  clean-recursive clean-am
 
-distclean:  distclean-am distclean-recursive
+distclean:  distclean-recursive distclean-am
        rm -f config.status
 
-maintainer-clean:  maintainer-clean-am maintainer-clean-recursive
+maintainer-clean:  maintainer-clean-recursive maintainer-clean-am
        @echo "This command is intended for maintainers to use;"
        @echo "it deletes files that may require special tools to rebuild."
        rm -f config.status
@@ -431,7 +456,7 @@ uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
 all-recursive check-recursive installcheck-recursive info-recursive \
 dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
 maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir info dvi check \
+distclean-tags clean-tags maintainer-clean-tags distdir info dvi \
 installcheck-local installcheck all-am install-exec-am install-data-am \
 uninstall-am install-exec install-data install uninstall all \
 installdirs mostlyclean-generic distclean-generic clean-generic \
@@ -503,8 +528,6 @@ path-check: distdir
          status=$$?; \
          rm -rf $(distdir); \
          exit $$status
-.SUFFIXES:
-.SUFFIXES: .texi .texinfo .info .dvi
 
 # 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.
index 8403d13d749359d4466c9c1782626d6759e8f593..39d3f165d2010031d025658943ac9d0659900770 100755 (executable)
@@ -860,8 +860,8 @@ sub handle_yacc_lex_cxx
 
        if (! defined $configure_vars{'CC'})
        {
-           &am_error
-               ("C source seen but \`CC' not defined in \`configure.in'");
+           &am_line_error ($seen_c_source,
+                           "C source seen but \`CC' not defined in \`configure.in'");
        }
     }
 }
@@ -1042,7 +1042,7 @@ sub handle_single_transform_list
                # required.
                $de_ansi_objects{$_} = 1;
                s/\._o$/$obj/;
-               $seen_c_source = 1;
+               $seen_c_source = -1 unless $seen_c_source;
            }
            else
            {
@@ -1222,7 +1222,7 @@ sub handle_lib_objects
            {
                if ($iter =~ /\.[cly]$/)
                {
-                   $seen_c_source = 1;
+                   $seen_c_source = $var;
                }
 
                if ($iter =~ /\.h$/)
@@ -1245,7 +1245,7 @@ sub handle_lib_objects
                if ! defined $libsources{'alloca.c'};
            $dep_files{'.deps/alloca.P'} = 1;
            &require_file_with_line ($var, $FOREIGN, 'alloca.c');
-           $seen_c_source = 1;
+           $seen_c_source = $var;
        }
        elsif ($lsearch eq '@LEXLIB@')
        {
@@ -1497,7 +1497,7 @@ sub handle_libraries
 # EXTRA_ variables don't contain configure substitutions.
 sub check_typos
 {
-    local ($varname, $primary, $ckey);
+    local ($varname, $primary);
     foreach $varname (keys %contents)
     {
        foreach $primary ('_SOURCES', '_LIBADD', '_LDADD', '_LDFLAGS', '_DEPENDENCIES')
@@ -1508,18 +1508,6 @@ sub check_typos
                                "invalid unused variable name: \`$varname'");
            }
        }
-
-       if ($varname =~ /^EXTRA_/)
-       {
-           foreach $ckey (&variable_value_as_list ($varname))
-           {
-               if ($ckey =~ /^\@.*\@$/)
-               {
-                   &am_line_error ($varname, "variable \`$varname' must not contain configure substitution");
-                   last;
-               }
-           }
-       }
     }
 }
 
@@ -4030,7 +4018,7 @@ sub read_am_file
            # Found a macro definition.
            $was_rule = 0;
            $last_var_name = $1;
-           if (substr ($2, -1) eq "\\")
+           if ($2 ne '' && substr ($2, -1) eq "\\")
            {
                $contents{$1} = substr ($2, 0, length ($2) - 1);
            }
@@ -4317,7 +4305,11 @@ sub initialize_per_input
     # C++ source extensions we've seen.
     %cxx_extensions = ();
 
-    # TRUE if we've seen any non-C++ sources.
+    # TRUE if we've seen any non-C++ sources.  This actually holds a
+    # line number or the name of a symbol corresponding to a line
+    # number where the C sources were seen.  If it is -1 then it means
+    # we couldn't (easily) figure out which line of the Makefile.am
+    # mentioned the sources.
     $seen_c_source = 0;
 
     # This is a list of all targets to run during "make dist".
@@ -4989,7 +4981,7 @@ sub am_line_error
 {
     local ($symbol, @args) = @_;
 
-    if ($symbol)
+    if ($symbol && "$symbol" ne '-1')
     {
        # If SYMBOL not already a line number, look it up in Makefile.am.
        if ($symbol =~ /^\d+$/)
index 976e25d80ae7fab9a3bbb3457d5411173f55fae1..7c610a8e2f14c0adf64181b6820085f70b5dd18e 100644 (file)
@@ -1,3 +1,14 @@
+Sun Mar 16 14:29:45 1997  Tom Tromey  <tromey@cygnus.com>
+
+       * seenc.test: New file.
+
+       * checkall.test, noinst.test: Don't use bogus construct when
+       checking.
+
+       * libobj3.test, canon.test, target.test, spell2.test,
+       primary2.test, discover.test, lex2.test: Fixed to test what it
+       claims to test.
+
 Mon Mar 10 23:21:03 1997  Tom Tromey  <tromey@cygnus.com>
 
        * libobj.test, libobj2.test: Use AC_PROG_CC.
index b34b70d6487b4aa72d0ad8414a18ab2e72df1bc6..8ee2da42484683a7a4c1bab8f5596ab81eab5936 100644 (file)
@@ -24,7 +24,7 @@ ranlib.test confvar.test confvar2.test stdlib.test cxxo.test \
 colon2.test colon3.test remake.test output.test output2.test \
 remake2.test output3.test output4.test colneq2.test subst.test \
 defun2.test yaccpp.test texinfo3.test texinfo4.test tagsub.test \
-cxxlibobj.test
+cxxlibobj.test seenc.test
 
 EXTRA_DIST = defs $(TESTS)
 
index 32bba0aa669510d1f85c386d58172c476f1e5ef7..76f906f2246068fa2e681ecd1020b25545dcdf3b 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated automatically by automake 1.1l from Makefile.am
+# Makefile.in generated automatically by automake 1.1m from Makefile.am
 
 # Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc.
 # This Makefile.in is free software; the Free Software Foundation
@@ -67,7 +67,7 @@ ranlib.test confvar.test confvar2.test stdlib.test cxxo.test \
 colon2.test colon3.test remake.test output.test output2.test \
 remake2.test output3.test output4.test colneq2.test subst.test \
 defun2.test yaccpp.test texinfo3.test texinfo4.test tagsub.test \
-cxxlibobj.test
+cxxlibobj.test seenc.test
 
 EXTRA_DIST = defs $(TESTS)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
@@ -75,8 +75,9 @@ CONFIG_CLEAN_FILES =
 DIST_COMMON =  ChangeLog Makefile.am Makefile.in
 
 
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) \
-       $(TEXINFOS) $(MANS) $(EXTRA_DIST)
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+GZIP = --best
 default: all
 
 .SUFFIXES:
@@ -121,6 +122,7 @@ check-TESTS: $(TESTS)
          echo "========================"; \
        else \
          echo "$$failed of $$all tests failed"; \
+         exit 1; \
        fi
 info:
 dvi:
index 9910c430304382a4631e4f351665dea6ddb54bdb..b54caf325ee50f040a64399eaa5d647246476104 100755 (executable)
@@ -4,6 +4,8 @@
 
 . $srcdir/defs || exit 1
 
+echo AC_PROG_CC >> configure.in
+
 cat > Makefile.am << 'END'
 bin_PROGRAMS = sniff-glue
 sniff-glue_SOURCES = sg.c
index bd70958a98d72a9ce177794a1fa631b708127e4c..c329a4b7eeb7eff2e7a601af6a8b7255eba8e71a 100755 (executable)
@@ -4,34 +4,12 @@
 
 . $srcdir/defs || exit 1
 
-# Build source after derived, so derived must be remade.  We build
-# this way up here because without a delay between this and creating
-# 'source', the make will fail.  No, really.
-echo foo > derived
-
-# In fact, sometimes it still fails.  So we delay a little to make
-# sure the timestamps are ok.
-sleep 1
-
 cat > Makefile.am << 'END'
 bin_SCRIPTS = derived
 check-local:
        true
-derived: source
-       cat source > derived
 END
 
 $AUTOMAKE || exit 1
 
-: > source
-
-# This hack fakes out the Makefile dependencies.
-: > configure
-: > config.status
-: > Makefile
-
-# Bogus.
-make -f Makefile.in check
-
-echo "GOT `cat derived`"
-test -z "`cat derived`"
+grep '^check:.* all' Makefile.in
index a91aa950e724942783f2d719aeb3b15d13929821..2daa9e7748be98bdf96e1427021f56fc00792f97 100755 (executable)
@@ -10,14 +10,15 @@ VERSION=nonesuch
 AC_ARG_PROGRAM
 AC_PROG_INSTALL
 AC_PROG_RANLIB
+AC_PROG_CC
 LIBOBJS="$LIBOBJS fsusage.o"
 AC_OUTPUT(Makefile)
 END
 
 cat > Makefile.am << 'END'
-noinst_LIBRARIES = tu
-tu_SOURCES = fsusage.c
-tu_LIBADD = @LIBOBJS@
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES = fsusage.c
+libtu_a_LIBADD = @LIBOBJS@
 END
 
 : > fsusage.c
index fe7a9a94dfaf012be8f3b8aeef1503cdd2fc7fe6..ed8ee81aa5b5aeff00d18d3dab26851b253f99a5 100755 (executable)
@@ -7,6 +7,7 @@
 cat >> configure.in << 'END'
 AC_PROG_LEX
 AC_DECL_YYTEXT
+AC_PROG_CC
 END
 
 cat > Makefile.am << 'END'
index 1220e7712cb7a7fa80e5e15993faa4987ed6c18c..3c7ca654bd92a53c98f6af4cb123db640ceb04ec 100755 (executable)
@@ -4,10 +4,14 @@
 
 . $srcdir/defs || exit 1
 
+cat >> configure.in << 'END'
+AC_PROG_RANLIB
+END
+
 cat > Makefile.am << 'END'
-noinst_LIBRARIES = tu
-tu_SOURCES =
-tu_LIBADD = @LIBOBJS@
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = @LIBOBJS@
 END
 
 $AUTOMAKE && exit 1
index 342e886998d5b62cb6ba4a992c487bb3c12988d5..4ed15f4ee61c232deccf2b052b5b7ebf6508a088 100755 (executable)
@@ -12,7 +12,4 @@ END
 
 $AUTOMAKE || exit 1
 
-# "make install" should fail here if there is a bug.
-make -f Makefile.in install && exit 1
-
-exit 0
+grep '^install:.* all' Makefile.in
index 81c5db7e03998f2c894b98acfdf86b3e813eee86..89f0bc6bf33b9013e75aab3385455ddb2bd5a20d 100755 (executable)
@@ -4,6 +4,8 @@
 
 . $srcdir/defs || exit 1
 
+echo AC_PROG_CC >> configure.in
+
 cat > Makefile.am << 'END'
 bin_PROGRAMS = @programs@
 EXTRA_PROGRAMS = joe @more@
diff --git a/tests/seenc.test b/tests/seenc.test
new file mode 100755 (executable)
index 0000000..f0e683e
--- /dev/null
@@ -0,0 +1,21 @@
+#! /bin/sh
+
+# Test to make sure line numbers work in C-but-no-CC errors.
+
+. $srcdir/defs || exit 1
+
+cat >> configure.in << 'END'
+LIBOBJS="$LIBOBJS fsusage.o mountlist.o"
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo
+foo_SOURCES = x.C
+foo_LDADD = @LIBOBJS@
+END
+
+: > fsusage.c
+: > mountlist.c
+
+$AUTOMAKE > out 2>&1 && exit 1
+grep :3: out
index 7fbade1b49337ebafa14aec445e8ff7a7a1694d0..f5e4e791605b04471e5b201411264cc625633619 100755 (executable)
@@ -4,6 +4,8 @@
 
 . $srcdir/defs || exit 1
 
+echo AC_PROG_CC >> configure.in
+
 cat > Makefile.am << 'END'
 bin_PROGRAMS = zardoz
 zardoz_SOURCES = x.c
index 7536d13fa10e3600bcaa3b29938310e4a06a6bee..532c2e6ab6139c48584cd92de46542cda501f6e1 100755 (executable)
@@ -5,6 +5,8 @@
 
 . $srcdir/defs || exit 1
 
+echo AC_PROG_CC >> configure.in
+
 cat > Makefile.am << 'END'
 bin_PROGRAMS = consud
 ## Note next line is target, not variable.