diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-03-27 22:40:20 +0200 |
---|---|---|
committer | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-03-27 22:42:47 +0200 |
commit | 7a56bed0b38cd90b89339b8bd638bfc7e7f6fe29 (patch) | |
tree | 9865938004e9c343814660a147f4f7de3fd64b33 | |
parent | fe6743feae243a6ba0d05ac92221e3996a8e6aa5 (diff) | |
parent | b96263e1cc2d2977cf685d5596c7bbf57617a0da (diff) | |
download | automake-7a56bed0b38cd90b89339b8bd638bfc7e7f6fe29.tar.gz |
Merge branch 'maint'
* maint:
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
build: remove duplicated entries in $(TESTS)
+ Extra non-trivia edits:
* tests/link_cond.test: Use 'configure.ac', not 'configure.in'.
Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
-rw-r--r-- | NEWS | 11 | ||||
-rw-r--r-- | THANKS | 1 | ||||
-rw-r--r-- | doc/automake.texi | 10 | ||||
-rw-r--r-- | lib/am/texinfos.am | 27 | ||||
-rwxr-xr-x | lib/depcomp | 31 | ||||
-rwxr-xr-x | tests/install-info-dir.test | 38 | ||||
-rwxr-xr-x | tests/link_cond.test | 90 | ||||
-rw-r--r-- | tests/list-of-tests.mk | 1 | ||||
-rwxr-xr-x | tests/vala-mix.test | 2 | ||||
-rwxr-xr-x | tests/vala-mix2.test | 2 | ||||
-rwxr-xr-x | tests/vala-vpath.test | 2 |
11 files changed, 176 insertions, 39 deletions
@@ -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 @@ -152,6 +152,7 @@ James Youngman jay@gnu.org Jan Engelhardt jengelh@medozas.de Janos Farkas chexum@shadow.banki.hu Jared Davis abiword@aiksaurus.com +Jason DeVinney jasondevinney@gmail.com Jason Duell jcduell@lbl.gov Jason Molenda crash@cygnus.co.jp Javier Jardón jjardon@gnome.org diff --git a/doc/automake.texi b/doc/automake.texi index 7d548c7da..90a271cd9 100644 --- a/doc/automake.texi +++ b/doc/automake.texi @@ -7906,11 +7906,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 -@command{install-info} program (if available) to update (or create) -the @file{@code{$@{infodir@}}/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 @file{@code{$@{infodir@}}/dir} index. +If this is undesired, it can be prevented by exporting the +@code{AM_UPDATE_INFO_DIR} variable to "@code{no}". The following variables are used by the Texinfo build rules. diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am index 8e75ef3b9..42787c778 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 81e64f6bf..debb6ffa3 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 d7a0e7f91..c76f424ad 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 000000000..7b9fd5a3c --- /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 af114adf6..de022a2d3 100644 --- a/tests/list-of-tests.mk +++ b/tests/list-of-tests.mk @@ -612,6 +612,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/vala-mix.test b/tests/vala-mix.test index acf47d989..58ab50028 100755 --- a/tests/vala-mix.test +++ b/tests/vala-mix.test @@ -22,7 +22,7 @@ required='valac cc GNUmake' 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 e9a0aa4ea..516246724 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 636e66ec6..a968afa0e 100755 --- a/tests/vala-vpath.test +++ b/tests/vala-vpath.test @@ -23,7 +23,7 @@ required="valac GNUmake" 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 |