automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. ng-0.5a


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. ng-0.5a-154-g661c89f
Date: Wed, 04 Apr 2012 09:55:05 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=661c89f60e696fb49b6678541e6816dcb225a378

The branch, ng/master has been updated
       via  661c89f60e696fb49b6678541e6816dcb225a378 (commit)
       via  7a56bed0b38cd90b89339b8bd638bfc7e7f6fe29 (commit)
       via  b96263e1cc2d2977cf685d5596c7bbf57617a0da (commit)
       via  6805810d314e2b4ecb8ff14e04779d8f0ad2b4f8 (commit)
       via  619c1b265564ba2aac50004dec9761df567c69b3 (commit)
       via  8bf5cacff594974000979c5b70e33ebbcfcde29a (commit)
       via  d6f2cc911bad4d1d4457aee63f7c8c6d0b754a36 (commit)
       via  e8d53803885616b705b0b65bdb66da12fa818fd2 (commit)
       via  fe6743feae243a6ba0d05ac92221e3996a8e6aa5 (commit)
       via  6f245d7344f5bcc580ca2c27b7a06f4bd6d7598c (commit)
       via  0d1c9547caf5638178dbd99abd8a613f35dd55c9 (commit)
       via  53161ce02c3e69e2cea4d6b7b477366fc371bf16 (commit)
       via  8cbbdb8790d5eb24bb813edb27ecaf9807676890 (commit)
      from  614c07fa2a4965db7d175e98292db71370b4cd55 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 661c89f60e696fb49b6678541e6816dcb225a378
Merge: 614c07f 7a56bed
Author: Stefano Lattarini <address@hidden>
Date:   Tue Mar 27 22:45:43 2012 +0200

    Merge branch 'master' into ng/master
    
    * master:
      depcomp: support tcc (Tiny C Compiler)
      tests: workaround for automatic linker determination and conditionals
      info: allow user to inhibit pruning of '${infodir}/dir'
      vala tests: fix spurious failures with older valac (<= 0.7.2)
      tests: fix a timestamp issue, and other minor buglets
      tests: fix spurious failure with older autoconf
      fixup: update THANKS
      docs: terminate unfinished sentence, fix reference to a test case
      docs: fix some small typos and grammaros
      build: remove duplicated entries in $(TESTS)
      maint: update TODO file

-----------------------------------------------------------------------

Summary of changes:
 NEWS                        |   11 ++++-
 THANKS                      |    2 +
 TODO                        |   83 +--------------------------------------
 doc/automake.texi           |   29 +++++++-------
 lib/am/texinfos.am          |   27 +++++++------
 lib/depcomp                 |   31 +++++++++-----
 tests/install-info-dir.test |   38 ++++++++++++++++--
 tests/link_cond.test        |   90 +++++++++++++++++++++++++++++++++++++++++++
 tests/list-of-tests.mk      |    1 +
 tests/tap-doc2.test         |    2 +-
 tests/vala-mix.test         |    2 +-
 tests/vala-mix2.test        |    2 +-
 tests/vala-vpath.test       |    2 +-
 13 files changed, 191 insertions(+), 129 deletions(-)
 create mode 100755 tests/link_cond.test

diff --git a/NEWS b/NEWS
index 7f6b923..fd8f38c 100644
--- a/NEWS
+++ b/NEWS
@@ -271,6 +271,11 @@ New in 1.11.3:
 
 * Miscellaneous changes:
 
+  - There is an initial, experimental support for automatic dependency
+    tracking with tcc (the Tiny C Compiler).  Its associated depmode is
+    currently recognized as "icc" (but this and other details are likely
+    to change in future versions).
+
   - Automatic dependency tracking now works also with the IBM XL C/C++
     compilers, thanks to the new new depmode 'xlc'.
 
@@ -370,9 +375,9 @@ New in 1.11.2:
     file generated by automake-provided rules by defining the special make
     variable `$(EXTRA_DEJAGNU_SITE_CONFIG)'.
 
-  - The `install-info' rule can now be instructed not to create/update
-    the `${infodir}/dir' file, by exporting the new environment variable
-    `AM_UPDATE_INFO_DIR' to the value "no".
+  - The `install-info' and `uninstall-info' rules can now be instructed
+    not to create/update the `${infodir}/dir' file, by exporting the new
+    environment variable `AM_UPDATE_INFO_DIR' to the value "no".
 
 Bugs fixed in 1.11.2:
   - For programs and libraries, automake now detects EXTRA_foo_DEPENDENCIES
diff --git a/THANKS b/THANKS
index 158d919..bfa94d2 100644
--- a/THANKS
+++ b/THANKS
@@ -152,6 +152,7 @@ James Youngman              address@hidden
 Jan Engelhardt         address@hidden
 Janos Farkas           address@hidden
 Jared Davis            address@hidden
+Jason DeVinney         address@hidden
 Jason Duell            address@hidden
 Jason Molenda          address@hidden
 Javier Jardón         address@hidden
@@ -366,6 +367,7 @@ Thomas Schwinge             address@hidden
 Thomas Tanner          address@hidden
 Toralf Förster                address@hidden
 Tim Goodwin            address@hidden
+Tim Landscheidt                address@hidden
 Tim Mooney             address@hidden
 Tim Retout             address@hidden
 Tim Rice               address@hidden
diff --git a/TODO b/TODO
index 8ad887f..f8e4754 100644
--- a/TODO
+++ b/TODO
@@ -1,12 +1,3 @@
-We should arrange so that install-%DIR%%PRIMARY% is run conditionally
-when %DIR%_%PRIMARY% is defined conditionally.  Currently it is always
-run, and that will therefore always create %DIR% (unless %DIR%dir is
-also defined conditionally).  Likewise, installdirs should not
-create %DIR% in conditions were no %DIR%_%PRIMARY% is enabled.
-
-check should depend on all
-  from ben elliston
-
 the new YFLAGS code doesn't correctly handle srcdir
 
 allow foo_NAME to rename an object (library or program)
@@ -15,9 +6,6 @@ at build/install time
 remove _LTLIBRARIES and just use _LIBRARIES
 then use this for zip/jar as well
 
-for 1.5
-investigate problems with conditionally defined libraries
-
 add an error if the user makefile.am violates our
    namespace rules
 
@@ -86,16 +74,6 @@ Alex Hornby
     unfortunately it isn't that useful until autoconf has support
     for this sort of thing as well ]
 
