Skip to content

Makefile: support absolute VM_DIR paths (e.g. external SSD)#345

Open
Xplo8E wants to merge 1 commit into
Lakr233:mainfrom
Xplo8E:fix/vm-dir-absolute-path
Open

Makefile: support absolute VM_DIR paths (e.g. external SSD)#345
Xplo8E wants to merge 1 commit into
Lakr233:mainfrom
Xplo8E:fix/vm-dir-absolute-path

Conversation

@Xplo8E

@Xplo8E Xplo8E commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

The fw_patch* and restore_* targets built the VM directory argument as $(CURDIR)/$(VM_DIR), which assumes VM_DIR is relative to the repo. An absolute VM_DIR (e.g. /Volumes/ssd/vphone-vm) produced a broken joined path like /Users/.../vphone-cli//Volumes/ssd/vphone-vm and failed with 'no such file'.

Add VM_DIR_ABS := $(abspath $(VM_DIR)) and use it for the VM directory argument. abspath leaves absolute paths intact and joins relative ones against CURDIR, so both the default 'vm' and absolute paths work. The cd $(VM_DIR) targets were already absolute-safe and are unchanged.

The fw_patch* and restore_* targets built the VM directory argument as
$(CURDIR)/$(VM_DIR), which assumes VM_DIR is relative to the repo. An
absolute VM_DIR (e.g. /Volumes/ssd/vphone-vm) produced a broken joined
path like /Users/.../vphone-cli//Volumes/ssd/vphone-vm and failed with
'no such file'.

Add VM_DIR_ABS := $(abspath $(VM_DIR)) and use it for the VM directory
argument. abspath leaves absolute paths intact and joins relative ones
against CURDIR, so both the default 'vm' and absolute paths work. The
cd $(VM_DIR) targets were already absolute-safe and are unchanged.
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.

1 participant