[Top][All Lists]

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

Re: [bug-gnulib] uniform #serial number for M4 macros, and `aclocal --in

From: James Youngman
Subject: Re: [bug-gnulib] uniform #serial number for M4 macros, and `aclocal --install'
Date: Wed, 2 Feb 2005 00:02:59 +0000
User-agent: Mutt/1.3.28i

On Tue, Feb 01, 2005 at 09:49:36PM +0100, Alexandre Duret-Lutz wrote:

> |      When this option is used, `aclocal' will also honor `#serial
> |      NUMBER' lines that appear in macros: an M4 file is ignored if
> |      there exists another M4 file with the same basename and a greater
> |      serial number in the search path.

That seems clear.


> |      #serial NNN
> | 
> | where NNN contains only digits and dots.  It should appear in the M4
> | file before any macro definition.  It is a good practice to maintain a
> | serial number for each macro you distribute, even if you do not use the
> | `--install' option of `aclocal': this allows other people to use it.

A serial number for each macro or for each M4 file?  I think the
difference is important.  From other things in this excerpt it is
clear to me that "each M4 file" is meant.  It might be a good idea to
be very clear about the distinction in the documentation.

> It allows version-like strings such as `1.2.3' because I saw CVS
> libtool was using one, and I find it to be the only practical
> way to handle branches and forks.

I suspect that this is not a practical way to handle branches either.
If there are two versions of a source base which are forked from a
common ancestor, one might have the serial "" and the other
might have the serial "".  If I am working with the package
which has the "1.2" fork, I would want to prefer "" over
"", because it is on the same fork.  I'd also prefer it over
"", as that is on my fork but older.

I am not suggesting that Automake be changed to "understand" what fork
I am on, I'm suggesting that it probably shouldn't be expected to.  If
you fork a macro in such a way as to materially affect what it does
and how it should be used, a name change is probably a good idea.

If I have one file "setup.m4" which contains only the macro
"foo_SETUP" and another file elsewhere also called "sertup.m4" which
contains only the macro "bar_SETUP", would this have worked
historically.  Would it have worked historically if only the 'bar' one
contains a serial number?  Now, if the 'foo' file has a #serial line
inserted into it, will this stop the 'bar' package from working?

> Otherwise, what syntax would you suggest aclocal use?
> The current proposal to cope with libtool is to assume that the
> serial number is the second word, and ignore anything past that.
> # serial NNN ANYTHING

That seems sensible to me.  As you indicate, I think that the line
should match something like


That is, the NNN part should contain only numbers or dots, not start
with a dot, and be followed by either whitespace followed by anything,
or optional whitespace followed by newline.

Will this behaviour be switchable on a per-system basis?  I'm thinking
about people who work with old code but keep up to date with system
software patches.


reply via email to

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