Skip to content

Is it possible to specify multiple targets from a single source? #373

@Stealthmate

Description

@Stealthmate

Basically I have a binary foo that generates 1.bar, 2.bar and 3.bar. So I wrote a rule

rule(/[1-3]\.bar/ => [ 'foo' ] do |t|
  sh "foo"
end

But if I rake something that needs all 3 outputs, foo gets executed 3 times. My problem is that foo is kind of slow, so executing it 3 times is annoying. Is there a way to make rake only run it once? If not, would it be possible to implement it?

I think the relevante Make concept is Grouped Targets.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions