fixeria has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38218?usp=email )
Change subject: Makefile: avoid fetching deps if not needed
......................................................................
Makefile: avoid fetching deps if not needed
Running `make deps` for the first time fetches all the dependencies.
Running `make deps` again currently results in unnecessary git-fetch
and get-checkout operations for each dependency.
This is not as bad as cloning dependencies from scratch every time,
but still takes time and triggers unnecessary requests to the servers.
It's also creating problems when building testsuites offline.
This patch makes the build system a bit smarter in a way that it would
only try to update dependencies if the 'deps/Makefile' was changed.
Change-Id: Iae98585f0a83b17596857eba8c2f51a785198580
Related: OS#6572
---
M Makefile
1 file changed, 6 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks refs/changes/18/38218/1
diff --git a/Makefile b/Makefile
index 2b806b8..38a8f60 100644
--- a/Makefile
+++ b/Makefile
@@ -75,14 +75,16 @@
# Eclipse GitLab has rate limiting and sometimes to many concurrent conns fail.
# If -jN fails, retry with -j1.
-.PHONY: deps
-deps:
+.make.deps: deps/Makefile
($(MAKE) $(PARALLEL_MAKE) -C deps || $(MAKE) -j1 -C deps)
+ touch $@
+
+.PHONY: deps
+deps: .make.deps
# deps-update target for backwards compat; now does the same as 'make deps'
.PHONY: deps-update
-deps-update:
- $(MAKE) -C deps
+deps-update: .make.deps
compile: $(foreach dir,$(SUBDIRS),$(dir)/compile)
clean: $(foreach dir,$(SUBDIRS),$(dir)/clean)
--
To view, visit
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/38218?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iae98585f0a83b17596857eba8c2f51a785198580
Gerrit-Change-Number: 38218
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>