From: Brock Rycenga Date: 2008-10-23T00:55:58+09:00 Subject: Re: Rake: How do I Override Var's Used by a Rule? This is really starting to feel like I am having a conversation with myself... Even if this is the correct way to do this, it would be really nice to know how to override var's from the command line. For example, with make, I could do the following: make -f mymakefile OPT1="new_val" OPT2="over_new_val" mytarget This would override value for OPT1 and OPT2 in the makefile. Is there something equivalent in rake? Thanks, B Brock Rycenga wrote: > > As usual, right after I finally decide to post something to a forum, I > trip over an answer myself. I found that this seems to do the trick. > > task :release_build do > C_OPTIMIZE_LVL="-o2" > C_DEBUG="" > Rake::Task[:debug_build].invoke > end > > Is this a good way to do this? Is there a better one? Should I just stop > asking questions and move on? > > > > Thanks, > B -- Posted via http://www.ruby-forum.com/.