Merge pull request #918 from keyboardio/better-conditional-build

Our previous conditional building was really wrong. It never built if…
pull/920/head v1.99.1
Gergely Nagy 4 years ago committed by GitHub
commit 78b32f6b80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -333,8 +333,12 @@ maybe_build () {
build_version
build_paths
build_filenames
if [ ! -e "${HEX_FILE_PATH}" ]; then
# If the hex file is older than the sketch file, or the hex file does not exist
# then rebuild. This is not as correct as letting make check our dependencies
# But it's less broken for most user use cases
# TODO(anyone): Make this suck less
SKETCH_FILE_PATH=$(absolute_filename "${SKETCH_DIR}/${SKETCH}.ino")
if [ "${HEX_FILE_PATH}" -ot "${SKETCH_FILE_PATH}" ]; then
build "$@"
fi

Loading…
Cancel
Save