diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-11-01 13:54:21 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-11-01 13:54:21 +0000 |
commit | f94a3edc6e4245f10e245d162737b889788f4f12 (patch) | |
tree | 9acb7767e9def70288ebb2e996ed1cee01dfa9a5 /libgo/Makefile.in | |
parent | 380f39b91b2f596fd4b74b8cae49cfe44cf9bd0b (diff) | |
download | gcc-f94a3edc6e4245f10e245d162737b889788f4f12.zip gcc-f94a3edc6e4245f10e245d162737b889788f4f12.tar.gz gcc-f94a3edc6e4245f10e245d162737b889788f4f12.tar.bz2 |
libgo: only rebuild package if dependent .gox has changed
Use mvifdiff and stamp files to track whether a .gox file has changed.
When package A depends on package B, and we rebuild package B, only
rebuild package A if package B's .gox file changes. This is safe
because when package A imports package B it only reads package B's .gox
file. This means that changes that do not affect export information
will not cause dependent packages to be recompiled.
Reviewed-on: https://go-review.googlesource.com/32476
From-SVN: r241742
Diffstat (limited to 'libgo/Makefile.in')
-rw-r--r-- | libgo/Makefile.in | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libgo/Makefile.in b/libgo/Makefile.in index 140cfdf..908e660 100644 --- a/libgo/Makefile.in +++ b/libgo/Makefile.in @@ -1079,7 +1079,8 @@ BUILDPACKAGE = \ # How to build a .gox file from a .lo file. BUILDGOX = \ f=`echo $< | sed -e 's/.lo$$/.o/'`; \ - $(OBJCOPY) -j .go_export $$f $@.tmp && mv -f $@.tmp $@ + $(OBJCOPY) -j .go_export $$f $@.tmp; \ + $(SHELL) $(srcdir)/mvifdiff.sh $@.tmp `echo $@ | sed -e 's/s-gox/gox/'` GOTESTFLAGS = GOBENCH = @@ -3366,8 +3367,10 @@ $(1).lo: $(1)/check: $$(CHECK_DEPS) @$$(CHECK) .PHONY: $(1)/check -$(1).gox: $(1).lo +$(1).gox: $(1).s-gox; @true +$(1).s-gox: $(1).lo $$(BUILDGOX) + $$(STAMP) $$@ endef # This line expands PACKAGE_template once for each package name listed |