Skip to contentSkip to conversation

core: add a 'make version' rule

PATCH New Yann E. MORIN 3 participants 4 messages Oct 27, 2015 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 core: add a 'make version' rule

We often ask people for the version they are using when they ask for help (either on the list or on IRC). Some of them do not even know which version they are using.

Add a make rule to dump the full version string.

---
 Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Makefile +5 -1
index 853d185..3cf0c0c 100644
@@ -88,10 +88,14 @@ DATE := $(shell date +%Y%m%d)
 # Need to export it, so it can be got from environment in children (eg. mconf)
 export BR2_VERSION_FULL := $(BR2_VERSION)$(shell $(TOPDIR)/support/scripts/setlocalversion)
 
+.PHONY: version
+version:
+	@echo $(BR2_VERSION_FULL)
+
 noconfig_targets := menuconfig nconfig gconfig xconfig config oldconfig randconfig \
 	defconfig %_defconfig allyesconfig allnoconfig silentoldconfig release \
 	randpackageconfig allyespackageconfig allnopackageconfig \
-	print-version olddefconfig
+	print-version olddefconfig version
 
 # Some global targets do not trigger a build, but are used to collect
 # metadata, or do various checks. When such targets are triggered,
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 core: add a 'make version' rule

Dear Yann E. MORIN,

Quoted 7 lines · Yann E. MORIN

We often ask people for the version they are using when they ask for help (either on the list or on IRC). Some of them do not even know which version they are using.

Add a make rule to dump the full version string.

$ make version
2015.11-git-00809-g13578ba

Regards,

Vincent.

#2 lore raw

PATCH 1/1 core: add a 'make version' rule

In reply to Yann E. MORIN
Quoted 5 lines · Yann E. MORIN

We often ask people for the version they are using when they ask for help (either on the list or on IRC). Some of them do not even know which version they are using.

Add a make rule to dump the full version string.

Anything wrong with 'make print-version'? :-)

I already marked it as rejected.

Regards,
Arnout

Quoted 28 lines
---
 Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
Makefile +5 -1
index 853d185..3cf0c0c 100644
@@ -88,10 +88,14 @@ DATE := $(shell date +%Y%m%d)
 # Need to export it, so it can be got from environment in children (eg. mconf)
 export BR2_VERSION_FULL := $(BR2_VERSION)$(shell $(TOPDIR)/support/scripts/setlocalversion)
 
+.PHONY: version
+version:
+	@echo $(BR2_VERSION_FULL)
+
 noconfig_targets := menuconfig nconfig gconfig xconfig config oldconfig randconfig \
 	defconfig %_defconfig allyesconfig allnoconfig silentoldconfig release \
 	randpackageconfig allyespackageconfig allnopackageconfig \
-	print-version olddefconfig
+	print-version olddefconfig version
 
 # Some global targets do not trigger a build, but are used to collect
 # metadata, or do various checks. When such targets are triggered,
Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#3 lore raw

PATCH 1/1 core: add a 'make version' rule

Arnout, All,

On 2015-10-27 20:06 +0100, Arnout Vandecappelle spake thusly:

Quoted 8 lines · Yann E. MORIN
Quoted 5 lines

We often ask people for the version they are using when they ask for help (either on the list or on IRC). Some of them do not even know which version they are using.

Add a make rule to dump the full version string.

Anything wrong with 'make print-version'? :-)

Damned. :-)

Quoted 1 line

I already marked it as rejected.

Thanks. Sorry for the noise... :-/

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'