Automatically locate Make for Windows (build script) #245
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Intended to simplify the updated build documentation for Windows (PR #241), I've added a feature to the Windows build script.
This feature automatically locates
make.exe
from either:C:\Program Files (x86)\GnuWin32\bin
)This works by running
make -v
(a version check command for make) then checking whether the%errorlevel%
variable is equal to9009
(which is the error code forMSG_DIR_BAD_COMMAND_OR_FILE
, signifying that make is not found from the system path)If make is not found from simply running
make -v
, then the script attempts to runC:\Program Files (x86)\GnuWin32\bin\make.exe -v
, and checks for the same error9009
. If make is still not found, the build script aborts.If this is accepted, the updated build documentation in PR #241 could be simplified to remove the requirement to manually add Make to the system path.
I understand that this may not be the most elegant solution-- But I feel it would be better to add a small amount of complexity to the build script for the sake of greatly simplifying the build documentation.