Created
July 25, 2017 13:15
-
-
Save doudou/99c88f21f3451ebed0574964baefb794 to your computer and use it in GitHub Desktop.
automatic setup of prefix and build dir in ~/.autoprojrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This code automatically splits prefix and build folders | |
# to match the directory layout under a root dev directory | |
# | |
# It is meant to be added in ~/.autoprojrc | |
# | |
# The autoproj bootstrap under #{dev_dir}/vanilla/rock-core | |
# will have its prefix in | |
# #{build_dir}/vanilla/rock-core/install | |
# | |
# and each package will have its build directory in | |
# #{build_dir}/vanilla/rock-core/name/of/package | |
dev_dir = File.join(Dir.home, 'dev') | |
if Autoproj.workspace.root_dir.start_with?(dev_dir + "/") | |
workspace_name = Pathname.new(Autoproj.workspace.root_dir). | |
relative_path_from(Pathname.new(dev_dir)).to_s | |
Autoproj.workspace.prefix_dir = File.join(dev_dir, 'build_area', workspace_name, 'install') | |
Autoproj.workspace.build_dir = File.join(dev_dir, 'build_area', workspace_name) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment