diff mbox

core: add a 'make version' rule

Message ID 1445956167-11122-1-git-send-email-yann.morin.1998@free.fr
State Rejected
Headers show

Commit Message

Yann E. MORIN Oct. 27, 2015, 2:29 p.m. UTC
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.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Peter Korsgaard <jacmet@uclibc.org>
---
 Makefile | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

Comments

Vicente Olivert Riera Oct. 27, 2015, 2:34 p.m. UTC | #1
Dear Yann E. MORIN,

On 10/27/2015 02:29 PM, Yann E. MORIN wrote:
> 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.
> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>

$ make version
2015.11-git-00809-g13578ba

Regards,

Vincent.
Arnout Vandecappelle Oct. 27, 2015, 7:06 p.m. UTC | #2
On 27-10-15 15:29, Yann E. MORIN wrote:
> 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

> 
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Peter Korsgaard <jacmet@uclibc.org>
> ---
>  Makefile | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index 853d185..3cf0c0c 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -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,
>
Yann E. MORIN Oct. 27, 2015, 7:18 p.m. UTC | #3
Arnout, All,

On 2015-10-27 20:06 +0100, Arnout Vandecappelle spake thusly:
> On 27-10-15 15:29, Yann E. MORIN wrote:
> > 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. :-)

>  I already marked it as rejected.

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

Regards,
Yann E. MORIN.
diff mbox

Patch

diff --git a/Makefile b/Makefile
index 853d185..3cf0c0c 100644
--- a/Makefile
+++ b/Makefile
@@ -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,