1

I'm creating a buildroot package for xmms2 which uses waf build system. For the configuration step I need to pass the parameters based on the config selection. Actually it's one parameter which has comma separated values. It should look like this:

--with-optionals medialib-updater,s4

I don't see the way to generate that value. Here is what tried:

################################################################################
#
# xmms2
#
################################################################################

XMMS2_VERSION = c081011ddc280908678709d1e80f7ec57efa7b82
XMMS2_SITE = https://github.com/Gamadril/xmms2-devel
XMMS2_SITE_METHOD = git
XMMS2_GIT_SUBMODULES = YES

XMMS2_LICENSE = LGPL-2.1
XMMS2_LICENSE_FILES = COPYING

XMMS2_INSTALL_STAGING = YES

XMMS2_CONF_OPTS = --with-optionals medialib-updater 

ifeq ($(BR2_PACKAGE_XMMS2_DB_S4),y)
XMMS2_CONF_OPTS += ,s4 
endif

$(eval $(waf-package))

The result is: --with-optionals medialib-updater ,s4 - with a space between. How to get rid of that space? So actually how to concatenate some strings with a separator?

Luca Ceresoli
  • 1,591
  • 8
  • 19
Gamadril
  • 907
  • 14
  • 32

1 Answers1

2

In make, the += operator always adds a space. You can append without space by using expansion:

XMMS2_CONF_OPTS := "$(XMMS2_CONF_OPTS),s4"
Luca Ceresoli
  • 1,591
  • 8
  • 19