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

Add possibility to refer to parent directory from a subdirectory located target #38

Open
ethouris opened this issue Nov 6, 2024 · 0 comments

Comments

@ethouris
Copy link
Owner

ethouris commented Nov 6, 2024

Same as a target X can refer to another target D/Y, which is located in D subdirectory, it should be also possible that a target defined in a subdirectory refer to a target located in a parent directory. Like this:

ag Y -depends ../X

It can be also limited to a requirement that the parent directory must be first declared by ag-subdir. This directory will still be treated special way, and most likely the call to an underlying in-directory target from parent project must give that project access to the parent's database, however not "out of the box" because it must be first appropriately adjusted so that it's properly understood by the in-directory project.

The idea of subdirectories - in contradiction to CMake - is that you can go to a subdirectory and issue agmake to just compile things inside this directory, without touching anything inside the other, sibling directories and without the need to start from the toplevel directory anyway. So, the only things that must be done in case when you have a dependency on a project from an upper level directory is to go to this upper level directory, make sure that the target is built, and then expect that the target can be used as a dependency. No other target than this exactly target and possibly its dependencies must be built out of all targets defined in the upper level directory..

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

No branches or pull requests

1 participant