testing: Avoid unnecessary rebuilds of components built from Git repos

Installing apparently changes the timestamp on the repo dir triggering make
to checkout and build the whole thing again.
This commit is contained in:
Tobias Brunner committed 2018-10-30 15:06:47 +01:00
1 parent 3a4372c1eb
commit 67fd36e884
7 files changed
+35 -28

No files matched your search

+5 -4
View File
@@ -8,14 +8,15 @@ export ADA_PROJECT_PATH=/usr/local/ada/lib/gnat
all: install
$(PKG):
git clone $(SRC) $(PKG)
.$(PKG)-cloned:
[ -d $(PKG) ] || git clone $(SRC) $(PKG)
@touch $@
.$(PKG)-cloned-$(REV): $(PKG)
.$(PKG)-checkout-$(REV): .$(PKG)-cloned
cd $(PKG) && git fetch && git checkout $(REV)
@touch $@
.$(PKG)-built-$(REV): .$(PKG)-cloned-$(REV)
.$(PKG)-built-$(REV): .$(PKG)-checkout-$(REV)
cd $(PKG) && make
@touch $@