[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FYI: tests depends on ./defs
From: |
Alexandre Duret-Lutz |
Subject: |
Re: FYI: tests depends on ./defs |
Date: |
Tue, 10 Sep 2002 10:54:03 +0200 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-debian-linux-gnu) |
Hi Raja!
>>> "Raja" == Raja R Harinath <address@hidden> writes:
[...]
>> +$(TESTS): defs
Raja> I'd prefer
Raja> check_SCRIPTS = defs
Raja> as a somewhat cleaner way of expressing this.
You didn't say why :)
I'm not overly fond of hiding dependencies to make: the more
make knows about dependencies, the more reliable the build is.
For instance consider people running test cases with
make TESTS='foo.test bar.test' check-TESTS
That's not an uncommon invocation when your make implementation
doesn't forward macro assignments to sub-make. (Granted,
env TESTS='foo.test bar.test' SHELL=/bin/sh make -e check
is certainly a more general solution.)
Hmmm... I'm just realizing that (*_SOURCES variables omitted):
check_PROGRAMS = foo
check_LIBRARIES = libbar.a
TESTS = bar.test foo.test
would be more accurately written with additional dependencies
check_PROGRAMS = foo
check_LIBRARIES = libbar.a
TESTS = bar.test foo.test
foo.test: foo
bar.test: libbar.a
which in turn could be written as
EXTRA_PROGRAMS = foo
EXTRA_LIBRARIES = libbar.a
TESTS = bar.test foo.test
foo.test: foo
bar.test: libbar.a
with the added benefit that `foo' and `libbar.a' can be built in
parallel. (This parallelization is impossible with the check_
targets which are run serially.) Seems like I will update a few
Makefile.ams of mine :)
--
Alexandre Duret-Lutz