pub fn export_makefile(
session: &Session,
params: Option<&[Parameter]>,
) -> StringExpand description
Export a session as a Makefile.
Generates a Makefile with:
- Header comments (session name, date, command count)
- Make variable declarations when parameters are provided (
VAR ?= value) .PHONYtargets for each step- Tab-indented recipes with
cd && commandper target - Dollar sign escaping (
$→$$) - Annotations for failed commands
When params is Some, commands have auto-detected values replaced with
$(VAR) references and variable declarations are added before targets.
Each target runs independently with its own cd because
Makefile recipe lines each execute in a separate shell.
Empty sessions produce a valid Makefile with a “No commands recorded” note.