Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Add To MakefileNew to Visual Studio Code? Get it now.
Add To Makefile

Add To Makefile

Lukash2

|
11 installs
| (0) | Free
Right click on a file for insert relative path in Makefile
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

add-to-makefile

This is a Visual Studio Code extension that allows you to quickly add the relative path of a file to a src.list file by right-clicking on the file in the Explorer.

Features

  • Right-click to add file path: Simply right-click on any file in the Explorer and select "Add to Makefile" to add the relative path of the file to the src.list file.
  • Prevents duplicates: Before adding the file path, it checks if the path already exists in the src.list file to avoid duplicates.
  • Workspace support: The extension works within a workspace, ensuring that file paths are relative to the workspace folder.

Feature Example

Requirements

  • Visual Studio Code version 1.98.0 or later.
  • Node.js (if you're running this extension locally for development purposes).
  • Add this line in your Makefile: SRC = $(shell cat src.list)

Extension Settings

This extension does not add any specific settings to VS Code via the contributes.configuration extension point.

Known Issues

  • Currently, this extension only works with file paths, and won't work for directories or symbolic links.
  • If the src.list file is locked or in use, the extension might fail to write the file.

Release Notes

1.0.0

  • Initial release of the extension.
  • Allows adding file paths to src.list from the context menu in the Explorer.

1.0.1

  • Fixed an issue where the extension wouldn't create the src.list file if it didn't exist.

1.1.0

  • Added a check to prevent adding the same file path multiple times to src.list.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft