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