[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FYI: required=gcc
From: |
Alexandre Duret-Lutz |
Subject: |
FYI: required=gcc |
Date: |
18 Jun 2002 21:39:20 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
I'm checking in this on HEAD.
If a test requires gcc, it should overwrite CC=gcc before
calling configure.
A few tests failed to do this.
With this patch the CC setting is done automatically in defs
when gcc is required, so we can't forget.
2002-06-18 Alexandre Duret-Lutz <address@hidden>
* tests/defs (required): Handle `gcc' and `g++'; automatically
export CC and CXX when they are required.
* tests/ansi3.test, tests/ansi5.test, tests/ccnoco.test,
tests/cond4.test, tests/cond16.test, tests/cond18.test,
tests/cond19.test, tests/depcomp2.test, tests/depend2.test,
tests/lex3.test, tests/pr87.test, tests/pr220.test,
tests/substref.test, tests/target-cflags.test, tests/yacc4.test,
tests/yaccvpath.test: Require gcc. Don't pass CC=gcc to
configure.
* tests/subobj9.test: Require g++.
Index: tests/ansi3.test
===================================================================
RCS file: /cvs/automake/automake/tests/ansi3.test,v
retrieving revision 1.9
diff -u -r1.9 ansi3.test
--- tests/ansi3.test 10 Apr 2002 16:20:58 -0000 1.9
+++ tests/ansi3.test 18 Jun 2002 19:37:50 -0000
@@ -3,6 +3,7 @@
# Actual test of ansi2knr functionality. Relies on existence
# of working gcc.
+required=gcc
. $srcdir/defs || exit 1
cat > configure.in << 'END'
@@ -27,9 +28,6 @@
return 0;
}
END
-
-# Likewise for gcc.
-(gcc -v) > /dev/null 2>&1 || exit 77
# Ignore user CFLAGS.
CFLAGS=
Index: tests/ansi5.test
===================================================================
RCS file: /cvs/automake/automake/tests/ansi5.test,v
retrieving revision 1.5
diff -u -r1.5 ansi5.test
--- tests/ansi5.test 10 Apr 2002 16:20:58 -0000 1.5
+++ tests/ansi5.test 18 Jun 2002 19:37:50 -0000
@@ -2,6 +2,7 @@
# Test for ansi2knr in another directory.
+required=gcc
. $srcdir/defs || exit 1
cat > configure.in << 'END'
@@ -47,8 +48,6 @@
return 0;
}
END
-
-(gcc -v) > /dev/null 2>&1 || exit 77
set -e
Index: tests/ccnoco.test
===================================================================
RCS file: /cvs/automake/automake/tests/ccnoco.test,v
retrieving revision 1.5
diff -u -r1.5 ccnoco.test
--- tests/ccnoco.test 19 Apr 2002 20:58:51 -0000 1.5
+++ tests/ccnoco.test 18 Jun 2002 19:37:51 -0000
@@ -3,6 +3,7 @@
# Test to make sure we can compile when the compiler doesn't
# understand `-c -o'.
+required=gcc
. $srcdir/defs || exit 1
cat > configure.1 << 'END'
@@ -38,8 +39,6 @@
printf ("hi\n");
}
END
-
-gcc -v || exit 77
cat > Mycomp << 'END'
#!/bin/sh
Index: tests/cond16.test
===================================================================
RCS file: /cvs/automake/automake/tests/cond16.test,v
retrieving revision 1.4
diff -u -r1.4 cond16.test
--- tests/cond16.test 26 Dec 2001 08:22:05 -0000 1.4
+++ tests/cond16.test 18 Jun 2002 19:37:51 -0000
@@ -3,6 +3,7 @@
# Test for bug in conditionals in SOURCES with variable substitution
references.
# Report from Richard Boulton
+required=gcc
. $srcdir/defs || exit 1
cat > configure.in << 'END'
@@ -32,8 +33,6 @@
END
-(gcc -v) > /dev/null 2>&1 || exit 77
-
# Ignore user CFLAGS.
CFLAGS=
export CFLAGS
@@ -44,7 +43,7 @@
$AUTOCONF
$AUTOMAKE -a
-CC='gcc' ./configure
+./configure
val=`$MAKE -s echorule`;
echo $val
Index: tests/cond18.test
===================================================================
RCS file: /cvs/automake/automake/tests/cond18.test,v
retrieving revision 1.4
diff -u -r1.4 cond18.test
--- tests/cond18.test 18 Jun 2002 19:08:27 -0000 1.4
+++ tests/cond18.test 18 Jun 2002 19:37:51 -0000
@@ -3,7 +3,7 @@
# Regression test for substitution references to conditional variables.
# Report from Richard Boulton
-required=GNUmake
+required='GNUmake gcc'
. $srcdir/defs || exit 1
cat > configure.in << 'END'
@@ -39,8 +39,6 @@
bin_PROGRAMS = helldl
END
-(gcc -v) > /dev/null 2>&1 || exit 77
-
# Ignore user CFLAGS.
CFLAGS=
export CFLAGS
@@ -51,7 +49,7 @@
$AUTOCONF
$AUTOMAKE -a
-CC='gcc' ./configure
+./configure
val=`$MAKE --no-print-directory echorule`;
echo $val
Index: tests/cond19.test
===================================================================
RCS file: /cvs/automake/automake/tests/cond19.test,v
retrieving revision 1.4
diff -u -r1.4 cond19.test
--- tests/cond19.test 18 Jun 2002 19:08:27 -0000 1.4
+++ tests/cond19.test 18 Jun 2002 19:37:51 -0000
@@ -3,7 +3,7 @@
# Regression test for substitution references to conditional variables.
# Report from Richard Boulton
-required=GNUmake
+required='GNUmake gcc'
. $srcdir/defs || exit 1
cat > configure.in << 'END'
@@ -41,8 +41,6 @@
bin_PROGRAMS = helldl
END
-(gcc -v) > /dev/null 2>&1 || exit 77
-
# Ignore user CFLAGS.
CFLAGS=
export CFLAGS
@@ -53,13 +51,13 @@
$AUTOCONF
$AUTOMAKE -a
-CONDITION1=true CONDITION2=true CC='gcc' ./configure
+CONDITION1=true CONDITION2=true ./configure
vala=`$MAKE --no-print-directory echorule`;
-CONDITION1=true CONDITION2=false CC='gcc' ./configure
+CONDITION1=true CONDITION2=false ./configure
valb=`$MAKE --no-print-directory echorule`;
-CONDITION1=false CONDITION2=true CC='gcc' ./configure
+CONDITION1=false CONDITION2=true ./configure
valc=`$MAKE --no-print-directory echorule`;
-CONDITION1=false CONDITION2=false CC='gcc' ./configure
+CONDITION1=false CONDITION2=false ./configure
vald=`$MAKE --no-print-directory echorule`;
echo $vala
Index: tests/cond4.test
===================================================================
RCS file: /cvs/automake/automake/tests/cond4.test,v
retrieving revision 1.8
diff -u -r1.8 cond4.test
--- tests/cond4.test 18 Jun 2002 19:08:27 -0000 1.8
+++ tests/cond4.test 18 Jun 2002 19:37:51 -0000
@@ -2,7 +2,7 @@
# Another sources-in-conditional test. Report from Tim Goodwin.
-required=GNUmake
+required='GNUmake gcc'
. $srcdir/defs || exit 1
cat > configure.in << 'END'
@@ -38,19 +38,18 @@
test "`grep 'address@hidden@' Makefile.in | wc -l`" -eq 0 || exit 1
$AUTOCONF || exit 1
-(gcc -v) > /dev/null 2>&1 || exit 77
# Ignore user CFLAGS.
CFLAGS=
export CFLAGS
-CC='gcc' CONDITION1=true CONDITION2=true ./configure || exit 1
+CONDITION1=true CONDITION2=true ./configure || exit 1
msgtt=`$MAKE --no-print-directory echo-objects`
-CC='gcc' CONDITION1=true CONDITION2=false ./configure || exit 1
+CONDITION1=true CONDITION2=false ./configure || exit 1
msgtf=`$MAKE --no-print-directory echo-objects`
-CC='gcc' CONDITION1=false CONDITION2=true ./configure || exit 1
+CONDITION1=false CONDITION2=true ./configure || exit 1
msgft=`$MAKE --no-print-directory echo-objects`
-CC='gcc' CONDITION1=false CONDITION2=false ./configure || exit 1
+CONDITION1=false CONDITION2=false ./configure || exit 1
msgff=`$MAKE --no-print-directory echo-objects`
echo $msgtt
Index: tests/defs
===================================================================
RCS file: /cvs/automake/automake/tests/defs,v
retrieving revision 1.52
diff -u -r1.52 defs
--- tests/defs 18 Jun 2002 19:08:27 -0000 1.52
+++ tests/defs 18 Jun 2002 19:37:51 -0000
@@ -32,10 +32,31 @@
echo "$me: running $MAKE --version"
( $MAKE --version ) || exit 77
;;
+ gcc)
+ # When gcc is required, export `CC=gcc' so that ./configure
+ # always use it. This is important only when the user
+ # has defined CC in his environment, otherwise ./configure will
+ # prefer gcc to other compilers.
+ CC=gcc
+ export CC
+ echo "$me: running $CC --version"
+ ( $CC --version ) || exit 77
+ ;;
+ g++)
+ CXX=g++
+ export CXX
+ echo "$me: running $CXX --version"
+ ( $CXX --version ) || exit 77
+ ;;
# Generic case: the tool must support --version.
*)
echo "$me: running $tool --version"
( $tool --version ) || exit 77
+ ;;
+ esac
+ # Additional variables to define if some $tool is required.
+ case $tool in
+ gcc)
;;
esac
done
Index: tests/depcomp2.test
===================================================================
RCS file: /cvs/automake/automake/tests/depcomp2.test,v
retrieving revision 1.4
diff -u -r1.4 depcomp2.test
--- tests/depcomp2.test 26 Dec 2001 08:22:05 -0000 1.4
+++ tests/depcomp2.test 18 Jun 2002 19:37:51 -0000
@@ -3,6 +3,7 @@
# Test to make sure that depcomp is not used when it's not installed
# From Pavel Roskin.
+required=gcc
. $srcdir/defs || exit 1
cat > configure.in << 'END'
@@ -25,9 +26,6 @@
END
: > subdir/foo.c
-
-# Likewise for gcc.
-(gcc -v) > /dev/null 2>&1 || exit 77
# Ignore user CFLAGS.
CFLAGS=
Index: tests/depend2.test
===================================================================
RCS file: /cvs/automake/automake/tests/depend2.test,v
retrieving revision 1.8
diff -u -r1.8 depend2.test
--- tests/depend2.test 26 Dec 2001 08:22:05 -0000 1.8
+++ tests/depend2.test 18 Jun 2002 19:37:51 -0000
@@ -4,6 +4,7 @@
# --disable-dependency-tracking.
# Report from Robert Boehne
+required=gcc
. $srcdir/defs || exit 1
cat > configure.in << 'END'
@@ -31,9 +32,6 @@
}
END
-# Likewise for gcc.
-(gcc -v) > /dev/null 2>&1 || exit 77
-
set -e
$ACLOCAL
@@ -44,6 +42,6 @@
CFLAGS=
export CFLAGS
-CC='gcc' ./configure --disable-dependency-tracking
+./configure --disable-dependency-tracking
$MAKE
Index: tests/lex3.test
===================================================================
RCS file: /cvs/automake/automake/tests/lex3.test,v
retrieving revision 1.8
diff -u -r1.8 lex3.test
--- tests/lex3.test 18 Jun 2002 19:08:27 -0000 1.8
+++ tests/lex3.test 18 Jun 2002 19:37:52 -0000
@@ -3,18 +3,12 @@
# Test associated with PR 19.
# From Matthew D. Langston.
-required=GNUmake
+required='GNUmake gcc gzip'
. $srcdir/defs || exit 1
-# Likewise for gcc.
-(gcc -v) > /dev/null 2>&1 || exit 77
-
# Ignore user CFLAGS.
CFLAGS=
export CFLAGS
-
-# Likewise for gzip.
-(gzip --version) > /dev/null 2>&1 || exit 77
cat > configure.in << 'END'
AC_INIT
Index: tests/pr220.test
===================================================================
RCS file: /cvs/automake/automake/tests/pr220.test,v
retrieving revision 1.2
diff -u -r1.2 pr220.test
--- tests/pr220.test 30 Dec 2001 20:49:41 -0000 1.2
+++ tests/pr220.test 18 Jun 2002 19:37:52 -0000
@@ -1,7 +1,7 @@
#! /bin/sh
# Test for PR automake/220.
-
+
required=gcc
. $srcdir/defs || exit 1
@@ -43,5 +43,5 @@
cd build
# configure should fail since we've done something invalid.
-CC='gcc' ../configure && exit 1
+../configure && exit 1
exit 0
Index: tests/pr87.test
===================================================================
RCS file: /cvs/automake/automake/tests/pr87.test,v
retrieving revision 1.12
diff -u -r1.12 pr87.test
--- tests/pr87.test 18 Jun 2002 19:08:28 -0000 1.12
+++ tests/pr87.test 18 Jun 2002 19:37:52 -0000
@@ -3,7 +3,7 @@
# Test for PR automake/87.
# Require GNU make for `make distcheck'
-required=GNUmake
+required='GNUmake gcc'
. $srcdir/defs || exit 1
subdirs="foo bar"
@@ -28,9 +28,6 @@
AC_OUTPUT(Makefile `echo $subdirs | sed 's|\([a-z][a-z]*\)|\1/Makefile|g'`)
EOF
-# Likewise for gcc.
-(gcc -v) > /dev/null 2>&1 || exit 77
-
# Ignore user CFLAGS.
CFLAGS=
export CFLAGS
@@ -57,5 +54,5 @@
done) < foo/Makefile.in || exit 1
cd build \
- && CC='gcc' ../configure \
+ && ../configure \
&& $MAKE distcheck || exit 1
Index: tests/subobj3.test
===================================================================
RCS file: /cvs/automake/automake/tests/subobj3.test,v
retrieving revision 1.11
diff -u -r1.11 subobj3.test
--- tests/subobj3.test 10 Apr 2002 16:20:58 -0000 1.11
+++ tests/subobj3.test 18 Jun 2002 19:37:52 -0000
@@ -2,6 +2,7 @@
# Test of subdir objects with C++.
+required=gcc
. $srcdir/defs || exit 1
cat > configure.in << 'END'
@@ -32,9 +33,6 @@
}
END
-# Likewise for gcc.
-(gcc -v) > /dev/null 2>&1 || exit 77
-
# Ignore user CFLAGS.
CFLAGS=
export CFLAGS
@@ -44,6 +42,6 @@
$ACLOCAL \
&& $AUTOCONF \
&& $AUTOMAKE -a \
- && CC='gcc' ./configure \
+ && ./configure \
&& ANSI2KNR=./ansi2knr U=_ $MAKE -e SHELL=/bin/sh \
&& ./hello
Index: tests/subobj9.test
===================================================================
RCS file: /cvs/automake/automake/tests/subobj9.test,v
retrieving revision 1.2
diff -u -r1.2 subobj9.test
--- tests/subobj9.test 10 Apr 2002 15:35:40 -0000 1.2
+++ tests/subobj9.test 18 Jun 2002 19:37:52 -0000
@@ -2,7 +2,7 @@
# Test for PR 312.
-required='libtoolize gcc'
+required='libtoolize g++'
. $srcdir/defs || exit 1
cat > configure.in << 'END'
@@ -36,6 +36,6 @@
$AUTOCONF
$AUTOMAKE -a
-./configure CXX=gcc
+./configure
$MAKE
$MAKE distcheck
Index: tests/substref.test
===================================================================
RCS file: /cvs/automake/automake/tests/substref.test,v
retrieving revision 1.6
diff -u -r1.6 substref.test
--- tests/substref.test 26 Dec 2001 08:22:06 -0000 1.6
+++ tests/substref.test 18 Jun 2002 19:37:52 -0000
@@ -4,6 +4,7 @@
# null.
# Report from Richard Boulton
+required=gcc
. $srcdir/defs || exit 1
cat > configure.in << 'END'
@@ -29,8 +30,6 @@
bin_PROGRAMS = helldl
END
-
-(gcc -v) > /dev/null 2>&1 || exit 77
# Ignore user CFLAGS.
CFLAGS=
Index: tests/target-cflags.test
===================================================================
RCS file: /cvs/automake/automake/tests/target-cflags.test,v
retrieving revision 1.8
diff -u -r1.8 target-cflags.test
--- tests/target-cflags.test 18 Jun 2002 19:08:28 -0000 1.8
+++ tests/target-cflags.test 18 Jun 2002 19:37:52 -0000
@@ -3,7 +3,7 @@
# Test to make sure target specific CFLAGS work
# Assar Westerlund <address@hidden>
-required=GNUmake
+required='GNUmake gcc'
. $srcdir/defs || exit 1
cat > configure.in << 'END'
@@ -37,9 +37,6 @@
}
#endif
END
-
-# Likewise for gcc.
-(gcc -v) > /dev/null 2>&1 || exit 77
set -e
Index: tests/yacc4.test
===================================================================
RCS file: /cvs/automake/automake/tests/yacc4.test,v
retrieving revision 1.3
diff -u -r1.3 yacc4.test
--- tests/yacc4.test 26 Dec 2001 08:22:06 -0000 1.3
+++ tests/yacc4.test 18 Jun 2002 19:37:52 -0000
@@ -2,10 +2,9 @@
# Some simple tests of ylwrap functionality.
+required=gcc
. $srcdir/defs || exit 1
-# Likewise for some other tools.
-(gcc -v) > /dev/null 2>&1 || exit 77
(bison -V) > /dev/null 2>&1 || exit 77
cat > configure.in << 'END'
Index: tests/yaccvpath.test
===================================================================
RCS file: /cvs/automake/automake/tests/yaccvpath.test,v
retrieving revision 1.9
diff -u -r1.9 yaccvpath.test
--- tests/yaccvpath.test 18 Jun 2002 19:08:28 -0000 1.9
+++ tests/yaccvpath.test 18 Jun 2002 19:37:52 -0000
@@ -7,11 +7,9 @@
# to be distributed is up to date.
# Require GNU make for `make distdir'
-required=GNUmake
+required='GNUmake gcc'
. $srcdir/defs || exit 1
-# Likewise for some other tools.
-(gcc -v) > /dev/null 2>&1 || exit 77
(bison -V) > /dev/null 2>&1 || exit 77
cat > configure.in << 'END'
--
Alexandre Duret-Lutz
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- FYI: required=gcc,
Alexandre Duret-Lutz <=