Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalize, test, and make constant $BuildRoot after loading scripts #95

Closed
nightroman opened this issue Oct 31, 2017 · 1 comment
Closed

Comments

@nightroman
Copy link
Owner

$BuildRoot is one of the special build variables. It tells to set this
directory current before invoking various build blocks, tasks in the first
place. By default, it is the directory of a build script. Unlike other special
variables, it can be changed by a script in order to use not default/standard
locations (e.g. when a script is in a subdirectory of the project directory).

Currently, IB does not do anything with potentially changed value. It may be a
missing directory, not a directory, or an invalid path. This may result in not
clear errors later. Or it may be a valid directory path but not normalized,
e.g. with \.. in it. The latter will work but this is not quite right.

TODO:

(1) After loading a build script IB should resolve and normalize the path of
$BuildRoot and test that the directory exists.

(2) After the above changes, it looks wise to make this variable constant in
order to protect it from accidental further changes. The build root may be
changed by the top level script code, once and for all.

@nightroman
Copy link
Owner Author

Custom build roots are especially useful when builds are defined by script
blocks, not as usual build scripts, see #78.

Unlike build scripts, blocks do not have own natural build roots because they
are not files in some directories. Their conventional build roots come from the
calling scripts. This is not always what builds require, so use of custom build
roots is especially important for script block builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant