[Nut-upsuser] Belkin F6C1100-UNV

Peter Selinger selinger at mathstat.dal.ca
Wed May 23 04:28:42 UTC 2007


I am in favor of this. I have wanted this for some time, but was not
sure how best to do it. 

We also have to have a way to suppress the revision-stamp mechanism in
an actual distribution. In other words, SVN builds should have a
version number such as 2.1.0-r910, whereas builds from released
tarballs should have a proper version number such as 2.0.6. 

It would be best to include a boolean flag at the top of configure.in,
just after the AC_INIT version number, so that a maintainer who
generates a distribution will not forget to disable the revision-stamp
mechanism. What I have in mind is something like:

AC_INIT(nut, 2.1.0)            dnl Update this number to make a release
INCLUDE_SVN_REVISION=yes       dnl Change to "no" to make a release

and then change the call to AC_DEFINE_UNQUOTED(UPS_VERSION, ...) later
in configure.in.

Question: should this only work if the user re-runs ./configure after
an update, or should it work at the Makefile level? 

-- Peter

Eric S. Raymond wrote:
> 
> Charles Lepple <clepple at gmail.com>:
> > >To eliminate future confusion, I suggest that the driver's banner message
> > >should include the Subversion revision level it was built from.
> > 
> > Let us know if you have any pointers on how to do this in an
> > autoconf/automake-friendly way. Most times when I see something like
> > this, the code to update the revision is buried deep inside some
> > script or Makefile, or it only works from a fresh checkout.
> 
> As it happens, I solved this problem recently for another project I'm
> on, Battle For Wesnoth.  Here is the relevant Makefile.am code:
> 
> SVNREV = $(shell svnversion -n $(topdir) 2>/dev/null)
> CFLAGS += "-DSVNREV=\"$(SVNREV)\""
> 
> game_config.o: revision-stamp 
> 
> # Should be touched each time the SVN revision number goes up 
> revision-stamp: FORCE
> 	if [ x"$(SVNREV)" != x`cat revision-stamp 2>/dev/null` ]; then echo -n $(SVNREV) >revision-stamp; fi
> 
> FORCE:
> 
> The trick is in the way revision-stamp is generated,
> -- 
> 		<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
> 
> _______________________________________________
> Nut-upsuser mailing list
> Nut-upsuser at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/nut-upsuser
> 




More information about the Nut-upsuser mailing list