[Nut-upsuser] Belkin F6C1100-UNV

Eric S. Raymond esr at thyrsus.com
Wed May 23 01:21:21 UTC 2007


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>



More information about the Nut-upsuser mailing list