Skip to content

Conversation

@samsinsane
Copy link
Member

What does this PR do?

Updated gmake and gmakelegacy generators so that GCC dependency flags come from the toolset.

How does this PR change Premake's behavior?

gmake and gmakelegacy will no longer emit the GCC dependency flag. GCC and Clang emit it. This may cause issues for modules that add new C and C++ toolsets and don't return the GCC/Clang cppflags.

Anything else we should know?

N/A.

Did you check all the boxes?

  • Focus on a single fix or feature; remove any unrelated formatting or code changes
  • Add unit tests showing fix or feature works; all tests pass
  • Mention any related issues (put closes #XXXX in comment to auto-close issue when PR is merged)
  • Follow our coding conventions
  • Minimize the number of commits
  • Align documentation to your changes

You can now support Premake on our OpenCollective. Your contributions help us spend more time responding to requests like these!

local flags = config.mapFlags(cfg, gcc.cppflags)

-- Request that dependencies be written out
table.insert(flags, '-MF "$(@:%.o=%.d)"')
Copy link
Contributor

@Jarod42 Jarod42 Sep 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't $(@:%.o=%.d) Makefile specific? :-(

In premake-ninja, we hard code the rule with -MF $out.d

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, overlooked that. Thanks for pointing that out, going to close this, need to come up with a different approach.

@samsinsane samsinsane closed this Sep 17, 2025
@samsinsane samsinsane deleted the ssurtees/gmake_dependency_flag branch September 17, 2025 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants