Ralf Wildenhues wrote: > * Bob Proulx wrote on Thu, Mar 01, 2007 at 05:37:56PM CET: > > With a use model more like this somewhat stylized example. > [...] > > ...modify code generator... > > make moreclean > > make > > Looks to me like if your generated code had proper dependencies you > would not need the 'moreclean' step. Is that observation correct? > If no, what am I missing? If yes, then let's see why you have not > (or can not?) describe the dependencies properly within a Makefile.am.
Do you normally write "proper dependencies" so that when yacc or lex is updated that targets using them become out of date? I don't see any such dependencies in automake generated Makefiles that I can see. Is that an additional step that is recommended when using .y or .l source files? Should the manual be updated to say that? (Obviously I am thinking that it is not and simply going with the topic for debate as written. :-) :-) Here would be what I think would be a minimum Makefile.am for discussion. Should this be sufficient? bin_PROGRAMS = foo foo_SOURCES = foo.l BUILT_SOURCES = foo.c EXTRA_DIST = $(BUILT_SOURCES) I was avoiding being too system specific by saying "modify code generator" but perhaps I should have been very specific to avoid this confusion. And I had both the flex case and a project local script generator too. It seemed to be rather of a generic problem. sudo apt-get install -q -y flex-old ./configure make make check sudo apt-get install -q -y flex make make check As far as I can tell an automake generated Makefile will not detect that I have changed versions of flex. Hence the desire for a clean target that would clean generated source when desired. But I don't think this is something that should be checked automatically for system dependency changes. I have previously worked with projects using 'mkmf' which *did* write in those dependencies on system things and overall it was more trouble than help. I don't want to suggest that. Things would be worse in that case. This is not a big deal. It was annoying me and so I was just wishing is all. Bob P.S. I actually don't like using yacc and lex too much these days because they are always so messy with regards to this and many other things. But some projects have them and the one I am working with has many of them.