Tilman Sauerbeck [2006-08-06 21:25]: > The bigger problem is the following. What if there's another task that > defines some properties that are to be used in my_ext_task.link_libs > for example? > > link_libs is set up in the block that's passed to ExtensionTask.new, but > at that point, the other task that defines these properties isn't run > yet (even if the order in which the tasks are run is correct). > > Is there some good way around this problem? This isn't a question > specific to ExtensionTask, but a general one.
Solved.
The following code shows how to fix that problem:
ext_task = nil
# this one goes first, so pre_ext is the very first prerequisite for the
# ext task
task :ext => [:pre_ext]
task :pre_ext do
ext_task.more_properties = ...
end
ext_task = ExtensionTask.new :ext do |t|
# just the minimal setup here
t.dir = "ext"
t.lib_name = ...
end
Regards,
Tilman
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
pgp2P2e5njirX.pgp
Description: PGP signature
_______________________________________________ Rake-devel mailing list [email protected] http://rubyforge.org/mailman/listinfo/rake-devel
