[nycbug-talk] Undefining a variable set in make.conf
Marc Spitzer
mspitzer
Wed Aug 31 00:01:35 EDT 2005
On 8/30/05, Scott Robbins <scottro at nyc.rr.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> This question came up on bsdforums, and none of the obvious answers seem
> to work. I'm sure I'm missing something in either ports or make's man
> pages, but I can't figure it out.
>
> Here's the situation. The OP has WITH_RUBY defined in /etc/make.conf
>
> Now, he wants to build /usr/ports/devel/subversion. Its makefile has
> an if defined WITH_RUBY line.
from the make man page:
-E variable
Specify a variable whose environment value (if any) will override
macro assignments within makefiles.
-e Specify that environment values override macro assignments within
makefiles for all variables.
and
-V variable
Print make's idea of the value of variable, in the global con-
text. Do not build any targets. Multiple instances of this
option may be specified; the variables will be printed one per
line, with a blank line for each null or undefined variable.
-X When using the -V option to print the values of variables, do not
recursively expand the values.
for debuging
That should give you the mechanics for testing and over ridding the defaults
Now on to the bugs/krap in the makefile:
this:
.if defined(WITH_RUBY)
shoud be this:
.if (defined(WITH_RUBY) && (WITH_RUBY == "YES"))
or even better:
.if (defined(WITH_SUBVERSION_RUBY) && (WITH_SUBVERSION_RUBY == "YES"))
file a bugreport, feel free to send in a patch also
and my make is very rusty so there might be a syntax issue.
if he added the second half you could override the global setting with
a -D or -e or -E by setting the var to no
plan B is to not use make.conf to set variables but to use the config
file for portinstall/portupgrade(can never remember the port name)
which allows you to set port options on a per port basis
marc
--
"We trained very hard, but it seemed that every time we were beginning to
form into teams we would be reorganized. I was to learn later in life that
we tend to meet any new situation by reorganizing, and a wonderful method it
can be for creating the illusion of progress, while producing confusion,
inefficiency and demoralization."
-Gaius Petronius, 1st Century AD
More information about the talk
mailing list