Mathieu Gervais wrote:
> 
> Hi,
> 
> My project (http://siphon.sourceforge.net) is using glade, but we are having
> difficulties getting the right makefile magic to handle the .glade file.
> That is, we store the .glade file in our CVS, and whenever needed we
> regenerate the files from the .glade. The problem is that because it contain
> actual code written by us (i.e. not glade-generated only), we also have to
> store callbacks.c in the CVS repository. I don't really remember why, but we
> are also storing callbacks.h. Now, whenever the glade file has changed, the
> casllbacks file (.c & .h) gets regeneraeted, but alas I always end up with
> duplicate definitions (in .c) and prototypes (.h) of the newer callbacks.
> 
> I tried all sort of tricks but I am not a makefile magician, so I ask, does
> anybody have an idea what are the magical makefile lines (or Makefile.am for
> that matter) to enable regenerating files from .glade file without getting
> into problems. This must be in conjonction with the .glade & callbacks.[ch]
> files being stored & retrieved from a CVS repository.

When Glade updates the source code, it compares the last modification time
of the interface.c file with the last modification time of each of the signal
handlers added in Glade. It only appends the signal handler if it was added or
modified after interface.c was last written.

Your problem may be reduced by storing interface.c in CVS. Currently Glade is
assuming that the source code has not been generated before, so it outputs
all the signal handlers. Though I'm not sure how CVS handles last modification
times of files, so I don't know how well that will work.


Eventually we need to use a different mechanism in Glade, such as parsing C
files. Using last modification times is never going to be 100% reliable -
different machines often have different clock times, and just using NFS may
cause problems.

Damon



_______________________________________________
Glade-devel maillist  -  [EMAIL PROTECTED]
http://lists.helixcode.com/mailman/listinfo/glade-devel

Reply via email to