-* distcheck should make sure that each file that uses _() is
-  listed in POTFILES.in
-  From Jim Meyering:
-    # Verify that all source files using _() are listed in po/POTFILES.in.
-    po-check:
-           grep -E -v '^(#|$$)' po/POTFILES.in | sort > address@hidden
-           grep -E -l '\b_\(' lib/*.c src/*.c | sort > address@hidden
-           diff -u address@hidden address@hidden
-           rm -f address@hidden address@hidden
-
 * one performance enhancement would be to have autoconf write
   a single file containing all the macro assignments.
   then read this file via `include'
@@ -123,10 +101,6 @@ Alex Hornby
   If you are building a compiled Java library, then the .zip/.jar
   ought to be made automatically.
 
-* Run automake before libtool.  It will report an error but
-  still won't put the file into the disty.  This is wrong.
-  From Mark H Wilkinson <address@hidden>
-
 * examine possibility of using any character in a macro name
   and rewriting names automatically.  this means we must rewrite
   all references as well.
@@ -183,11 +157,6 @@ Alex Hornby
 * For now I guess I'll just have automake give an error if it encounters
 non-C source in a libtool library specification.
 
-* must split $obj into two parts: one for libtool and one for
-  deansification.  Otherwise .S files will be deansified!
-
-* ansi2knr must currently appear in a directory that has some source
-
 * if program has the same name as a target, do something sensible:
   - if the target is internal, rename it
   - if the target is mandated (eg, "info"), tell the user
@@ -197,12 +166,6 @@ non-C source in a libtool library specification.
   strictness should only cover requirements
   You should be able to pick and choose options
 
-* rewrite in guile (RMS request)
-at the same time, consider adding a GUI
-could use the same parsing code for the GUI and the standalone version
-that means figuring out a better representation of internal state
-[ that's easy -- anything is better than what we have now ]
-
 having just one Makefile for a project would give a big speed increase
 for a project with many directories, eg glibc.  ideally (?) you'd
 still be able to have a Makefile.am in each directory somehow; this
@@ -259,14 +222,6 @@ from joerg-martin schwarz:
     in an explicitly written rule,  you should emit the corresponding
     Makefile variables automatically.
 
-Configuring in the large:
-* allow hierarchy of dirs to share one aclocal.m4
-  How?
-
-consider printing full file name of Makefile.am or configure.in when
-giving error.  This would help for very large trees with many
-configure.in scripts
-
 From the GNU Standards.  These things could be checked, and probably
 should be if --gnu.
 *    Make sure that the directory into which the distribution unpacks (as
@@ -276,15 +231,11 @@ characters long.
 *    Don't include any symbolic links in the distribution itself.
      (ditto hard links)
 *    Make sure that all the files in the distribution are world-readable.
-* standards no longer prohibit ANSI C.  What does this imply
-  for the de-ansi-fication feature? [ must keep it -- some users rely on it ]
 
 should be able to determine what is built by looking at rules (and
 configure.in).  Then built man pages (eg) could automatically be
 omitted from the distribution.
 
-Consider: "cvs" option adds some cvs-specific rules?
-
 Right now, targets generated internally (eg "install") are not
 overridable by user code.  This should probably be possible, even
 though it isn't very important.  This could be done by generating all
@@ -309,14 +260,13 @@ Need way to say there are no suffixes in a Makefile 
(Franc,ois'
 Check to make sure various scripts are executable (IE when looking for
 them in a directory)
 
-Handle dist-zoo.  Generally add more DOS support.  Maybe run "doschk"
-(why isn't this merged with "pathchk"?) when doing a dist.  Do
-whatever else François says here...
-
 Add support for html via an option.  Use texi2html.  Use
 "html_TEXINFOS", and htmldir = .../html.  Include html files in
 distribution.  Also allow "html_DATA", for raw .html files.
   [ when will texinfo directly support html? ]
+See also Karl Berry's message on a roadmap for a "info -> html"
+transition:
+<http://lists.gnu.org/archive/html/texinfo-devel/2012-03/msg00018.html>
 
 uninstall and pkg-dirs should rm -rf the dir.
 
@@ -326,15 +276,6 @@ things to be removed.  This would be a lot nicer looking.  
Note that
 the install targets probably should not be merged; it is sometimes
 useful to only install a small part.
 
-* Clean up the output:
-** Order rules sensibly
-** Ensure every line has a purpose.  Omit unused stuff
-** Eliminate extraneous rules when possible (eg 'install-am' stuff)
-** Make sure vertical spacing is correct
-Omit program transform vars from header if no program installed.  This
-is currently pretty hard to do.  (But with beautification code it
-would probably be easy)
-
 * Lex, yacc support:
 ** It would be nice to automatically support using bison's better features
   to rename the output files.  This requires autoconf support
@@ -370,17 +311,6 @@ Some things for --strictness=gnits:
 
 Auto-distribute "ChangeLog.[0-9]+"?  "ChangeLog.[a-z]+"?
 
-Internationalize. [ gettext doesn't have the necessary machinery yet ]
-am_error should use printf-style arguments (for eventual gettext scheme)
-
-François says the ordering of files in a distribution should be as follows:
-* README
-* source files
-* derived files
-I agree, but I don't see how to implement this yet.
-It might be easier if "derived files" is limited to those that
-Automake itself knows about, eg output of yacc.
-
 Check all source files to make sure that FSF address is up-to-date.
 --gnits or --gnu only.
 
@@ -392,9 +322,6 @@ Should libexec programs have the name transform done on 
them?
 Order the output rules sensibly, so FOO_SOURCES and FOO_OBJECTS are
 together and rules are in the usual order.
 
-Make the output minimal: only output definitions for variables that
-are used.
-
 djm says:
 David> To avoid comments like the one about subdirs getting buried in
 David> the middle of a Makefile.in, how about pushing comments that
@@ -402,10 +329,6 @@ David> start with ### to the top of the Makefile.in (in 
order)?  Sort
 David> of like how Autoconf uses diversions to force initialization
 David> code to the top of configure.
 
-Karl Berry says:
-Karl> 2) Your Makefile variable names are generally uppercase, but GNU
-Karl> generally uses lowercase. Not that it matters :-).
-
 ================================================================
 
 Stuff for aclocal:
diff --git a/doc/automake.texi b/doc/automake.texi
index e384f9e..203e235 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -7901,11 +7901,11 @@ be prevented via the @code{no-installinfo} option.  In 
this case,
 request this explicitly using @samp{make install-info}.
 
 @vindex AM_UPDATE_INFO_DIR
-By default, @code{make install-info} will try to run the
address@hidden program (if available) to update (or create)
-the @address@hidden@address@hidden/dir} index.  If this is undesired, it
-can be prevented by exporting the @code{AM_UPDATE_INFO_DIR} variable
-to "@code{no}".
+By default, @code{make install-info} and @code{make install-info}
+will try to run the @command{install-info} program (if available)
+to update (or create) the @address@hidden@address@hidden/dir} index.
+If this is undesired, it can be prevented by exporting the
address@hidden variable to "@code{no}".
 
 The following variables are used by the Texinfo build rules.
 
@@ -9576,7 +9576,7 @@ use TAP in their testsuite.
 
 Currently, the TAP driver that comes with Automake requires some by-hand
 steps on the developer's part (this situation should hopefully be improved
-in future Automake versions).  You'll have grab the @file{tap-driver.sh}
+in future Automake versions).  You'll have to grab the @file{tap-driver.sh}
 script from the Automake distribution by hand, copy it in your source tree,
 add a call to @code{AC_PROG_AWK} in @file{configure.ac} to search for a
 proper awk program, and use the Automake support for third-party test
@@ -9590,15 +9590,16 @@ supports the following options, whose names are chosen 
for enhanced
 compatibility with the @command{prove} utility.
 
 @table @option
address@hidden Keep in sync with 'tap-exit.test' and 'tap-signal.test'.
address@hidden Keep in sync with 'tap-exit.test' and 'tap-signal.tap'.
 @item --ignore-exit
 Causes the test driver to ignore the exit status of the test scripts;
-by default, the driver will report an error if the script exit with a
-non-zero status.  This option has effect also
+by default, the driver will report an error if the script exits with a
+non-zero status.  This option has effect also on non-zero exit statuses
+due to termination by a signal.
 @item --comments
 Instruct the test driver to display TAP diagnostic (i.e., lines beginning
 with the @samp{#} character) in the testsuite progress output too; by
-default, TAP diagnostic is only copied in the @file{.log} file.
+default, TAP diagnostic is only copied to the @file{.log} file.
 @item --no-comments
 Revert the effects of @option{--comments}.
 @item --merge
@@ -9616,7 +9617,7 @@ Revert the effects of @option{--merge}.
 Change the string that introduces TAP diagnostic from the default value
 of address@hidden'' to @address@hidden  This can be useful if your
 TAP-based test scripts produce verbose output on which they have limited
-control (because, say, the output comes by other tools invoked in the
+control (because, say, the output comes from other tools invoked in the
 scripts), and it might contain text that gets spuriously interpreted as
 TAP diagnostic: such an issue can be solved by redefining the string that
 activates TAP diagnostic to a value you know won't appear by chance in
@@ -9666,7 +9667,7 @@ echo 'ok 3 - This will not be seen.'
 #!/bin/sh
 echo 1..1
 echo ok 1
-# Exit with error, even if all the test case has been successful.
+# Exit with error, even if all the tests have been successful.
 exit 7
 
 % @kbd{cp @var{PREFIX}/share/address@hidden/tap-driver.pl .}
@@ -9712,13 +9713,13 @@ mainstream versions, which you should be aware of.
 @itemize @bullet
 @item
 A @code{Bail out!} directive doesn't stop the whole testsuite, but only
-the test script it occurs into.  This doesn't follows TAP specifications,
+the test script it occurs in.  This doesn't follow TAP specifications,
 but on the other hand it maximizes compatibility (and code sharing) with
 the ``hard error'' concept of the default @option{parallel-tests} driver.
 @item
 The @code{version} and @code{pragma} directives are not supported.
 @item
-The @option{--diagnostic-string} option of out driver allows to modify
+The @option{--diagnostic-string} option of our driver allows to modify
 the string that introduces TAP diagnostic from the default value
 of address@hidden''.  The standard TAP protocol has currently no way to
 allow this, so if you use it your diagnostic will be lost to more
diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am
index 8e75ef3..42787c7 100644
--- a/lib/am/texinfos.am
+++ b/lib/am/texinfos.am
@@ -94,6 +94,18 @@ endif ! %?LOCAL-TEXIS%
 ## Installing.  ##
 ## ------------ ##
 
+## Some code should be run only if install-info actually exists, and
+## if the user doesn't request it not to be run (through the
+## 'AM_UPDATE_INFO_DIR' environment variable).  See automake bug#9773
+## and Debian Bug#543992.
+if %?FIRST%
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+endif
+
 ## 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.
@@ -222,16 +234,7 @@ install-info-am: $(INFO_DEPS)
          echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
          $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
        @$(POST_INSTALL)
-## Only run this code if install-info actually exists, and if the user
-## doesn't request it not to be run (through the 'AM_UPDATE_INFO_DIR'
-## environment variable).  See automake bug#9773 and Debian Bug#543992.
-       @am__run_installinfo=yes; \
-       case $$AM_UPDATE_INFO_DIR in \
-         n|no|NO) am__run_installinfo=no;; \
-         *) (install-info --version) >/dev/null 2>&1 \
-              || am__run_installinfo=no;; \
-       esac; \
-       if test $$am__run_installinfo = yes; then \
+       @if $(am__can_run_installinfo); then \
          list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
          for file in $$list; do \
 ## Strip directory
@@ -322,9 +325,7 @@ uninstall-info-am:
        @$(PRE_UNINSTALL)
 ## Run two loops here so that we can handle PRE_UNINSTALL and
 ## NORMAL_UNINSTALL correctly.
-       @if test -d '$(DESTDIR)$(infodir)' && \
-           (install-info --version && \
-            install-info --version 2>&1 | sed 1q | grep -i -v debian) 
>/dev/null 2>&1; then \
+       @if test -d '$(DESTDIR)$(infodir)' && $(am__can_run_installinfo); then \
          list='$(INFO_DEPS)'; \
          for file in $$list; do \
            relfile=`echo "$$file" | sed 's|^.*/||'`; \
diff --git a/lib/depcomp b/lib/depcomp
index 81e64f6..debb6ff 100755
--- a/lib/depcomp
+++ b/lib/depcomp
@@ -1,7 +1,7 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2012-03-12.15; # UTC
+scriptversion=2012-03-27.16; # UTC
 
 # Copyright (C) 1999-2012 Free Software Foundation, Inc.
 
@@ -288,23 +288,26 @@ aix)
   ;;
 
 icc)
-  # Intel's C compiler understands '-MD -MF file'.  However on
-  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'.
+  # However on
+  #    $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c
   # ICC 7.0 will fill foo.d with something like
   #    foo.o: sub/foo.c
   #    foo.o: sub/foo.h
-  # which is wrong.  We want:
+  # which is wrong.  We want
   #    sub/foo.o: sub/foo.c
   #    sub/foo.o: sub/foo.h
   #    sub/foo.c:
   #    sub/foo.h:
   # ICC 7.1 will output
   #    foo.o: sub/foo.c sub/foo.h
-  # and will wrap long lines using \ :
+  # and will wrap long lines using '\':
   #    foo.o: sub/foo.c ... \
   #     sub/foo.h ... \
   #     ...
-
+  # tcc 0.9.26 (FIXME still under development at the moment of writing)
+  # will emit a similar output, but also prepend the continuation lines
+  # with horizontal tabulation characters.
   "$@" -MD -MF "$tmpdepfile"
   stat=$?
   if test $stat -eq 0; then :
@@ -317,11 +320,17 @@ icc)
   # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'.
   # Do two passes, one to just change these to
   # '$object: dependent.h' and one to simply 'dependent.h:'.
