automake
[Top][All Lists]
Advanced

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

FYI: s/autoconf/$AUTOCONF/g in test suite


From: Akim Demaille
Subject: FYI: s/autoconf/$AUTOCONF/g in test suite
Date: 26 Jan 2001 15:20:34 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Crater Lake)

I'm applying this.  It worth noting that the policy wrt exit 0 or 77
was not clear.  I chose 77, but it's easy to change in defs now.  Most
of the tests are first building the needed files, and *then* checking
for required tools.  Obviously the converse makes more sense, not that
it really matters.

Ooops!  I just noticed this in my patch:

| Index: Makefile.in
| ===================================================================
| RCS file: /cvs/automake/automake/Makefile.in,v
| retrieving revision 1.243
| diff -u -u -r1.243 Makefile.in
| --- Makefile.in 2001/01/25 15:50:36 1.243
| +++ Makefile.in 2001/01/26 14:17:22
| @@ -178,7 +178,7 @@
|         @:
|  
|  $(srcdir)/stamp-vti: automake.texi $(top_srcdir)/configure.in
| -     @(set `$(SHELL) $(srcdir)/mdate-sh $(srcdir)/automake.texi`; \
| +     @(set `$(SHELL) \$\(srcdir\)\/mdate-sh $(srcdir)/automake.texi`; \
|         echo "@set UPDATED $$1 $$2 $$3"; \
|         echo "@set UPDATED-MONTH $$2 $$3"; \
|         echo "@set EDITION $(VERSION)"; \

I'm not applying it, but Tom, something's fishy here.  I guess it the
quotation in &transform that made this.



Index: m4/Makefile.in
===================================================================
RCS file: /cvs/automake/automake/m4/Makefile.in,v
retrieving revision 1.105
diff -u -u -r1.105 Makefile.in
--- m4/Makefile.in 2001/01/25 15:50:36 1.105
+++ m4/Makefile.in 2001/01/26 14:17:22
@@ -61,8 +61,6 @@
 AMDEP = @AMDEP@
 AMTAR = @AMTAR@
 AWK = @AWK@
-CC = @CC@
-CXX = @CXX@
 DEPDIR = @DEPDIR@
 MAKEINFO = @MAKEINFO@
 PACKAGE = @PACKAGE@
Index: tests/ChangeLog
from  Akim Demaille  <address@hidden>

        * defs (AUTOCONF, has_autoconf, needs_autoconf): New.
        * ansi3.test, cond9.test, depacl2.test, install2.test, pr19.test,
        * pr87.test, pr9.test, subobj3.test, target-cflags.test: Use them.

Index: tests/ansi3.test
===================================================================
RCS file: /cvs/automake/automake/tests/ansi3.test,v
retrieving revision 1.3
diff -u -u -r1.3 ansi3.test
--- tests/ansi3.test 1999/03/01 21:16:33 1.3
+++ tests/ansi3.test 2001/01/26 14:17:27
@@ -29,7 +29,7 @@
 END
 
 # Fail gracefully if no autoconf.
-(autoconf --version) > /dev/null 2>&1 || exit 0
+$needs_autoconf
 
 # Likewise for gcc.
 (gcc -v) > /dev/null 2>&1 || exit 0
@@ -37,7 +37,7 @@
 # We use gcc and not gcc -traditional as the latter fails on some
 # Linux boxes (Red Hat 5.1 in particular).
 $ACLOCAL \
-   && autoconf \
+   && $AUTOCONF \
    && $AUTOMAKE -a \
    && CC='gcc' ./configure \
    && $MAKE ANSI2KNR=./ansi2knr U=_ \
Index: tests/cond9.test
===================================================================
RCS file: /cvs/automake/automake/tests/cond9.test,v
retrieving revision 1.1
diff -u -u -r1.1 cond9.test
--- tests/cond9.test 1999/04/27 15:52:46 1.1
+++ tests/cond9.test 2001/01/26 14:17:36
@@ -22,10 +22,10 @@
        echo '$(this)'
 END
 
-(autoconf --version) > /dev/null 2>&1 || exit 77
+$needs_autoconf
 
 $ACLOCAL \
-  && autoconf \
+  && $AUTOCONF \
   && $AUTOMAKE -a \
   && ./configure \
   && $MAKE echo-something | grep interesting > /dev/null
Index: tests/defs
===================================================================
RCS file: /cvs/automake/automake/tests/defs,v
retrieving revision 1.20
diff -u -u -r1.20 defs
--- tests/defs 2000/03/19 23:38:10 1.20
+++ tests/defs 2001/01/26 14:17:36
@@ -54,6 +54,17 @@
 # User can set MAKE to choose which make to use.  Must use GNU make.
 test -z "$MAKE" && MAKE=make
 
+# User can set which tools from Autoconf to use.
+test -z "$AUTOCONF" && AUTOCONF=autoconf
+if ($AUTOCONF --version) >/dev/null 2>&1; then
+  has_autoconf=:
+  needs_autoconf=:
+else
+  has_autoconf=false
+  needs_autoconf='exit 77'
+fi
+
+
 echo "=== Running test $0"
 
 # See how Automake should be run.  We put --foreign as the default
Index: tests/install2.test
===================================================================
RCS file: /cvs/automake/automake/tests/install2.test,v
retrieving revision 1.4
diff -u -u -r1.4 install2.test
--- tests/install2.test 2000/05/01 21:03:23 1.4
+++ tests/install2.test 2001/01/26 14:17:36
@@ -21,13 +21,13 @@
 rm -f install-sh mkinstalldirs missing
 
 # Fail gracefully if no autoconf.
-(autoconf --version) > /dev/null 2>&1 || exit 0
+$needs_autoconf
 
 # Likewise for gzip.
 (gzip --version) > /dev/null 2>&1 || exit 0
 
 $ACLOCAL || exit 1
-autoconf || exit 1
+$AUTOCONF || exit 1
 $AUTOMAKE -a || exit 1
 
 chmod 000 Makefile.am
Index: tests/pr19.test
===================================================================
RCS file: /cvs/automake/automake/tests/pr19.test,v
retrieving revision 1.4
diff -u -u -r1.4 pr19.test
--- tests/pr19.test 2000/05/01 21:03:23 1.4
+++ tests/pr19.test 2001/01/26 14:17:36
@@ -34,7 +34,7 @@
 echo %% > foo.l
 
 # Fail gracefully if no autoconf.
-(autoconf --version) > /dev/null 2>&1 || exit 0
+$needs_autoconf
 
 # Likewise for gcc.
 (gcc -v) > /dev/null 2>&1 || exit 0
@@ -43,7 +43,7 @@
 (gzip --version) > /dev/null 2>&1 || exit 0
 
 $ACLOCAL || exit 1
-autoconf || exit 1
+$AUTOCONF || exit 1
 $AUTOMAKE -a || exit 1
 CC=gcc ./configure || exit 1
 $MAKE || exit 1
Index: tests/pr87.test
===================================================================
RCS file: /cvs/automake/automake/tests/pr87.test,v
retrieving revision 1.2
diff -u -u -r1.2 pr87.test
--- tests/pr87.test 2000/11/24 01:05:13 1.2
+++ tests/pr87.test 2001/01/26 14:17:36
@@ -27,7 +27,7 @@
 EOF
 
 # Fail gracefully if no autoconf.
-(autoconf --version) > /dev/null 2>&1 || exit 0
+$needs_autoconf
 
 # Likewise for gcc.
 (gcc -v) > /dev/null 2>&1 || exit 0
@@ -41,7 +41,7 @@
 # We use gcc and not gcc -traditional as the latter fails on some
 # Linux boxes (Red Hat 5.1 in particular).
 $ACLOCAL \
-   && autoconf \
+   && $AUTOCONF \
    && $AUTOMAKE -a \
    && cd build \
    && CC='gcc' ../configure \
Index: tests/pr9.test
===================================================================
RCS file: /cvs/automake/automake/tests/pr9.test,v
retrieving revision 1.2
diff -u -u -r1.2 pr9.test
--- tests/pr9.test 1999/12/27 07:40:32 1.2
+++ tests/pr9.test 2001/01/26 14:17:36
@@ -20,14 +20,14 @@
 mkdir support
 
 # Fail gracefully if no autoconf.
-(autoconf --version) > /dev/null 2>&1 || exit 0
+$needs_autoconf
 
 # Likewise for gzip.
 (gzip --version) > /dev/null 2>&1 || exit 0
 
 $ACLOCAL || exit 1
 
-autoconf || exit 1
+$AUTOCONF || exit 1
 $AUTOMAKE -a -c || exit 1
 ./configure || exit 1
 $MAKE || exit 1
Index: tests/subobj3.test
===================================================================
RCS file: /cvs/automake/automake/tests/subobj3.test,v
retrieving revision 1.4
diff -u -u -r1.4 subobj3.test
--- tests/subobj3.test 2000/05/01 21:03:23 1.4
+++ tests/subobj3.test 2001/01/26 14:17:36
@@ -37,7 +37,7 @@
 END
 
 # Fail gracefully if no autoconf.
-(autoconf --version) > /dev/null 2>&1 || exit 0
+$needs_autoconf
 
 # Likewise for gcc.
 (gcc -v) > /dev/null 2>&1 || exit 0
@@ -45,7 +45,7 @@
 # We use gcc and not gcc -traditional as the latter fails on some
 # Linux boxes (Red Hat 5.1 in particular).
 $ACLOCAL \
-   && autoconf \
+   && $AUTOCONF \
    && $AUTOMAKE -a \
    && CC='gcc' ./configure \
    && $MAKE ANSI2KNR=./ansi2knr U=_ \
Index: tests/target-cflags.test
===================================================================
RCS file: /cvs/automake/automake/tests/target-cflags.test,v
retrieving revision 1.1
diff -u -u -r1.1 target-cflags.test
--- tests/target-cflags.test 2000/02/02 04:29:02 1.1
+++ tests/target-cflags.test 2001/01/26 14:17:36
@@ -38,13 +38,13 @@
 END
 
 # Fail gracefully if no autoconf.
-(autoconf --version) > /dev/null 2>&1 || exit 0
+$needs_autoconf
 
 # Likewise for gcc.
 (gcc -v) > /dev/null 2>&1 || exit 0
 
 $ACLOCAL \
-   && autoconf \
+   && $AUTOCONF \
    && $AUTOMAKE -a \
    && mkdir obj \
    && (cd obj && ../configure && $MAKE && ./foo && ./bar) \



reply via email to

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