[Top][All Lists]

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

Possible bug in check-local

From: John Calcote
Subject: Possible bug in check-local
Date: Mon, 16 Jun 2008 13:15:15 -0600
User-agent: Thunderbird (X11/20080226)

Hash: SHA1

Hi list,

I think I've found a defect in check-local functionality. I was trying
to implement an extension to Automake wherein CSharp (Mono) sources
could be built using a file. Here's a simplified version of
my file:

- -----------------
xfcs_sources = ...
cstest_sources = ...

CLEANFILES = xfcs.dll xfcs.xml cstest_script cstest.exe

TESTS = cstest_script

all-local: xfcs.dll

check-local: cstest.exe cstest_script

xfcs.dll: $(xfcs_sources)

cstest.exe: xfcs.dll $(cstest_sources)

        echo "#!/bin/sh" > cstest_script
        echo "mono cstest.exe" >> cstest_script
        chmod 0755 cstest_script

- -----------------

The problem here is that the generated Makefile tries to execute the
test script (cstest_script) BEFORE building the check-local targets.
Here's the relevant section of the generated Makefile:

- -----------------
check-TESTS: $(TESTS)
        ... (run all $(TESTS), etc)

check-am: all-am
        $(MAKE) $(AM_MAKEFLAGS) check-TESTS check-local

check: check-am
- -----------------

As you can see from this snippet, check depends on check-am, which
depends on all-am, but NOT on check-local. Once all non-check targets
are built, then the command for check-am recursively calls $(MAKE). The
problem, as I see it, is that it tries to target check-TESTS first, and
THEN check-local.

Now, since the very definition of the check target (and by implication,
the check-local target) is to build tests required for TESTS, it seems
that either the order should be reversed in the sub-make targets, (eg.,
$(MAKE) ... check-local check-TESTS), or check-local should be a
dependency of check-am (after all-am, of course).

I can work around my problem by either building my local checks in
all-local and then simply not installing them, or by making my check
executable a dependency of the cstest_script target. But both of these
seem wrong to me. Should check-local be built before TESTS are built and


Version: GnuPG v2.0.4-svn0 (GNU/Linux)
Comment: Using GnuPG with SUSE -


reply via email to

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