lejeczek via users wrote:
It actually might be working. What I was doing I was looking for a
confirmation like this:
$ ps -FC rpmbuild --cols 9999
UID PID PPID C SZ RSS PSR STIME TTY TIME CMD
appmgr 24855 24835 0 44512 6772 16 17:33 pts/0 00:00:00 rpmbuild
--define "_MKL 1" --define "_mic 1"
waiting to see those quotation marks(single or double) in there, but.. it
turns out that it works actually when ps is not showing them, like:
$ ps -FC rpmbuild --cols 9999
UID PID PPID C SZ RSS PSR STIME TTY TIME CMD
appmgr 24855 24835 0 44512 6772 16 17:33 pts/0 00:00:00 rpmbuild
--define _MKL 1 --define _mic 1
Ahh, yes. There's a level of quoting needed by the shell,
which is removed when the command is executed and shows up
in ps.
and then vars(in a bash script, all in such a script) are simply
declared:
...
export _definition1='_MKL 1'
rpmbuild --define "${_definition1}" --define "${_definition2}"
without! any escaping of quotes.
It's not clear how you're using these macros, but if you're
toggling settings, the %bcond_with and %bcond_without
options may be useful. Then you can enable/disable using
--with and --without on the rpmbuild command line.
http://rpm.org/user_doc/conditional_builds.html
--
Todd
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Experience is the worst teacher: it gives the test before presenting
the lesson.
-- Vernon Law