build: extend menu with few ubifs options
[openwrt/svn-archive/archive.git] / include / version.mk
1 #
2 # Copyright (C) 2012 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 # Substituted by SDK, do not remove
9 # REVISION:=x
10
11 PKG_CONFIG_DEPENDS += \
12 CONFIG_VERSION_NUMBER \
13 CONFIG_VERSION_NICK \
14 CONFIG_VERSION_REPO \
15 CONFIG_VERSION_DIST
16
17 VERSION_NUMBER:=$(call qstrip,$(CONFIG_VERSION_NUMBER))
18 VERSION_NUMBER:=$(if $(VERSION_NUMBER),$(VERSION_NUMBER),$(REVISION))
19
20 VERSION_CODE:=$(call qstrip,$(CONFIG_VERSION_NUMBER))
21 VERSION_CODE:=$(if $(VERSION_CODE),$(VERSION_CODE),Bleeding Edge)
22
23 VERSION_NICK:=$(call qstrip,$(CONFIG_VERSION_NICK))
24 VERSION_NICK:=$(if $(VERSION_NICK),$(VERSION_NICK),$(RELEASE))
25
26 VERSION_REPO:=$(call qstrip,$(CONFIG_VERSION_REPO))
27 VERSION_REPO:=$(if $(VERSION_REPO),$(VERSION_REPO),http://downloads.openwrt.org/snapshots/trunk/%T/packages)
28
29 VERSION_DIST:=$(call qstrip,$(CONFIG_VERSION_DIST))
30 VERSION_DIST:=$(if $(VERSION_DIST),$(VERSION_DIST),OpenWrt)
31
32 VERSION_SED:=$(SED) 's,%U,$(VERSION_REPO),g' \
33 -e 's,%V,$(VERSION_NUMBER),g' \
34 -e 's,%v,\L$(subst $(space),_,$(VERSION_NUMBER)),g' \
35 -e 's,%C,$(VERSION_CODE),g' \
36 -e 's,%c,\L$(subst $(space),_,$(VERSION_CODE)),g' \
37 -e 's,%N,$(VERSION_NICK),g' \
38 -e 's,%n,\L$(subst $(space),_,$(VERSION_NICK)),g' \
39 -e 's,%D,$(VERSION_DIST),g' \
40 -e 's,%d,\L$(subst $(space),_,$(VERSION_DIST)),g' \
41 -e 's,%R,$(REVISION),g' \
42 -e 's,%T,$(BOARD),g' \
43 -e 's,%S,$(BOARD)/$(if $(SUBTARGET),$(SUBTARGET),generic),g' \