automake
[Top][All Lists]
Advanced

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

Re: excluding intermediate flex test suite files from distribution?


From: Will Estes
Subject: Re: excluding intermediate flex test suite files from distribution?
Date: Thu, 12 Nov 2015 14:19:54 -0500
User-agent: Mutt/1.5.23 (2014-03-12)

On Thursday, 12 November 2015,  1:55 pm -0500, Nick Bowler <address@hidden> 
wrote:

> Hello,
> 
> On 2015-11-12, Will Estes <address@hidden> wrote:
> > The flex program includes a test suite to enable testing of the version of
> > flex built in the flex tree. From a distributed tar ball (made with "make
> > dist"), it is possible to build flex without needing to have flex already
> > installed because automake includes the intermediate files in the
> > distribution.
> >
> > However, the test suite should not include the intermediate .c (and c++)
> > files because the point of the test suite is to test the flex binary built
> > in the tree, so that binary should build the intermediate .c (and c++)
> > files.
> >
> > How do I do this? I've been playing with it and have not been able to come
> > up with a solution. At most, I'm able to not include some generated header
> > files, which then really confuses the test suite in the generated tar ball.
> >
> > What other information / examples can I provide to make this clear?
> 
> If you can provide a (short!) example Makefile.am, members of this list
> may be able to suggest specific changes.
> 
> The Automake manual has a chapter on how the distribution is built[1].
> 
> A possible solution (not sure if it will work for you, you may have to
> experiment a bit):
> 
>   - Prevent Automake from distributing any of the testsuite-related
>     flex source files (should be achievable using nodist_).
>   - Manually include only the files you actually want, e.g., by using
>     EXTRA_DIST.

See the attached files: test.l (dummy scanner, really) and a stub of 
configure.ac and Makefile.am that reproduce what I think should work.

Inlined for convenience of those reading as well:

test.l:
%%

configure.ac
AC_INIT([distribute flex without intermediate c files], 0.0.1, address@hidden, 
basketcase)
AC_CONFIG_SRCDIR([test.l])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([foreign parallel-tests ])
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_CC
AM_PROG_CC_C_O

AM_PROG_LEX

AC_CONFIG_FILES(
Makefile)

AC_OUTPUT

and Makefile.am:

check_PROGRAMS = test

test_SOURCES = test.l
nodist_test_SOURCES = test.c

I had to manually create the m4/ directory, but then:

autoreconf -if && ./configure && make && make dist

produces a tar ball with test.c in it. despite the nodist_test_SOURCES line.

So what am I missing?


> 
> Using a dist-hook may be helpful if EXTRA_DIST is not expressive enough.
> 
> [1] https://gnu.org/software/automake/manual/automake.html#Dist
> 
> Cheers,
>   Nick
> 

-- 
Will Estes
address@hidden

Attachment: configure.ac
Description: Text document

Attachment: test.l
Description: Text document

Attachment: Makefile.am
Description: Text document


reply via email to

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