| ... | @@ -648,20 +648,31 @@ pub fn main(init: process.Init.Minimal) !void { | ... | @@ -648,20 +648,31 @@ pub fn main(init: process.Init.Minimal) !void { |
| 648 | .sub_path = "zig-out", | 648 | .sub_path = "zig-out", |
| 649 | }; | 649 | }; |
| 650 | | 650 | |
| 651 | const install_lib_path: Path = if (override_lib_dir) |cwd_relative| .{ | 651 | // These three overrides are meant to be relative to the install prefix, |
| 652 | .root_dir = .cwd(), | 652 | // not current working directory, unless absolute paths are used. |
| 653 | .sub_path = cwd_relative, | 653 | const install_lib_path: Path = if (override_lib_dir) |lib_dir| |
| 654 | } else try install_prefix_path.join(arena, "lib"); | 654 | if (Dir.path.isAbsolute(lib_dir)) .{ |
| | 655 | .root_dir = .cwd(), |
| | 656 | .sub_path = lib_dir, |
| | 657 | } else try install_prefix_path.join(arena, lib_dir) |
| | 658 | else |
| | 659 | try install_prefix_path.join(arena, "lib"); |
| 655 | | 660 | |
| 656 | const install_bin_path: Path = if (override_bin_dir) |cwd_relative| .{ | 661 | const install_bin_path: Path = if (override_bin_dir) |bin_dir| |
| 657 | .root_dir = .cwd(), | 662 | if (Dir.path.isAbsolute(bin_dir)) .{ |
| 658 | .sub_path = cwd_relative, | 663 | .root_dir = .cwd(), |
| 659 | } else try install_prefix_path.join(arena, "bin"); | 664 | .sub_path = bin_dir, |
| | 665 | } else try install_prefix_path.join(arena, bin_dir) |
| | 666 | else |
| | 667 | try install_prefix_path.join(arena, "bin"); |
| 660 | | 668 | |
| 661 | const install_include_path: Path = if (override_include_dir) |cwd_relative| .{ | 669 | const install_include_path: Path = if (override_include_dir) |include_dir| |
| 662 | .root_dir = .cwd(), | 670 | if (Dir.path.isAbsolute(include_dir)) .{ |
| 663 | .sub_path = cwd_relative, | 671 | .root_dir = .cwd(), |
| 664 | } else try install_prefix_path.join(arena, "include"); | 672 | .sub_path = include_dir, |
| | 673 | } else try install_prefix_path.join(arena, include_dir) |
| | 674 | else |
| | 675 | try install_prefix_path.join(arena, "include"); |
| 665 | | 676 | |
| 666 | const now = Io.Clock.Timestamp.now(io, .awake); | 677 | const now = Io.Clock.Timestamp.now(io, .awake); |
| 667 | | 678 | |