[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: $(EXEEXT) in TESTS required?
From: |
Ralf Wildenhues |
Subject: |
Re: $(EXEEXT) in TESTS required? |
Date: |
Thu, 19 Jan 2006 20:39:02 +0100 |
User-agent: |
Mutt/1.5.9i |
[ Cc:ing bug-automake; this is
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/5240 ]
Hi Simon,
* Simon Josefsson wrote on Thu, Jan 19, 2006 at 10:50:43AM CET:
> Ralf Wildenhues <address@hidden> writes:
> > * 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.
> >> 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,
Not quite. You need to cross-compile to MinGW on a non-.exe system to
provoke the bug.
> 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.
Automake outputs rules like this when it encounters check_PROGRAMS:
| check-am: all-am
| $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
| $(MAKE) $(AM_MAKEFLAGS) check-TESTS
The first rule builds test-gc.exe, and both Cygwin and MinGW are
designed so that the target `test-gc' is satisfied by the file
`test-gc.exe', so the second rule will not fail.
*snip test with `TESTS = test-gc$(EXEEXT)'*
> Now, I remove $(EXEEXT) from tests/Makefile.am.
You should also `make clean' before this:
> address@hidden:/tmp/testdir$ make check
then you could see that test-gc.exe is successfully rebuilt before this
error is encountered:
> Making check in lib
*snip*
> 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
Now I wonder how to best "fix" this in Automake:
- document the fact that $(EXEEXT) should be used in `TESTS', for the
benefit of cross-compilation,
- have Automake rewrite TESTS to add $(EXEEXT) where appropriate (is
this possible in all cases?),
- simply document the fact that checking in the cross-compile setup
won't work.
I dislike the last one, using wine here looks like a nice solution to
me. The second one looks like it could also allow Automake to get rid
of the
$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
rule completely, given that rewriting is possible.
Cheers,
Ralf
- $(EXEEXT) in TESTS required?, Simon Josefsson, 2006/01/18
- Re: $(EXEEXT) in TESTS required?, Simon Josefsson, 2006/01/18
- Re: $(EXEEXT) in TESTS required?, Ralf Wildenhues, 2006/01/18
- Re: $(EXEEXT) in TESTS required?, Simon Josefsson, 2006/01/19
- Re: $(EXEEXT) in TESTS required?, Simon Josefsson, 2006/01/19
- Re: $(EXEEXT) in TESTS required?, Ralf Wildenhues, 2006/01/19
- Re: $(EXEEXT) in TESTS required?, Simon Josefsson, 2006/01/19
- Re: $(EXEEXT) in TESTS required?,
Ralf Wildenhues <=
- Re: $(EXEEXT) in TESTS required?, Simon Josefsson, 2006/01/20
- Re: $(EXEEXT) in TESTS required?, Alexandre Duret-Lutz, 2006/01/29
- Re: $(EXEEXT) in TESTS required?, Simon Josefsson, 2006/01/30
- Re: $(EXEEXT) in TESTS required?, Ralf Wildenhues, 2006/01/30
- Re: $(EXEEXT) in TESTS required?, Simon Josefsson, 2006/01/30
- Re: $(EXEEXT) in TESTS required?, Bruno Haible, 2006/01/23
- Re: $(EXEEXT) in TESTS required?, Ralf Wildenhues, 2006/01/24
- Re: $(EXEEXT) in TESTS required?, Bruno Haible, 2006/01/24
- Re: $(EXEEXT) in TESTS required?, Ralf Corsepius, 2006/01/25
- Re: $(EXEEXT) in TESTS required?, Simon Josefsson, 2006/01/24