Hi Paul,

On 10/21/19 7:29 AM, Paul Smith wrote:
> I can only assume that the rules in question are pattern rules.  If
> they were explicit rules then make would indeed give you a more clear
> declaration of which file is missing.

Actually, I'm quite sure that they are explicit rules. I will try to put
together a simple example to recreate the issue.

> Unfortunately I didn't really understand the process you're using.  Why
> do you need to write hundreds or thousands of makefiles?

I think the process I'm using is best understood by its requirement:
Pattern rules with multiple, named %'s. I call them blueprints and they
produce makefiles that give you the set of targets and recipes to create
complex prerequisites.

Think: A document will incorporate and thus depends on multiple versions
of the same source image with different aspect ratios. Those are
referenced as public/image/filename-[width]-[height].jpg (matching
src/filename.jpg and using [width] and [height] in their recipe) and
that path in turn matches against a blueprint to produce such a file.

Those rules, however, are very regular and it feels not that far removed
from pattern rules.

A fake syntax that is more make-like might look like this:

public/image/%filename%-%width%-%height%.jpg: src/%filename%.jpg
    mybin/magicaspectratio $< $(width) $(height) > $@

There is of course some overlap with regular variables - those "recipe
variables" are scoped only to the recipe. Maybe it'd make more sense to
have a syntax like $*(name) to match with the automatic $* stem variable.

Did that clarify my process?

best regards,
David


_______________________________________________
Help-make mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to