summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Lattarini <stefano.lattarini@gmail.com>2012-03-27 22:05:39 +0200
committerStefano Lattarini <stefano.lattarini@gmail.com>2012-03-27 22:05:39 +0200
commit35ded196289f81b2ee8d7c89afd99634f03028b8 (patch)
tree791f8460a116c2b3ffa1c66b91cca742d9371feb
parentfb90d16b4737180ab436a520f57b63c4528994d1 (diff)
parentb96263e1cc2d2977cf685d5596c7bbf57617a0da (diff)
downloadautomake-35ded196289f81b2ee8d7c89afd99634f03028b8.tar.gz
Merge branch 'maint' into branch-1.11
* NEWS: Minor tweakings and reorderings of the new entries. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
-rw-r--r--NEWS10
-rw-r--r--THANKS2
-rw-r--r--doc/automake.texi10
-rw-r--r--lib/am/texinfos.am27
-rwxr-xr-xlib/depcomp31
-rwxr-xr-xtests/conffile-leading-dot.test17
-rwxr-xr-xtests/install-info-dir.test40
-rwxr-xr-xtests/link_cond.test90
-rw-r--r--tests/list-of-tests.mk1
-rwxr-xr-xtests/vala-mix.test2
-rwxr-xr-xtests/vala-mix2.test2
-rwxr-xr-xtests/vala-vpath.test2
12 files changed, 189 insertions, 45 deletions
diff --git a/NEWS b/NEWS
index 43c02cac4..acf959690 100644
--- a/NEWS
+++ b/NEWS
@@ -44,6 +44,11 @@ New in 1.11.3c:
optional space between the -I, -L and -l options and their respective
arguments, for better POSIX compliance.
+ - 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'.
@@ -54,6 +59,11 @@ Bugs fixed in 1.11.3c:
- A definition of 'noinst_PYTHON' before 'python_PYTHON' (or similar)
don't cause spurious failures upon "make install" anymore.
+ - The user can now instruct the 'uninstall-info' rule not to update
+ the '${infodir}/dir' file by exporting the environment variable
+ 'AM_UPDATE_INFO_DIR' to the value "no". This is done for consistency
+ with how the 'install-info' rule operates since automake 1.11.2.
+
* Long-standing bugs:
- It is now possible for a foo_SOURCES variable to hold Vala sources
diff --git a/THANKS b/THANKS
index e0c44d7b6..702c97bda 100644
--- a/THANKS
+++ b/THANKS
@@ -149,6 +149,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
@@ -269,6 +270,7 @@ Olly Betts olly@muscat.co.uk
Oren Ben-Kiki oren@ben-kiki.org
Owen Taylor otaylor@redhat.com
Quentin Glidic sardemff7+gnu@sardemff7.net
+Panther Martin mrsmiley98@lycos.com
Patrick Welche prlw1@newn.cam.ac.uk
Patrik Weiskircher me@justp.at
Paul Berrevoets paul@swi.com
diff --git a/doc/automake.texi b/doc/automake.texi
index db9a5ba97..5b2bdddab 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -8025,11 +8025,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 9190e8fb4..1a1766ea6 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 325713f0c..25a39e6cd 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, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
# 2011, 2012 Free Software Foundation, Inc.
@@ -289,23 +289,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 :
@@ -318,11 +321,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/conffile-leading-dot.test b/tests/conffile-leading-dot.test
index 1d3d12fab..8eaed4b8a 100755
--- a/tests/conffile-leading-dot.test
+++ b/tests/conffile-leading-dot.test
@@ -31,9 +31,7 @@ AC_CONFIG_FILES([./foo:a.in:b.in:c.in])
AC_OUTPUT
END
-echo foo = barbarbar > Makefile.am
-
-touch a.in b.in c.in
+touch a.in b.in c.in Makefile.am
$ACLOCAL
@@ -46,17 +44,20 @@ grep "^configure\.in:4:.* omit leading '\\./'" stderr
grep "^configure\.in:4:.*remake rules might be subtly broken" stderr
# Check that our warning was actually justified.
+sed 's/^AM_INIT_AUTOMAKE/&([-Wall -Wno-unsupported])/' <configure.in >t
+mv -f t configure.in
+rm -rf autom4te*.cache
+$ACLOCAL
$AUTOCONF
$AUTOMAKE -Wall -Wno-unsupported
./configure
$MAKE
-grep barbarbar Makefile
-# No need to sleep here, configure did that for us already.
-echo foo = bazbazbaz > Makefile.am
+$sleep
+touch Makefile.am
# Check that remake rules do truly break -- otherwise automake is
# giving a bogus warning.
-$MAKE 2>stderr && { cat stderr >&2 Exit 1; }
+$MAKE 2>stderr && { cat stderr >&2; Exit 1; }
cat stderr >&2
-grep "config\\.status:.*invalid argument.*[\`\"']Makefile[\`\"']" stderr
+grep "config\\.status:.*invalid argument.*Makefile" stderr
:
diff --git a/tests/install-info-dir.test b/tests/install-info-dir.test
index 044bf6d2a..405480d78 100755
--- a/tests/install-info-dir.test
+++ b/tests/install-info-dir.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011, 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
@@ -78,12 +78,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
@@ -121,6 +137,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
@@ -134,15 +155,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..0d61865ac
--- /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.in << '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 819cd06de..2548174df 100644
--- a/tests/list-of-tests.mk
+++ b/tests/list-of-tests.mk
@@ -553,6 +553,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 73a07d93b..012b36ad0 100755
--- a/tests/vala-mix.test
+++ b/tests/vala-mix.test
@@ -24,7 +24,7 @@ set -e
cat >> configure.in <<'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 88d281888..298f88d60 100755
--- a/tests/vala-mix2.test
+++ b/tests/vala-mix2.test
@@ -25,7 +25,7 @@ set -e
cat >> configure.in <<'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 8f2b6774a..311eb3a06 100755
--- a/tests/vala-vpath.test
+++ b/tests/vala-vpath.test
@@ -25,7 +25,7 @@ set -e
cat >> configure.in << 'END'
AC_CONFIG_SRCDIR([hello.vala])
AC_PROG_CC
-AM_PROG_VALAC([0.7])
+AM_PROG_VALAC([0.7.3])
AC_OUTPUT
END