Skip to content

Conversation

@burgesQ
Copy link
Contributor

@burgesQ burgesQ commented Jun 24, 2025

Description

Old behavior use to parse the content of the invoked Makefile unit to define targets.

Such parsing didn't take into account targets from unit imported by the current (ex: targets defined in files imported such as import ./targets/help.mk).

New behavior pass the content of the Makefile unit post lexing (aka make -f Makefile -pn instead of the plain unit.

Related Issue(s)

No issue created but I could open one if needed

Motivation and Context

My makefiles unit heavily rely on the include keyword to DRY up my monorepo. As such, targets defined in included makefile unit arn't recognize by the makefile chroma.

Usage examples

How Has This Been Tested?

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • Bug fix (non-breaking change which fixes an issue)
  • Documentation change
  • New feature (non-breaking change which adds functionality)

Checklist:

  • All new and existing tests passed.
  • I have added tests to cover my changes.
  • I have updated the documentation accordingly.

Old behavior use to parse the content of the invoked `Makefile` unit
to define targets.

Such parsing didn't take into account targets from unit imported by the
current (ex: targets defined in files imported such as `import
./targets/help.mk`).

New behavior pass the content of the Makefile unit post lexing (aka
`make -f Makefile -pn` instead of the plain unit.
@pschmitt pschmitt merged commit dcee72b into zdharma-continuum:master Jun 25, 2025
1 check passed
burgesQ added a commit to burgesQ/fast-syntax-highlighting that referenced this pull request Jul 16, 2025
…um#81)

* fix(make): colorize targets from imported make-files

Old behavior use to parse the content of the invoked `Makefile` unit
to define targets.

Such parsing didn't take into account targets from unit imported by the
current (ex: targets defined in files imported such as `import
./targets/help.mk`).

New behavior pass the content of the Makefile unit post lexing (aka
`make -f Makefile -pn` instead of the plain unit.

* Update →chroma/-make.ch

---------

Co-authored-by: Philipp Schmitt <[email protected]>
@burgesQ burgesQ deleted the master-make branch July 16, 2025 10:30
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