`cmake.rb` is probably the best example of something similar.