Skip to content

Commit

Permalink
Change how backup/restore make task works.
Browse files Browse the repository at this point in the history
Now we write $SRC/.config.mk.last to store the most recent configure
variables for the backup and restore task. Also, they no longer fail if
they can't find the variables, and will skip the backup/restore stages
and keep going.
  • Loading branch information
metajack committed Apr 29, 2014
1 parent 6d2b645 commit 676c5b6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -13,6 +13,7 @@
.DS_Store
servo-test
Servo.app
.config.mk.last
build*
objdir
parser.out
Expand Down
9 changes: 5 additions & 4 deletions Makefile.backup
Expand Up @@ -7,11 +7,12 @@
#
# restore-rust is run after configure and before invoking make. if it fails, we must abort.

include config.mk
-include .config.mk.last

.PHONY: backup-rust restore-rust
.PHONY: backup-rust
backup-rust:
-mv $(CFG_BUILD_DIR)src/compiler/rust ../$(CFG_TARGET)
@if [ ! -z "$(CFG_BUILD_DIR)" ]; then echo "Backing up Rust"; mv $(CFG_BUILD_DIR)src/compiler/rust ../$(CFG_TARGET); else echo "Skipping Rust backup"; fi

.PHONY: restore-rust
restore-rust:
if [ -d ../$(CFG_TARGET) ]; then rm -rf $(CFG_BUILD_DIR)src/compiler/rust; mv ../$(CFG_TARGET) $(CFG_BUILD_DIR)src/compiler/rust; fi
@if [ ! -z "$(CFG_BUILD_DIR)" -a -d ../$(CFG_TARGET) ]; then echo "Restoring Rust from backup"; rm -rf $(CFG_BUILD_DIR)src/compiler/rust; mv ../$(CFG_TARGET) $(CFG_BUILD_DIR)src/compiler/rust; else echo "Skipping Rust restore"; fi
1 change: 1 addition & 0 deletions configure
Expand Up @@ -565,6 +565,7 @@ putvar CFG_ENABLE_DEBUG_SKIA
msg
copy_if_changed ${CFG_SRC_DIR}Makefile.in ${CFG_BUILD_HOME}Makefile
move_if_changed ${CFG_BUILD_HOME}config.tmp ${CFG_BUILD_HOME}config.mk
copy_if_changed ${CFG_BUILD_HOME}config.mk ${CFG_SRC_DIR}/.config.mk.last
rm -f ${CFG_BUILD_HOME}config.tmp
touch ${CFG_BUILD_HOME}config.stamp

Expand Down

5 comments on commit 676c5b6

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from jdm
at metajack@676c5b6

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging metajack/servo/configure-cleanup = 676c5b6 into auto

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

metajack/servo/configure-cleanup = 676c5b6 merged ok, testing candidate = a1838f8

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors-servo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = a1838f8

Please sign in to comment.