File: subversion.mak

package info (click to toggle)
pidgin-microblog 0.3.0-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 420 kB
  • ctags: 559
  • sloc: ansic: 4,453; makefile: 179
file content (19 lines) | stat: -rw-r--r-- 482 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Quick makefile hack to update the sub-version number from the svn release
#
# Make sure that svn is installed.
SVN = $(shell which svn 2> /dev/null)
SUBV = \2

ifneq ($(strip $(SVN)),)
	SUBV = $(shell svn info 2>&1 | grep Revision | awk '{print "svn" $$2}')

subversion:
	-@sed -i 's/\(^SUBVERSION :=\)(.*)/\1 $(SUBV)/' version.mak
else
subversion:

endif

# For releases (and non-svn) we just strip the sub-version out
release:
	-@sed -i 's/\(^SUBVERSION :=\).*/\1/' version.mak