-  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
-  # Some versions of the HPUX 10.20 sed can't process this invocation
-  # correctly.  Breaking it into two sed invocations is a workaround.
-  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
-    sed -e 's/$/ :/' >> "$depfile"
+  sed -e "s/^[ $tab][ $tab]*/  /" -e "s,^[^:]*:,$object :," \
+    < "$tmpdepfile" > "$depfile"
+  sed '
+    s/[ '"$tab"'][ '"$tab"']*/ /g
+    s/^ *//
+    s/ *\\*$//
+    s/^[^:]*: *//
+    /^$/d
+    /:$/d
+    s/$/ :/
+  ' < "$tmpdepfile" >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
diff --git a/tests/install-info-dir.test b/tests/install-info-dir.test
index d7a0e7f..c76f424 100755
--- a/tests/install-info-dir.test
+++ b/tests/install-info-dir.test
@@ -76,12 +76,28 @@ fi
 # by default (if the 'install-info' program is available).
 # This should happen in a normal as well as in a DESTDIR installation.
 if test $have_installinfo = yes; then
+
   $MAKE install-info
   test -f $instdir/info/foo.info
   test -f $instdir/info/dir
+  $FGREP 'Does nothing at all, but has a nice name' $instdir/info/dir
+
+  $MAKE uninstall
+  test ! -f $instdir/info/foo.info
+  $FGREP 'but has a nice name' $instdir/info/dir && Exit 1
+
+  dir="$destdir/$cwd/$instdir/info"
+
   $MAKE DESTDIR="$cwd/$destdir" install-info
