bug-gnulib
[Top][All Lists]
Advanced

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

Re: $(EXEEXT) in TESTS required?


From: Simon Josefsson
Subject: Re: $(EXEEXT) in TESTS required?
Date: Thu, 19 Jan 2006 10:50:43 +0100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

Ralf Wildenhues <address@hidden> writes:

> Hi Simon,
>
> * Simon Josefsson wrote on Thu, Jan 19, 2006 at 09:42:17AM CET:
>>
>> It doesn't seem to matter if I change noinst_PROGRAMS into
>> check_PROGRAMS, I still have to add $(EXEEXT) to the binaries in TESTS
>> for things to work.
>> 
>> TESTS += test-gc
>> check_PROGRAMS = test-gc
>> 
>> =>
>> 
>> make[2]: Entering directory `/home/jas/src/gsasl/lib/tests'
>> i586-mingw32msvc-gcc -g -O2    test-gc.c   -o test-gc
>> test-gc.c:26:16: gc.h: No such file or directory
>
> I can't reconstruct that (from non-mingw tests).  Which Automake version
> is this?  Which Automake options are in effect?

You need mingw to provoke the bug, it only happens if $(EXEEXT) is
needed.  The reasons is that the makefile contain:

test-gc$(EXEEXT): $(test_gc_OBJECTS) $(test_gc_DEPENDENCIES) 
        @rm -f test-gc$(EXEEXT)
        $(LINK) $(test_gc_LDFLAGS) $(test_gc_OBJECTS) $(test_gc_LDADD) $(LIBS)

So if TESTS only contain test-gc, that rule won't be invoked.

Using latest gnulib CVS below, where the module file look like:

TESTS += test-gc$(EXEEXT)
check_PROGRAMS += test-gc

After this successful test, I include the log from where $(EXEEXT) is
not present.

address@hidden:~/src/gnulib$ rm -rf /tmp/testdir/;./gnulib-tool 
--create-testdir --dir=/tmp/testdir --with-tests gc-tests
Module list with included dependencies:
  gc
  gc-tests
  havelib
  restrict
File list:
  build-aux/config.rpath
  lib/dummy.c
  lib/gc-gnulib.c
  lib/gc-libgcrypt.c
  lib/gc.h
  m4/gc.m4
  m4/lib-ld.m4
  m4/lib-link.m4
  m4/lib-prefix.m4
  m4/onceonly_2_57.m4
  m4/restrict.m4
  tests/test-gc.c
executing autoreconf --force --install
/usr/share/aclocal/xdelta.m4:7: warning: underquoted definition of 
AM_PATH_XDELTA
  run info '(automake)Extending aclocal'
  or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
/usr/share/aclocal/oaf.m4:4: warning: underquoted definition of AM_PATH_OAF
/usr/share/aclocal/libart.m4:11: warning: underquoted definition of 
AM_PATH_LIBART
/usr/share/aclocal/glib.m4:8: warning: underquoted definition of AM_PATH_GLIB
/usr/share/aclocal/gconf-1.m4:4: warning: underquoted definition of 
AM_PATH_GCONF
/usr/share/aclocal/gconf-1.m4:71: warning: underquoted definition of 
AM_GCONF_SOURCE
/usr/share/aclocal/xdelta.m4:7: warning: underquoted definition of 
AM_PATH_XDELTA
  run info '(automake)Extending aclocal'
  or see http://sources.redhat.com/automake/automake.html#Extending-aclocal
/usr/share/aclocal/oaf.m4:4: warning: underquoted definition of AM_PATH_OAF
/usr/share/aclocal/libart.m4:11: warning: underquoted definition of 
AM_PATH_LIBART
/usr/share/aclocal/glib.m4:8: warning: underquoted definition of AM_PATH_GLIB
/usr/share/aclocal/gconf-1.m4:4: warning: underquoted definition of 
AM_PATH_GCONF
/usr/share/aclocal/gconf-1.m4:71: warning: underquoted definition of 
AM_GCONF_SOURCE
configure.ac: installing `../build-aux/install-sh'
configure.ac: installing `../build-aux/missing'
configure.ac:14: installing `../build-aux/config.guess'
configure.ac:14: installing `../build-aux/config.sub'
Makefile.am: installing `../build-aux/depcomp'
address@hidden:~/src/gnulib$ cd /tmp/testdir/
address@hidden:/tmp/testdir$ ./configure --host=i586-mingw32msvc
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for i586-mingw32msvc-strip... i586-mingw32msvc-strip
checking for i586-mingw32msvc-gcc... i586-mingw32msvc-gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether i586-mingw32msvc-gcc accepts -g... yes
checking for i586-mingw32msvc-gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of i586-mingw32msvc-gcc... gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... (cached) yes
checking for i586-mingw32msvc-ranlib... i586-mingw32msvc-ranlib
checking build system type... i686-pc-linux-gnu
checking host system type... i586-pc-mingw32msvc
checking for ld used by GCC... /usr/i586-mingw32msvc/bin/ld
checking if the linker (/usr/i586-mingw32msvc/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking device with (strong) random data...... /dev/random
checking device with pseudo random data...... /dev/urandom
checking device with unpredictable data for nonces...... /dev/urandom
checking for /dev/random... yes
checking for /dev/urandom... yes
checking for /dev/urandom... (cached) yes
checking for C/C++ restrict keyword... __restrict
configure: creating ./config.status
config.status: creating Makefile
config.status: creating lib/Makefile
config.status: creating m4/Makefile
config.status: creating config.h
config.status: executing depfiles commands
configure: configuring in tests
configure: running /bin/sh './configure' --prefix=/usr/local  
'--host=i586-mingw32msvc' 'host_alias=i586-mingw32msvc' --cache-file=/dev/null 
--srcdir=.
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for i586-mingw32msvc-strip... i586-mingw32msvc-strip
checking for i586-mingw32msvc-gcc... i586-mingw32msvc-gcc
checking for C compiler default output file name... a.exe
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... .exe
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether i586-mingw32msvc-gcc accepts -g... yes
checking for i586-mingw32msvc-gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of i586-mingw32msvc-gcc... gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking whether make sets $(MAKE)... (cached) yes
checking for i586-mingw32msvc-ranlib... i586-mingw32msvc-ranlib
checking build system type... i686-pc-linux-gnu
checking host system type... i586-pc-mingw32msvc
checking for ld used by GCC... /usr/i586-mingw32msvc/bin/ld
checking if the linker (/usr/i586-mingw32msvc/bin/ld) is GNU ld... yes
checking for shared library run path origin... done
checking device with (strong) random data...... /dev/random
checking device with pseudo random data...... /dev/urandom
checking device with unpredictable data for nonces...... /dev/urandom
checking for /dev/random... yes
checking for /dev/urandom... yes
checking for /dev/urandom... (cached) yes
checking for C/C++ restrict keyword... __restrict
configure: creating ./config.status
config.status: creating Makefile
config.status: creating config.h
config.status: executing depfiles commands
address@hidden:/tmp/testdir$ make check
Making check in lib
make[1]: Entering directory `/tmp/testdir/lib'
make  check-am
make[2]: Entering directory `/tmp/testdir/lib'
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I. -I. -I..     -g -O2 -c dummy.c
i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I. -I. -I..     -g -O2 -c gc-gnulib.c
rm -f libgnu.a
ar cru libgnu.a dummy.o gc-gnulib.o
i586-mingw32msvc-ranlib libgnu.a
make[2]: Leaving directory `/tmp/testdir/lib'
make[1]: Leaving directory `/tmp/testdir/lib'
Making check in m4
make[1]: Entering directory `/tmp/testdir/m4'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory `/tmp/testdir/m4'
Making check in tests
make[1]: Entering directory `/tmp/testdir/tests'
make  check-recursive
make[2]: Entering directory `/tmp/testdir/tests'
make[3]: Entering directory `/tmp/testdir/tests'
make  test-gc.exe
make[4]: Entering directory `/tmp/testdir/tests'
if i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I. -I. -I.  -I. -I. -I.. -I./.. 
-I../lib -I./../lib   -g -O2 -MT test-gc.o -MD -MP -MF ".deps/test-gc.Tpo" -c 
-o test-gc.o test-gc.c; \
        then mv -f ".deps/test-gc.Tpo" ".deps/test-gc.Po"; else rm -f 
".deps/test-gc.Tpo"; exit 1; fi
i586-mingw32msvc-gcc  -g -O2   -o test-gc.exe  test-gc.o ../lib/libgnu.a
make[4]: Leaving directory `/tmp/testdir/tests'
make  check-TESTS
make[4]: Entering directory `/tmp/testdir/tests'
Wine exited with a successful status
PASS: test-gc.exe
==================
All 1 tests passed
==================
make[4]: Leaving directory `/tmp/testdir/tests'
make[3]: Leaving directory `/tmp/testdir/tests'
make[2]: Leaving directory `/tmp/testdir/tests'
make[1]: Leaving directory `/tmp/testdir/tests'
make[1]: Entering directory `/tmp/testdir'
make[1]: Nothing to be done for `check-am'.
make[1]: Leaving directory `/tmp/testdir'
address@hidden:/tmp/testdir$ automake --version
automake (GNU automake) 1.9.6
Written by Tom Tromey <address@hidden>.

Copyright 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
address@hidden:/tmp/testdir$

Now, I remove $(EXEEXT) from tests/Makefile.am.

address@hidden:/tmp/testdir$ make check
Making check in lib
make[1]: Entering directory `/tmp/testdir/lib'
make  check-am
make[2]: Entering directory `/tmp/testdir/lib'
make[2]: Nothing to be done for `check-am'.
make[2]: Leaving directory `/tmp/testdir/lib'
make[1]: Leaving directory `/tmp/testdir/lib'
Making check in m4
make[1]: Entering directory `/tmp/testdir/m4'
make[1]: Nothing to be done for `check'.
make[1]: Leaving directory `/tmp/testdir/m4'
Making check in tests
make[1]: Entering directory `/tmp/testdir/tests'
 cd . && /bin/sh /tmp/testdir/build-aux/missing --run automake-1.9 --foreign  
Makefile
 cd . && /bin/sh ./config.status Makefile depfiles
config.status: creating Makefile
config.status: executing depfiles commands
make[1]: Leaving directory `/tmp/testdir/tests'
make[1]: Entering directory `/tmp/testdir/tests'
make  check-recursive
make[2]: Entering directory `/tmp/testdir/tests'
make[3]: Entering directory `/tmp/testdir/tests'
make  test-gc.exe
make[4]: Entering directory `/tmp/testdir/tests'
make[4]: `test-gc.exe' is up to date.
make[4]: Leaving directory `/tmp/testdir/tests'
make  check-TESTS
make[4]: Entering directory `/tmp/testdir/tests'
i586-mingw32msvc-gcc -g -O2    test-gc.c   -o test-gc
test-gc.c:26:16: gc.h: No such file or directory
test-gc.c: In function `main':
test-gc.c:31: error: `Gc_rc' undeclared (first use in this function)
test-gc.c:31: error: (Each undeclared identifier is reported only once
test-gc.c:31: error: for each function it appears in.)
test-gc.c:31: error: syntax error before "rc"
test-gc.c:34: error: `rc' undeclared (first use in this function)
test-gc.c:35: error: `GC_OK' undeclared (first use in this function)
make[4]: *** [test-gc] Error 1
make[4]: Leaving directory `/tmp/testdir/tests'
make[3]: *** [check-am] Error 2
make[3]: Leaving directory `/tmp/testdir/tests'
make[2]: *** [check-recursive] Error 1
make[2]: Leaving directory `/tmp/testdir/tests'
make[1]: *** [check] Error 2
make[1]: Leaving directory `/tmp/testdir/tests'
make: *** [check-recursive] Error 1
address@hidden:/tmp/testdir$




reply via email to

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