I am now trying to use WireGuardKit
, where it asks to create an "External Build System" and fill in the Directory
with ${BUILD_DIR}/... /... /SourcePackages/checkouts/wireguard/Sources/WireGuardKitGo
(this path has been modified and I guarantee that this path will allow me to pass the compilation).
However, when I execute archive, Xcode reports an error unable to spawn process '/usr/bin/make' (No such file or directory)
.
I suspect that $(BUILD_DIR)
doesn't have a value when the compilation is executed, or I can't use this environment variable at this stage. Because when I don't use relative paths and use absolute paths to assign values to Directory
, the project is able to archive successfully.
So my question is, when I execute the archive, how do I get the path of the package I inherited using SPM? Or can I use $(BUILD_DIR)
environment variable when I execute archive? Why is it different from when compiling?
UPDATE:
I learned that $(BUILD_DIR)
uses $()
within it and when I try to use $()
directly, it still reports an error, I also tried variables like $(BUILD_PATH)
, $(BUILD_ROOT)
, $(BUILT_PRODUCTS_DIR)
, but none of them work.
So could it be a problem with $()
, an environment variable that has no value when the archive is executed?
How do I get the SPM directory when executing the archive?