Makefile
makefile
Makefile adapter — detect and use Makefile targets.
detect_makefile_targets(project_path)
Detect available targets in a project's Makefile.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_path
|
Path
|
Root directory of the project. |
required |
Returns:
| Type | Description |
|---|---|
set[str]
|
Set of target names found in the Makefile. |
Source code in packages/axm-init/src/axm_init/adapters/makefile.py
get_tool_command(project_path, makefile_target, fallback_cmd)
Get the command to run a tool, preferring Makefile targets.
If the project has a Makefile with the specified target, uses make <target>.
Otherwise, returns the fallback command.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
project_path
|
Path
|
Root directory of the project. |
required |
makefile_target
|
str
|
Target name to look for in Makefile. |
required |
fallback_cmd
|
list[str]
|
Command to use if target not found. |
required |
Returns:
| Type | Description |
|---|---|
list[str]
|
Command list to execute. |