mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
This will prevent Makefile errors from affecting backups. This happens when different branches include Makefile helpers other branches don't have. This should be more reliable.
17 lines
726 B
Text
17 lines
726 B
Text
# Build commands for backing up and restoring the Rust build.
|
|
# Because Rust takes a very long time to build and changes infrequently,
|
|
# the bots want to reuse it between builds. They can do so by running
|
|
# `make backup-rust` and `make restore-rust`.
|
|
#
|
|
# backup-rust is run before the build directory is cleaned. if it fails, that's ok.
|
|
#
|
|
# restore-rust is run after configure and before invoking make. if it fails, we must abort.
|
|
|
|
include config.mk
|
|
|
|
.PHONY: backup-rust restore-rust
|
|
backup-rust:
|
|
-mv $(CFG_BUILD_DIR)src/compiler/rust ../$(CFG_TARGET_TRIPLES)
|
|
|
|
restore-rust:
|
|
if [ -d ../$(CFG_TARGET_TRIPLES) ]; then rm -rf $(CFG_BUILD_DIR)src/compiler/rust; mv ../$(CFG_TARGET_TRIPLES) $(CFG_BUILD_DIR)src/compiler/rust; fi
|