nano-devel
[Top][All Lists]
Advanced

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

Re: [Nano-devel] [PATCH] build: refresh the git description whenever som


From: Benno Schulenberg
Subject: Re: [Nano-devel] [PATCH] build: refresh the git description whenever something is rebuilt
Date: Fri, 20 May 2016 14:03:39 +0200

On Fri, May 20, 2016, at 13:52, Benno Schulenberg wrote:
> -AC_MSG_CHECKING([whether building from git])
> [...]  
> +GIT_DESCRIPTION = "\"$(shell git describe --tags 2>/dev/null)\""
> +
> +nano.o: revision.h
> +winio.o: revision.h
> +
> +revision.h: update_revision
> +     @[ -f $@ ] || touch $@
> +     @echo "#define REVISION $(GIT_DESCRIPTION)" | cmp -s $@ - || \
> +      echo "#define REVISION $(GIT_DESCRIPTION)" > $@
> +
> +.PHONY: update_revision

Currently, when you build from git and you want nano to show the
correct git commit id in the titlebar, you have to rerun ./configure
before running make.  That is annoying; a lone make should be enough.
The above patch achieves that.

However, it doesn't cover the case where the user isn't building from
git but from a tarball.  In this case it should produce an empty revision.h,
but I can't see how to do that -- I've run out of steam.

(https://savannah.gnu.org/bugs/?47962)

Benno

-- 
http://www.fastmail.com - Access all of your messages and folders
                          wherever you are




reply via email to

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