Skip to content

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

@ethouris

Description

@ethouris

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..

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions