Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Dec 2003 03:53:06 +1030
From:      "Wayne Sierke" <ws+freebsd-questions@au.dyndns.ws>
To:        <freebsd-questions@freebsd.org>
Subject:   'Best' way of adding quoted string options to Makefile/pkgtools.conf?
Message-ID:  <KKEALCNDCMLKCEEMOEDLMEAPCAAA.ws%2Bfreebsd-questions@au.dyndns.ws>

next in thread | raw e-mail | index | archive | help
I was trying to add the following type of option to a port's Makefile:

--option='space delimited list'

(that's how it was indicated it should be presented in the port's
installation notes).

Not knowing the "correct" way to achieve it as a combination of
Makefile/pkgtools.conf entries I ended up with the following:-

In the port's Makefile I added something of the form:

.if defined(VAR)
CONFIGURE_ARGS+= --option="${VAR}"
.endif

and in /usr/local/etc/pkgtools.conf:

  MAKE_ARGS = {
    'category/portname' => [
      'VAR=\'space delimited list\'',
    ],
}

and I am hoping to solicit the opinions of those more experienced in these
matters as to whether they consider that to be the 'optimal' solution since
it was arrived at on my part after a multitude of somewhat random
combinations of single and double quotes, double-single quotes and
backslash-escaped quotes in both the Makefile and pkgtools.conf (it took a
while because I was intent on trying to match the single quotes around the
option arguemnt as was shown in the installation notes).


Thanks,

Wayne



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?KKEALCNDCMLKCEEMOEDLMEAPCAAA.ws%2Bfreebsd-questions>