Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] pkg-generic: substitute colon and space out of PKG_VERSION
@ 2015-04-22 21:24 Arnout Vandecappelle
  2015-04-22 21:28 ` Thomas Petazzoni
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Arnout Vandecappelle @ 2015-04-22 21:24 UTC (permalink / raw)
  To: buildroot

Using a colon or a space in a make target doesn't work, so they have to
be filtered out of the PKG_VERSION variable just like the / currently
already is.

This will be needed for date-based CVS versions.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Yann E. MORIN <yann.morin.1998@free.fr>
---
 package/pkg-generic.mk | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk
index d1a1811..eeccf5b 100644
--- a/package/pkg-generic.mk
+++ b/package/pkg-generic.mk
@@ -322,17 +322,19 @@ $(2)_RAWNAME			=  $$(patsubst host-%,%,$(1))
 # sanitize the package version that is used in paths, directory and file names.
 # Forward slashes may appear in the package's version when pointing to a
 # version control system branch or tag, for example remotes/origin/1_10_stable.
+# Similar for spaces and colons (:) that may appear in date-based revisions for
+# CVS.
 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
 
 $(2)_BASE_NAME	=  $(1)-$$($(2)_VERSION)
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2015-04-25  8:27 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-22 21:24 [Buildroot] [PATCH] pkg-generic: substitute colon and space out of PKG_VERSION Arnout Vandecappelle
2015-04-22 21:28 ` Thomas Petazzoni
2015-04-22 21:39 ` Yann E. MORIN
2015-04-22 22:44 ` Arnout Vandecappelle
2015-04-22 23:08 ` Arnout Vandecappelle
2015-04-25  8:27   ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox