[Top][All Lists]

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

Re: Automatic set-serial?

From: Peter Simons
Subject: Re: Automatic set-serial?
Date: Thu, 06 Jan 2011 20:42:14 +0100

Hi Reuben,

 > Is there any need to change, or can the line:
 >        $(top_srcdir)/ $(distdir)/m4/*.m4;
 > just be added to the $(STAGEDIR)/%.m4 target in

IMHO, what we're trying to do can be accomplished best in For
every macro in the archive, the "maintainer-all" target ...

 - reads the macro from m4/*.m4 (using the parser in,

 - writes a pretty-printed version of that macro to stage/*.m4, and

 - aborts if those two files differ.

This scheme ensures that files in the m4/ directory all look the same in
terms of word-wrapping boundaries, indention, etc. Now, the parser in can easily determine the proper #serial number the macro ought
to have and insert it into the pretty-printed output. If that number
differs from the one contained in the input file, then maintainer-all
will abort with an error.

I'll make the necessary modifications to the python code. It's probably
not going to be difficult, I just dread it a little because that code is
quite messy.

 > To make the git hook work well, would it be worth putting the code
 > under the $(STAGEDIR)/%.m4 target in a separate file, which can also
 > be used for the git-receive hook?

I'm not sure whether I understand correctly what exactly that hook is
going to do. Apparently, the hook script receives a list of SHA1 hashes
on standard input, each of which refers to a newly received revision
(and its predecessor). Using those, we can git-cat-file every macro in
each of those revisions, right? Now, what we'd have to do is to
determine the number of commits to that file, and ensure that the file
contains a matching #serial number. If not, we'll do "exit 1". Does that
sound okay?

If things are really that simple, then I believe that there won't be
much of a chance to share code.

 > I've submitted a support request on Savannah to ask how we set up the hook.

Great, thank you for taking care of that. Now all we need is for the
Savannah guys to actually respond. :-)

Take care,

reply via email to

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