On Sat, 12 Feb 2011 10:37:11 +0100
Wolfgang Denk <[email protected]> wrote:

> -             @( printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' 
> "$(U_BOOT_VERSION)" \
> -              '$(shell $(TOPDIR)/tools/setlocalversion $(TOPDIR))' ) > [email protected]
> +             @( localvers='$(shell $(TOPDIR)/tools/setlocalversion 
> $(TOPDIR))' ; \
> +                printf '#define PLAIN_VERSION "%s%s"\n' \
> +                     "$(U_BOOT_VERSION)" "$${localvers}" ; \
> +                printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' \
> +                     "$(U_BOOT_VERSION)" "$${localvers}" ; \
> +             ) > [email protected]

IMO, PLAIN_VERSION isn't descriptive enough (should really be called
VERSION..?).  How about going with something like:

#define U_BOOT_STR "U-Boot"
#define U_BOOT_VERSION U_BOOT_STR " %s%s"...

and then

> +                     case 'V':
> +                             printf("mkimage version %s\n", PLAIN_VERSION);
> +                             exit(EXIT_SUCCESS);

&U_BOOT_VERSION[sizeof(U_BOOT_STR)]

(the - 1 is not necessary since we want to include the ' ')

this maintains consistency and the fact that the mkimage version is
directly tied to it's parent project, U-Boot's, version number.

Kim

_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to