Skip to content

feature: abbreviated qualified path to phony targets #133

Description

@jhwoodyatt

In my day job, we are using Bazel for software construction. (It's a living, shrug.)

One thing Bazel offers that I miss when I'm using OMake is the hierarchical structure of target names, and I've been thinking about what it would take to extend OMake to be more like Bazel in this regard. I think I've got an idea...

OMake today has .PHONY targets that are almost but not quite the right thing. To make them more friendly, it would be nice if there were a bit of reserved syntax for targets that expanded automatically to hierarchical "phony target" names in the same way that Bazel target names have a hierarchical structure.

I don't have a strong preference for a specific proposal for how that syntax would work, but I could throw one up if it would help:

  • Command line target arguments that begin with ^/ would have the ^ replaced with /.PHONY. Example: $ omake ^/foo/bar/baz at the root directory would be equivalent to $ (cd foo/bar && omake baz).
  • Command line target that have a suffix that starts with : would have the part of the suffix following the : interpreted as a regular expression that matches targets in the /.PHONY/ namespace corresponding to their relative location. Example: $ omake ':test-.+' would invoke all the phony targets in the current subdirectory tree that match the test-.+ regex.

One could also imagine some logic that provide for handling the combination of both the above the rules in a way that would seem familiar to Bazel users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions