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: Nick Bowler
Subject: Re: excluding intermediate flex test suite files from distribution?
Date: Fri, 13 Nov 2015 11:43:45 -0500

On 11/12/15, Will Estes <address@hidden> wrote:
> On Thursday, 12 November 2015,  9:41 pm +0000, Gavin Smith
> <address@hidden> wrote:
>> On 12 November 2015 at 19:19, Will Estes <address@hidden> wrote:
>> > and Makefile.am:
>> >
>> > check_PROGRAMS = test
>> >
>> > test_SOURCES = test.l
>> > nodist_test_SOURCES = test.c
[...]
>> I'd guess that nodit_test_SOURCES = test.c is wrong, because of this:
>>
>> "You should never explicitly mention the intermediate (C or C++) file
>> in any SOURCES variable; only list the source file."
>>
>> http://www.gnu.org/software/automake/manual/html_node/Yacc-and-Lex.html
>>
>> I changed Makefile.am to
>>
>> check_PROGRAMS = test
>>
>> nodist_test_SOURCES = test.l
>> #nodist_test_SOURCES = test.c
[...]
>> I guess that's not what you want, because test.l isn't distributed there.
>>
>> Following Nick's suggestion to use dist-hook, the following appeared
>> to give good results:
>>
>> check_PROGRAMS = test
>>
>> test_SOURCES = test.l
>>
>> dist-hook:
>>         rm -f ${distdir}/test.c
>>
>> With that, test.l is distributed but test.c isn't.
>>
>
> Thanks. That does what I'm looking for and I can scale that up to the entire
> test suite with a bit of effort.

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.

My original suggestion was to try something like this (not tested):

  EXTRA_DIST =

  nodist_test_SOURCES = test.l
  EXTRA_DIST += $(nodist_test_SOURCES)

Cheers,
  Nick



reply via email to

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