[hipl-commit] [trunk] Rev 4213: Add version.h header that carries the current Bazaar revision number.

  • From: Diego Biurrun <diego@xxxxxxxxxx>
  • To: hipl-commit@xxxxxxxxxxxxx
  • Date: Fri, 9 Apr 2010 17:45:30 +0300

Committer: Diego Biurrun <diego@xxxxxxxxxx>
Date: 09/04/2010 at 17:45:30
Revision: 4213
Revision-id: diego@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Branch nick: trunk

Log:
  Add version.h header that carries the current Bazaar revision number.
  
  The header is automatically regenerated with every bzr update.

Modified:
  M  .bzrignore
  M  Makefile.am

=== modified file '.bzrignore'
--- .bzrignore  2010-04-08 17:53:18 +0000
+++ .bzrignore  2010-04-09 14:44:45 +0000
@@ -75,3 +75,4 @@
 tools/hipdnskeyparse
 tools/hipdnsproxy
 tools/pisacert
+version.h

=== modified file 'Makefile.am'
--- Makefile.am 2010-04-09 12:51:22 +0000
+++ Makefile.am 2010-04-09 14:44:45 +0000
@@ -483,4 +483,10 @@
 i3/i3/i3_config.lo lib/dht/libhipdhtxml.lo: CFLAGS += `xml2-config --cflags`
 lib/gui/%: CFLAGS += @GTK_CFLAGS@ -Wno-strict-prototypes
 
+# Ensure that version.h is created before everything else. This does not work
+# when creating specific objects that may depend on version.h directly.
+BUILT_SOURCES = version.h
+$(srcdir)/version.h: $(wildcard $(srcdir)/.bzr/branch/last-revision)
+       echo "#define BZR_REVISION \"$$(bzr revno $(srcdir))\"" > $@
+
 .PHONY: bin checkheaders deb doxygen increl olddeb rpm syncrepo

Other related posts:

  • » [hipl-commit] [trunk] Rev 4213: Add version.h header that carries the current Bazaar revision number. - Diego Biurrun