require 'fileutils'

require 'mxx_ru/cpp'

module ACE_wrappers

module Paths
  WRAPPERS_DIRNAME = 'ACE_wrappers'
  RELATIVE_ACE_ROOT = "ace/#{WRAPPERS_DIRNAME}"

  def full_ace_root_name
    File.join(
        File.expand_path( File.dirname( __FILE__ ) ),
        WRAPPERS_DIRNAME )
  end

  def from_relative_ace_root( path )
    File.join( RELATIVE_ACE_ROOT, path )
  end

  def do_in_ace_subdir( &blk )
    FileUtils.cd(
      File.join( full_ace_root_name, 'ace' ) ) { blk.call }
  end

end # module Paths

end # module ACE_wrappers

# vim:ts=2:sts=2:sw=2:expandtab

