Skip to content

[Feature] Watch included Makefiles for configure-on-edit #819

Description

@KeroChen

Request Overview

When makefile.configureOnEdit is enabled, Makefile Tools should also watch files included by the main Makefile.

For example, if the main makefile contains:

include ./configure.mk

then editing and saving configure.mk should trigger a new Configure run, the same way editing the main makefile does.

Additional Information

Current behavior

Only changes to the main Makefile appear to trigger Configure. Changes to included files such as configure.mk do not trigger Configure, even though they may change important build variables, compiler definitions, linker flags, or selected build configurations.

Expected behavior

Makefile Tools should parse and watch included Makefile fragments, such as:

include ./configure.mk
-include ./local.mk
sinclude ./optional.mk

When any included file changes, Makefile Tools should trigger Configure if makefile.configureOnEdit is enabled.

Why this matters

Many projects keep user-editable build configuration in separate included files. For example:

include ./configure.mk

configure.mk may define options such as target chip, RTOS enable/disable, optimization level, linker script selection, feature flags, and library selection.

If Makefile Tools does not reconfigure after those files change, IntelliSense and build metadata can become stale until the user manually runs Clean Configure or edits the main Makefile.

Suggested behavior

  • Detect files included by the configured Makefile.
  • Add them to the configure-on-edit watch list.
  • Re-run Configure when one of those included files is modified.
  • Ideally support include, -include, and sinclude.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions