bug-automake
[Top][All Lists]
Advanced

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

bug#9242: distcheck fails when having TEST in sub-directory


From: Stefano Lattarini
Subject: bug#9242: distcheck fails when having TEST in sub-directory
Date: Fri, 5 Aug 2011 12:22:08 +0200
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

On Thursday 04 August 2011, Peter Johansson wrote:
> Hello automakers,
>
Hi Peter.

> I have a non-recursive Makefile.am but keep the tests in sub-directory named
> test. Surprisingly distcheck fails for me with this set up, which to me
> seems to be caused by some VPATH issue.
>
Nope, you've forgotten to tell automake to ditribute your test scripts.
See below.

> Below is a trimmed down test case that fails for me with
> 
> make  check-TESTS
> make[2]: *** No rule to make target `test/foo.test', needed by
> `check-TESTS'.  Stop.
> make[1]: *** [check-am] Error 2
> make: *** [distcheck] Error 1
> 
> 
> cat > configure.ac <<EOF
> AC_INIT([foo], [1])
> AM_INIT_AUTOMAKE([foreign])
> AC_CONFIG_FILES([Makefile])
> AC_OUTPUT
> EOF
> 
> cat > Makefile.am <<EOF
> TEST_EXTENSIONS = .test
>
JFTR: this line is useless for two orthogonal reasons:

  1. you're not using the `parallel-tests' option anywhere, thus
     $(TEST_EXTENSIONS) is never used nor considered (and many other
     nifty features are lost too IMHO);

  2. even if you add `parallel-tests' to AUTOMAKE_OPTIONS, `.test'
     is in the default value of $(TEST_EXTENSIONS) anyway, so there
     is no need to add it explicitly (note that adding it is not
     wrong, only redundant).

> TESTS = test/foo.test
> EOF
> 
You've forgotten to add $(TESTS) to $(EXTRA_DIST) here:

  EXTRA_DIST = $(TESTS)

If you add the above line to your Makefile.am (both the reduced one
and the original one), does you problem disappear?  If yes, I'll
close this bug report.

> mkdir -p test
> cat > test/foo.test <<EOF
> echo hello world
> exit 0
> EOF
> chmod 755 test/foo.test
> 
> autoreconf -ivf
> ./configure
> make all
> make check
> make distcheck
> 
> Is this a bug or am I doing something wrong?
> 
> I'm using Automake 1.11.1
> 
> Thanks,
> Peter
> 

HTH,
  Stefano





reply via email to

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