Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2000:
[Freeciv-Dev] Re: BUILT_SOURCES (PR#501)
Home

[Freeciv-Dev] Re: BUILT_SOURCES (PR#501)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx, bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: BUILT_SOURCES (PR#501)
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Thu, 10 Aug 2000 11:52:38 +1000 (EST)

On 10 Aug 2000 gs234@xxxxxxxxx (Gaute (B) Strokkenes) wrote:
> David Pfitzner <dwp@xxxxxxxxxxxxxx> writes:

> > > Well, from my reading of the sources I thought that these files had to
> > > be rebuilt whenever packets.c is changed.

(To be precise, packets.h rather than packets.c)

> > Yes - manually.  Well, whenever you add a new send_packet_* function,
> > which is not that often.

> > >  I thought that this was
> > > probably just an oversight.  Adding them to BUILT_SOURCES would ensure
> > > that this happens automagically whenever packets.c is changed.
> > 
> > I have trouble believing this - unless you also give automake some
> > hints on how to build them!  Eg, how and when to run create_lsend.pl, 
> > and how to know if the user has perl, etc.  That is, changing more 
> > than just BUILT_SOURCES.  No doubt one _could_ do all this, but I 
> > didn't consider it worth the work in this case.
> 
> Well, someone appears to have done most of the work for you.  From
> aclocal.m4 in GNU fileutils:

Another complication I was wondering about was modifing 
create_lsend.pl so it uses the right path for #! (or
various workarounds).

Also automake info for "Built sources" says:

:    Note that, in some cases, `BUILT_SOURCES' will work in somewhat
: surprising ways.  In order to get the built sources to work with
: automatic dependency tracking, the `Makefile' must depend on
: `$(BUILT_SOURCES)'.  This can cause these sources to be rebuilt at what
: might seem like funny times.

This is a concern as it would be rather bad for packets_lsend.h 
to be regenerated unnecessarily, since many source files end up 
depending on it via packets.h

> Apart from that you'd need a target for packets_lsend.[ch], which
> ought not to be a lot of trouble.
> 
> Off course, if the sort of change that would necessitate recreating
> these files is pretty rare, then it's probably not worth it.

Exactly.  And I'm pretty sure that most cases when you really
need an update compilation will fail if you haven't done so, 
due to not finding required lsend_packet_foo(), or wrong function
parameters, etc.

>  Would a
> patch that adds comments to that effect in Makefile.am etc. be
> welcome?

Sure.  Maybe in packets.h too.  Actually some overall documentation
about making protocol changes (including adding/changing packets, 
adding event types, using capability strings, etc) would be good, 
probably a section in freeciv_hackers_guide.txt

-- David



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