[Buildroot] [PATCH] pkg-generic: substitute colon and space out of PKG_VERSION
Thomas Petazzoni
thomas.petazzoni at free-electrons.com
Wed Apr 22 21:28:42 UTC 2015
Dear Arnout Vandecappelle (Essensium/Mind),
On Wed, 22 Apr 2015 23:24:27 +0200, Arnout Vandecappelle
(Essensium/Mind) wrote:
> ifndef $(2)_VERSION
> ifdef $(3)_VERSION
> $(2)_DL_VERSION := $$(strip $$($(3)_VERSION))
> - $(2)_VERSION := $$(subst /,_,$$(strip $$($(3)_VERSION)))
> + $(2)_VERSION := $$(subst $(space),_,$$(subst :,_,$$(subst /,_,$$(strip $$($(3)_VERSION)))))
> else
> $(2)_VERSION = undefined
> $(2)_DL_VERSION = undefined
> endif
> else
> $(2)_DL_VERSION := $$(strip $$($(2)_VERSION))
> - $(2)_VERSION := $$(strip $$(subst /,_,$$($(2)_VERSION)))
> + $(2)_VERSION := $$(subst $$(space),_,$$(subst :,_,$$(subst /,_,$$(strip $$($(2)_VERSION)))))
> endif
Since this code is now a bit more complicated, maybe we should have a
function in pkg-utils.mk for this?
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
More information about the buildroot
mailing list