premake / premake/premake-core

many:1 rules

Open
#1,004 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
3.6k
Forks
654
Avg merge
1d 1h
Merged PRs (30d)
13

Description

So I'm thinking on a way to express a custom build rule that represents a many:1 input:output relationship.
Custom rules currently map sourcefile->outputfile as 1:1, by executing the commandlines on each input file.
Consider the linker pattern though by contrast, which accepts all obj files and outputs a single exe... I have encountered numerous cases where I want a custom rule to accept all input files of the input file type at once, and then emit a single output by a single invocation of the build tool.
Custom rules should be able to express this.

I can easily think of lots of moderately hideous tweaks to rule where I could contort premake to understand this configuration, but I put this out there to others to get fresh perspectives...

If you were approaching this problem, how would you naturally plan to solve it? I don't want to pollute your thoughts with my own ideas (which I don't really like).

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue does not name files, tests, or entry points. Start by locating the existing custom-rule mapping and linker handling, then determine how a rule could accept all inputs of a type and emit one output in a single invocation; done means the behavior and configuration are defined clearly enough to implement and test.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, lua
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.