Discussion:
excluding intermediate flex test suite files from distribution?
Will Estes
2015-11-13 16:54:03 UTC
Permalink
This will probably work fine, but this has the potential problem that
test.c will be built every time you run 'make dist', just to be deleted
immediately. This may or may not be a concern for you, but the likely
consequence is that lex will be required to run 'make dist', even though
it would otherwise not be required.
It is unfortunate, yes, but since automake already pulls in a requirement to have a lex on the build system, I can live with the slow down / extra disk I/O.
EXTRA_DIST =
nodist_test_SOURCES = test.l
EXTRA_DIST += $(nodist_test_SOURCES)
Thanks for the reminder. I haven't tested this, but the dist-hook approach works beautifully, given that I'm ok with the build and then delete that happens.
Cheers,
Nick
--
Will Estes
***@gmail.com
Will Estes
2015-11-12 18:58:51 UTC
Permalink
Yeah, I'll work up a small example because the entire test suite is large and there's a lot of stuff that follows the same pattern.
Hello,
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
- 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.
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
***@gmail.com
Loading...