To improve compile times, the Arch wiki states,
Users with multi-core/multi-processor systems can specify the number of jobs to run simultaneously. This can be accomplished with the use of
nproc
to determine the number of available processors, e.g.MAKEFLAGS="-j$(nproc)"
.
If I set this in Fish shell via set -Ux MAKEFLAGS "-J$(nproc)"
, then I receive the error:
fish: $(...) is not supported. In fish, please use '(nproc)'.
set -Ux MAKEFLAGS "-J$(nproc)"
^
I can set this variable in two ways without receiving an error:
set -Ux MAKEFLAGS "-J(nproc)"
set -Ux MAKEFLAGS '-J$(nproc)'
Which of these is the correct method? Or are they both okay?
Thanks