-  test -f "$destdir/$cwd/$instdir"/info/foo.info
-  test -f "$destdir/$cwd/$instdir"/info/dir
+  test -f "$dir"/foo.info
+  test -f "$dir"/dir
+  $FGREP 'Does nothing at all, but has a nice name' "$dir"/dir
+  $MAKE DESTDIR="$cwd/$destdir" uninstall
+  test ! -f "$dir"/foo.info
+  $FGREP 'but has a nice name' "$dir"/dir && Exit 1
+
+  unset dir
+
 fi
 
 rm -rf $instdir $destdir
@@ -119,6 +135,11 @@ END
   $MAKE install-info
   test -f $instdir/info/foo.info
   test -f $instdir/info/dir
+  $MAKE uninstall
+  test ! -f $instdir/info/foo.info
+  test -f $instdir/info/dir
+  $FGREP 'but has a nice name' $instdir/info/dir && Exit 1
+  : For shells with busted 'set -e'.
 fi
 
 rm -rf $instdir bin/install-info
@@ -132,15 +153,24 @@ for val in no NO n; do
   test -f $instdir/info/foo.info
   test ! -f $instdir/info/dir
 done
+
+$MAKE install-info
+chmod a-w $instdir/info/dir
+for val in no NO n; do
+  env AM_UPDATE_INFO_DIR="$val" $MAKE uninstall
+  $FGREP 'Does nothing at all, but has a nice name' $instdir/info/dir
+done
+
 if test $have_installinfo = yes; then
   for val in 'yes' 'who cares!'; do
     rm -rf $instdir
     env AM_UPDATE_INFO_DIR="$val" $MAKE install-info
     test -f $instdir/info/foo.info
     test -f $instdir/info/dir
+    env AM_UPDATE_INFO_DIR="$val" $MAKE uninstall
+    test ! -f $instdir/info/foo.info
+    $FGREP 'but has a nice name' $instdir/info/dir && Exit 1
   done
 fi
 
-rm -rf $instdir
-
 :
