blob: 6b19cf3ebe20522a7e3bf195d79f5edf04e2acaa [file] [log] [blame]
Harald Welte68079822017-12-12 16:30:53 +01001
2ECLIPSEGIT:=https://github.com/eclipse
3ECLIPSEGIT2:=git://git.eclipse.org/gitroot/titan
Harald Welte701b5742018-01-22 11:29:13 +01004OSMOGITHUB:=https://github.com/osmocom
Harald Welte3103fce2018-05-26 13:58:31 +02005OSMOGIT:=git://git.osmocom.org
Harald Welte68079822017-12-12 16:30:53 +01006
7ECLIPSEGIT_REPOS= titan.Libraries.TCCUsefulFunctions \
8 titan.ProtocolModules.ICMP \
9 titan.ProtocolModules.ICMPv6 \
10 titan.ProtocolModules.IP \
11 titan.ProtocolModules.L2TP \
12 titan.ProtocolModules.M3UA \
Harald Welte36296dc2018-04-16 17:37:31 +020013 titan.ProtocolModules.SMPP \
Harald Welte68079822017-12-12 16:30:53 +010014 titan.ProtocolModules.TCP \
15 titan.ProtocolModules.UDP \
16 titan.ProtocolModules.RTP \
17 titan.TestPorts.Common_Components.Socket-API \
18 titan.TestPorts.IPL4asp \
19 titan.TestPorts.LANL2asp \
20 titan.TestPorts.PCAPasp \
Harald Welte68079822017-12-12 16:30:53 +010021 titan.TestPorts.SIPmsg \
22 titan.TestPorts.TCPasp \
23 titan.TestPorts.TELNETasp \
Harald Weltea28dce12018-04-14 22:04:05 +020024 titan.TestPorts.UDPasp \
25 titan.TestPorts.UNIX_DOMAIN_SOCKETasp
Harald Welte68079822017-12-12 16:30:53 +010026
27ECLIPSEGIT2_REPOS= titan.ProtocolModules.GRE \
28 titan.ProtocolModules.M2PA \
Harald Welte834d67e2018-05-26 13:58:03 +020029 titan.ProtocolModules.ROSE \
Harald Welte68079822017-12-12 16:30:53 +010030 titan.ProtocolModules.SCTP \
31 titan.ProtocolModules.SUA \
32 titan.ProtocolModules.SDP \
33 titan.TestPorts.GPIO \
34 titan.ProtocolModules.BSSAPP_v7.3.0 \
35 titan.ProtocolModules.BSSGP_v13.0.0 \
36 titan.ProtocolModules.BSSMAP_v11.2.0 \
37 titan.ProtocolModules.GTP_v13.5.0 \
38 titan.ProtocolModules.GTPv2_v13.7.0 \
39 titan.ProtocolModules.ISUP_Q.762 \
Harald Welte68079822017-12-12 16:30:53 +010040 titan.ProtocolModules.MobileL3_v13.4.0 \
41 titan.ProtocolModules.NS_v7.3.0 \
Harald Welteb1add592018-03-27 20:43:40 +020042 titan.ProtocolModules.SNDCP_v7.0.0 \
43 titan.ProtocolEmulations.SCCP
Harald Welte68079822017-12-12 16:30:53 +010044
Harald Welte6fc784e2018-02-25 23:31:37 +010045OSMOGITHUB_REPOS= titan.TestPorts.SCTPasp \
Harald Welte2216b752019-04-23 22:13:51 +020046 titan.ProtocolModules.LLC_v7.1.0 \
Harald Welte1fd461a2018-10-28 10:26:13 +010047 titan.ProtocolModules.SGsAP_13.2.0 \
Harald Weltec87abfc2018-03-18 10:58:00 +010048 titan.TestPorts.MTP3asp \
Harald Welteb1add592018-03-27 20:43:40 +020049 titan.ProtocolEmulations.M3UA
Harald Welte701b5742018-01-22 11:29:13 +010050
Harald Welte3103fce2018-05-26 13:58:31 +020051OSMOGIT_REPOS= titan.ProtocolModules.MAP
52
53ALL_REPOS=$(ECLIPSEGIT_REPOS) $(ECLIPSEGIT2_REPOS) $(OSMOGITHUB_REPOS) $(OSMOGIT_REPOS)
Harald Welte68079822017-12-12 16:30:53 +010054
Stefan Sperling61c11e92018-03-20 18:25:26 +010055# Tag names from 'git-describe --tags'; if not available, a commit hash may be used instead.
56# In order to keep local changes in the repository of a dependency, set its commit to the
57# name of a local branch here (e.g. 'master').
Stefan Sperling61c11e92018-03-20 18:25:26 +010058titan.Libraries.TCCUsefulFunctions_commit= R.30.A
Stefan Sperlinge6bf4ac2018-06-12 17:36:26 +020059titan.ProtocolEmulations.M3UA_commit= R.2.A-2-g742cf02
Harald Welteb1add592018-03-27 20:43:40 +020060titan.ProtocolEmulations.SCCP_commit= R.7.A-2-g724c83f
Stefan Sperling61c11e92018-03-20 18:25:26 +010061titan.ProtocolModules.BSSAPP_v7.3.0_commit= R.2.A
62titan.ProtocolModules.BSSGP_v13.0.0_commit= R.2.A
63titan.ProtocolModules.BSSMAP_v11.2.0_commit= R.2.A
64titan.ProtocolModules.GRE_commit= R.2.A
65titan.ProtocolModules.GTP_v13.5.0_commit= R.2.A
66titan.ProtocolModules.GTPv2_v13.7.0_commit= R.2.A
67titan.ProtocolModules.ICMP_commit= R.2.A
68titan.ProtocolModules.ICMPv6_commit= R.2.A
69titan.ProtocolModules.IP_commit= R.10.B-1-g99d0ec9
70titan.ProtocolModules.ISUP_Q.762_commit= R.8.A
71titan.ProtocolModules.L2TP_commit= R.2.A
Harald Welte2216b752019-04-23 22:13:51 +020072titan.ProtocolModules.LLC_v7.1.0_commit= 2a3c09fbf7bae22f802aa88689800f38a1f3732d
Harald Welte3103fce2018-05-26 13:58:31 +020073titan.ProtocolModules.MAP_commit= R.2.A-1-g79c6a3d
Stefan Sperling61c11e92018-03-20 18:25:26 +010074titan.ProtocolModules.M2PA_commit= R.2.A
75titan.ProtocolModules.M3UA_commit= R.2.A
76titan.ProtocolModules.MobileL3_v13.4.0_commit= R.2.A
77titan.ProtocolModules.NS_v7.3.0_commit= R.2.A
78titan.ProtocolModules.RTP_commit= R.5.A
Harald Welte834d67e2018-05-26 13:58:03 +020079titan.ProtocolModules.ROSE_commit= R.1.C
Stefan Sperling61c11e92018-03-20 18:25:26 +010080titan.ProtocolModules.SCTP_commit= R.2.A
Harald Welte1fd461a2018-10-28 10:26:13 +010081titan.ProtocolModules.SGsAP_13.2.0_commit= 520dc48dd41ee15c9fd77e71d2ea7a05c58770b9
Stefan Sperling61c11e92018-03-20 18:25:26 +010082titan.ProtocolModules.SDP_commit= R.14.A
Harald Welte36296dc2018-04-16 17:37:31 +020083titan.ProtocolModules.SMPP_commit= R.2.A-2-gb7aee69
Stefan Sperling61c11e92018-03-20 18:25:26 +010084titan.ProtocolModules.SNDCP_v7.0.0_commit= R.2.A
85titan.ProtocolModules.SUA_commit= R.5.A
86titan.ProtocolModules.TCP_commit= R.3.A
87titan.ProtocolModules.UDP_commit= R.4.A
88titan.TestPorts.Common_Components.Socket-API_commit= R.6.A
89titan.TestPorts.GPIO_commit= R.3.A
90titan.TestPorts.IPL4asp_commit= R.29.A
91titan.TestPorts.LANL2asp_commit= R.8.B
92titan.TestPorts.MTP3asp_commit= 1cecdad6f3641a5f19b3833703bff6e5005eff11
93titan.TestPorts.PCAPasp_commit= R.7.A
94titan.TestPorts.SCTPasp_commit= R.11.A-2-g2faa9cf
95titan.TestPorts.SIPmsg_commit= R.15.A-1-ge4f9dd0
96titan.TestPorts.TCPasp_commit= R.9.A
97titan.TestPorts.TELNETasp_commit= R.9.A
98titan.TestPorts.UDPasp_commit= R.8.A
Harald Welte0a068c32018-04-06 13:52:35 +020099titan.TestPorts.UNIX_DOMAIN_SOCKETasp_commit= R.2.A-4-gbacd73d
Harald Welte68079822017-12-12 16:30:53 +0100100
Stefan Sperling61c11e92018-03-20 18:25:26 +0100101all: $(foreach dir,$(ALL_REPOS),$(dir)/update)
Harald Welte68079822017-12-12 16:30:53 +0100102clean: $(foreach dir,$(ALL_REPOS),$(dir)/clean)
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100103distclean: $(foreach dir,$(ALL_REPOS),$(dir)/distclean)
Harald Welte68079822017-12-12 16:30:53 +0100104
105define GIT_template
Stefan Sperling61c11e92018-03-20 18:25:26 +0100106$(1)_ORIGIN!= if [ -d $(1) ]; then cd $(1) && git remote get-url origin; fi
107$(1)_HEAD!= if [ -d $(1) ]; then cd $(1) && git describe --tags 2>/dev/null || git rev-parse HEAD; fi
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100108$(1)_MODIFIED!= if [ -d $(1) ]; then cd $(1) && git diff --quiet --exit-code || echo -n "1"; fi
Stefan Sperling61c11e92018-03-20 18:25:26 +0100109
Harald Welte68079822017-12-12 16:30:53 +0100110$(1):
111 git clone $(2)/$(1)
112
Stefan Sperling61c11e92018-03-20 18:25:26 +0100113.PHONY: $(1)/update
Harald Welte68079822017-12-12 16:30:53 +0100114$(1)/update: $(1)
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100115ifeq ($$($(1)_MODIFIED),1)
116 @echo "WARNING: $(1) skipped because it contains uncommitted modifications!"
117else
Stefan Sperling61c11e92018-03-20 18:25:26 +0100118ifneq ($$($(1)_ORIGIN),$(2)/$(1))
119 cd $(1) && git remote set-url origin $(2)/$(1) && git fetch
120endif
121ifneq ($$($(1)_HEAD),$($(1)_commit))
Harald Welte035f7f82018-03-27 20:49:27 +0200122 cd $(1) && git fetch && git checkout -q -f "$($(1)_commit)"
Stefan Sperling61c11e92018-03-20 18:25:26 +0100123endif
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100124endif
Harald Welte68079822017-12-12 16:30:53 +0100125
126.PHONY: $(1)/clean
Harald Welte4c294b62018-02-15 18:27:10 +0100127$(1)/clean: $(1)
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100128ifeq ($$($(1)_MODIFIED),1)
129 @echo "WARNING: $(1) skipped because it contains uncommitted modifications!"
130else
Harald Welte035f7f82018-03-27 20:49:27 +0200131 cd $(1) && git fetch && git checkout -q -f "$($(1)_commit)" && git reset --hard
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100132endif
Harald Welte4c294b62018-02-15 18:27:10 +0100133
134.PHONY: $(1)/distclean
135$(1)/distclean:
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100136ifeq ($$($(1)_MODIFIED),1)
137 @echo "WARNING: $(1) skipped because it contains uncommitted modifications!"
138else
Harald Welte68079822017-12-12 16:30:53 +0100139 @rm -rf $(1)
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100140endif
Harald Welte68079822017-12-12 16:30:53 +0100141endef
142
143$(foreach dir,$(ECLIPSEGIT_REPOS), \
144 $(eval $(call GIT_template,$(dir),$(ECLIPSEGIT))))
145
146$(foreach dir,$(ECLIPSEGIT2_REPOS), \
147 $(eval $(call GIT_template,$(dir),$(ECLIPSEGIT2))))
Harald Welte701b5742018-01-22 11:29:13 +0100148
149$(foreach dir,$(OSMOGITHUB_REPOS), \
150 $(eval $(call GIT_template,$(dir),$(OSMOGITHUB))))
Harald Welte3103fce2018-05-26 13:58:31 +0200151
152$(foreach dir,$(OSMOGIT_REPOS), \
153 $(eval $(call GIT_template,$(dir),$(OSMOGIT))))