automake
[Top][All Lists]
Advanced

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

Re: flex/bison rebuilding issue


From: Reuben Hawkins
Subject: Re: flex/bison rebuilding issue
Date: Fri, 10 Sep 2010 07:11:46 -0700

On Fri, Sep 10, 2010 at 6:54 AM, Reuben Hawkins <address@hidden> wrote:
> On Thu, Sep 9, 2010 at 8:29 PM, Philip Herron <address@hidden> wrote:
>> On 10 September 2010 03:46, Reuben Hawkins <address@hidden> wrote:
>>> Attached is my Makefile.am.  My problem is editing scanner.l or
>>> grammar.y doesn't trigger a rebuild of my whole project when *I think*
>>> it should...  How do I set dependencies such that editing scanner.l or
>>> grammar.y will rebuild my whole parser?
>>>
>>
>> Hey there
>>
>> I use flex and bison alot with automake and yeah this isn't the right
>> forum to be asking about this since Makefile.am's are handled by
>> automake. But anyways if you edit your lexer, why do you need to
>> rebuild your whole thing? Its just like editing any .c file within a
>> project just rebuild it and then link it all together.
>>
>> Looking at your Makefile i don't understand why your doing alot of
>> stuff there, for what your doing there all you need is:
>>
>> bin_PROGRAMS = fixc
>> noinst_LTLIBRARIES = libparser.la
>>
>> AM_YFLAGS = -d --verbose
>>
>> fixc_SOURCES = \
>>        inc_parser.h \
>>        main.c
>>
>> fixc_LDADD = \
>>        libparser.la
>>
>> libparser_la_SOURCES = \
>>        grammar.y \
>>        parser.h \
>>        pure.h \
>>        scanner.l
>>
>> Having those extra hooks should be un-nessecary since ylwrap should
>> handle the outputs fine, and it should know if changed to re-generate
>> fine. I don't think making your parser as a shared library like that
>> is the right idea, for what your doing there what i would do is:
>>
>> bin_PROGRAMS = fixc
>> noinst_LIBRARIES = libparser.a
>>
>> AM_YFLAGS = -d --verbose
>>
>> fixc_SOURCES = \
>>        inc_parser.h \
>>        main.c
>>
>> fixc_LDADD = libparser.a
>>
>> libparser_a_CFLAGS =  -DPARSER
>> libparser_a_SOURCES = parser.y lexer.l
>>
>> I've found when dealing with lexer's and parsers in a large program
>> making those components into a static library is useful.
>>
>> --Phil
>>
>
> Hi Phil,
>
> Thanks for the reply.  I have some followup I'm going to post on
> Automake's mailing list...
>
> Thanks,
> Reuben
>

Hi Automake,

I found that I get the behavior I need when maintainer mode is
enabled.  That is, my who project rebuilds/relinks when I edit
scanner.l or grammar.y.  Can I get the same rebuilding/relinking
behavior when maintainer mode is disabled?  Everything should rebuilt
regardless of the maintainer mode setting when scanner.l or grammar.y
are edited.  I don't see why maintainer mode should change any source
level dependencies.  I'm using autoconf 2.65 and automake 1.11 and my
project is attached.

Thanks in advance,
Reuben

Attachment: bug.tgz
Description: GNU Zip compressed data


reply via email to

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