nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] [patch] letting autoconf brand a build from SVN


From: Benno Schulenberg
Subject: Re: [Nano-devel] [patch] letting autoconf brand a build from SVN
Date: Tue, 07 Apr 2015 22:12:57 +0200

On Tue, Apr 7, 2015, at 17:35, Eitan Adler wrote:
> On 3 April 2015 at 07:02, Benno Schulenberg <address@hidden> wrote:
> > Now that the compile time has disappeared from the version string,
> > it would be nice if there were some other and better way to identify
> > a build from SVN.  The patch below achieves this for me, but surely
> > there are things wrong with it.  Mike, Kamil, Eitan, Jordi?  Is this
> > portable enough?  And what can be improved?
> 
> Overall this is a good idea.  I did not yet test the patch (my
> development computer has some issues).  It would be nice to support
> git-svn in addition to pure svn.

Yes, that would be cool.  If you could tell me how, because I've never
gotten around to running git on svn, as I'm quite used to svn.

> >         /* Add a space after the version message, and account for both
> >          * it and the two spaces before it. */
> > -       mvwaddnstr(topwin, 0, 2, PACKAGE_STRING,
> > -               actual_x(PACKAGE_STRING, verlen));
> > +       mvwaddnstr(topwin, 0, 2, BRANDING, actual_x(BRANDING, verlen));
> 
> I don't believe there is enough context here, but is verlen correct?

Further up:
    size_t verlen = strlenpt(PACKAGE_STRING) + 1;

And PACKAGE_STRING is normally "GNU nano x.y.z".
So, replacing that with "nano SVN xxxxM" should fit.
Then we have room for another 4800 revisions.

> > +AC_MSG_CHECKING([whether building from SVN])
> > +if test -d .svn ; then
> 
> ^this will only work if the cwd contains .svn.  I am uncertain if
> configure attempts to change directory to the repo root at start.
> I am concerned that something like
> 
> nano/configure or ../configure will miss this check.

Hm, yes.  But who will do that?  Because a subsequent make
will have to be done in the main dir of the source tree, and
if you have to be there anyway...

Also, the inclusion of the current version number (after an
svn up) will only work if you first touch configure.ac.  So
it's not foolproof, but on a fresh checkout and with the
fully standard ./configure && ... it will work.

Thanks for the remarks.

Benno

-- 
http://www.fastmail.com - A no graphics, no pop-ups email service




reply via email to

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