bajel icon indicating copy to clipboard operation
bajel copied to clipboard

Allow glob wildcard filename expansion for dependencies

Open gvwilson opened this issue 5 years ago • 1 comments

I would like to be able to write:

SOURCE: "**/index.md"

and then use SOURCE as a dependency (as per #26) and in commands:

output.html:
  deps:
  - $(SOURCE)
  exec: "transmogrify output.html $(SOURCE)"

gvwilson avatar Sep 24 '20 23:09 gvwilson

Working on a fix that does this, but with a slightly different syntax:

SOURCE: ["**/index.md"]

output.html:
  deps: $(SOURCE)
  exec: "transmogrify output.html $(SOURCE)"

The changes are:

  1. An array variable can be a glob, which gets expanded out into a larger array.
  2. The deps can be a reference to an array variable

I've got this basically working, but still need to figure out some corner cases.

eobrain avatar Oct 05 '20 05:10 eobrain