automake
[Top][All Lists]
Advanced

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

Re: setting $VERSION at runtime


From: Daniel Reed
Subject: Re: setting $VERSION at runtime
Date: Mon, 23 Jan 2006 17:54:58 -0500 (EST)

On Mon, 23 Jan 2006, Brian Dessent wrote:
Is there any way of setting this value of VERSION for the "dist" rule at
runtime?

For posting development snapshots, I use:

snapshottime = `date +%Y-%m-%d-%H%M`
snap: README
        echo "#define NAIM_SNAPSHOT \"-${snapshottime} (development snapshot)\"" 
> ${top_srcdir}/src/snapshot.h
        make distcheck distdir=$(PACKAGE)-$(VERSION)-${snapshottime}

release: README
        echo "#define NAIM_SNAPSHOT \"\"" > ${top_srcdir}/src/snapshot.h
        make distcheck



You should be able to use sed or some such to populate a Makefile.am variable similarly, perhaps like:

realversion=`grep '$Revision $' < ${top_srcdir}/ChangeLog | sed s/.../`
snap: ChangeLog
        make dist distdir=${PACKAGE}-${realversion}


./configure --help will still display the version as being 0 (or whatever dummy value you specify in configure.ac), but everything else should behave sanely.

--
Daniel Reed <address@hidden>      http://shell.n.ml.org/n/        
http://naim.n.ml.org/
What makes a man great? A man may be great in his aims, or in his
achievements, or in both, but I think that man is truly great who makes
the world his debtor... who does something for the world which the world
needs and which nobody before him has done or known how to do. -- Rupert
Gould [Longitude]




reply via email to

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