On Sep 6, 2008, at 2:21 AM, Ittay Dror wrote:

in make, if in my Makefile I have
FOO = 1
FOO += 2
test:
 echo $(FOO)

then running:
> make
1 2
> make FOO=3
3

That is, if passed in the command line, any assignments to FOO are ignored. In Makefile, this can be changed by using the 'override' method. It is not that important, just an idiom that people coming from Make expect. Obviously, Rakefile being Ruby this sort of behavior can be done.


I think if I had to do this, I would use an idiom like:

 ENV['FOO'] ||= 1

I really don't have control over how ruby variables are assigned. I'm not sure how to do it in rake for any arbitrary variable.

--
-- Jim Weirich
-- [EMAIL PROTECTED]

_______________________________________________
Rake-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rake-devel

Reply via email to