diff --git a/tests/link_cond.test b/tests/link_cond.test
new file mode 100755
index 0000000..7b9fd5a
--- /dev/null
+++ b/tests/link_cond.test
@@ -0,0 +1,90 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# 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, see <http://www.gnu.org/licenses/>.
+
+# Test that automatic determination of the linker works well with
+# conditional use of languages in a single program.
+# This currently doesn't truly work, but we have an easy workaround
+# at least, that is tested here.
+# See automake bug#11089.
+
+required='cc c++'
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.ac << 'END'
+AC_PROG_CC
+AC_PROG_CXX
+AM_CONDITIONAL([HAVE_CXX], [test $have_cxx = yes])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo
+if HAVE_CXX
+foo_SOURCES = more.c++
+else
+foo_SOURCES = less.c
+endif
+## FIXME: ideally, this workaround shouldn't be needed.
+if HAVE_CXX
+foo_LINK = $(CXXLINK)
+else
+foo_LINK = $(LINK)
+endif
+END
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+rm -f *.c++
+cat > less.c <<'END'
+/* Valid C but deliberately invalid C++ */
+main ()
+{
+  int new = 0;
+  return new;
+}
+END
+
+./configure have_cxx=no
+CXX=false $MAKE -e
+
+# Sanity check.
+rm -f foo foo.exe
+CC=false $MAKE -e && Exit 99
+
+$MAKE distclean
+
+rm -f *.c
+cat > more.c++ <<'END'
+/* Valid C++ but deliberately invalid C */
+using namespace std;
+int main (void)
+{
+  return 0;
+}
+END
+
+./configure have_cxx=yes
+CC=false $MAKE -e
+
+# Sanity check.
+rm -f foo foo.exe
+CXX=false $MAKE -e && Exit 99
+
+:
diff --git a/tests/list-of-tests.mk b/tests/list-of-tests.mk
index 1b8c68f..25b1310 100644
--- a/tests/list-of-tests.mk
+++ b/tests/list-of-tests.mk
@@ -611,6 +611,7 @@ libtoo11.test \
 license.test \
 license2.test \
 link_c_cxx.test \
+link_cond.test \
 link_dist.test \
 link_f90_only.test \
 link_fc.test \
diff --git a/tests/tap-doc2.test b/tests/tap-doc2.test
index 477aa50..55bf002 100755
--- a/tests/tap-doc2.test
+++ b/tests/tap-doc2.test
@@ -62,7 +62,7 @@ cat > baz.test <<'END'
 #!/bin/sh
 echo 1..1
 echo ok 1
-# Exit with error, even if all the test case has been successful.
+# Exit with error, even if all the tests have been successful.
 exit 7
 END
 
diff --git a/tests/vala-mix.test b/tests/vala-mix.test
index 2cd2146..065a40b 100755
--- a/tests/vala-mix.test
+++ b/tests/vala-mix.test
@@ -22,7 +22,7 @@ required='valac cc'
 cat >> configure.ac <<'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
-AM_PROG_VALAC
+AM_PROG_VALAC([0.7.3])
 AC_OUTPUT
 END
 
diff --git a/tests/vala-mix2.test b/tests/vala-mix2.test
index e9a0aa4..5162467 100755
--- a/tests/vala-mix2.test
+++ b/tests/vala-mix2.test
@@ -23,7 +23,7 @@ required='valac cc c++ GNUmake'
 cat >> configure.ac <<'END'
 AC_PROG_CC
 AC_PROG_CXX
-AM_PROG_VALAC
+AM_PROG_VALAC([0.7.3])
 AC_OUTPUT
 END
 
diff --git a/tests/vala-vpath.test b/tests/vala-vpath.test
index cef335d..d863c8e 100755
--- a/tests/vala-vpath.test
+++ b/tests/vala-vpath.test
@@ -23,7 +23,7 @@ required=valac
 cat >> configure.ac << 'END'
 AC_CONFIG_SRCDIR([hello.vala])
 AC_PROG_CC
-AM_PROG_VALAC([0.7])
+AM_PROG_VALAC([0.7.3])
 AC_OUTPUT
 END
 


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]