'Best' way of adding quoted string options to Makefile/pkgtools.conf?

Wayne Sierke ws+freebsd-questions at au.dyndns.ws
Tue Dec 30 09:18:38 PST 2003


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



More information about the freebsd-questions mailing list