blob: 3d49a68de31bdbe762be57ca32854c3fb58748c4 [file] [log] [blame]
Harald Welte0cdf0712019-06-19 18:15:38 +02001# Copyright 2017 Harald Welte
2# Copyright 2018 sysmocom - s.f.m.c. GmbH
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
Harald Welte68079822017-12-12 16:30:53 +010015
Harald Welte8aefd112020-02-18 21:47:06 +010016ECLIPSEGITHUB:=https://github.com/eclipse
Oliver Smith36cb88c2020-02-10 10:38:13 +010017ECLIPSEGIT2:=https://git.eclipse.org/r/titan
Pau Espin Pedrol8c74cbb2021-05-04 15:26:56 +020018ECLIPSEGITLAB:=https://gitlab.eclipse.org/eclipse/titan
Harald Welte701b5742018-01-22 11:29:13 +010019OSMOGITHUB:=https://github.com/osmocom
Harald Welte3103fce2018-05-26 13:58:31 +020020OSMOGIT:=git://git.osmocom.org
Harald Welte68079822017-12-12 16:30:53 +010021
Harald Welte8aefd112020-02-18 21:47:06 +010022ECLIPSEGITHUB_REPOS= titan.Libraries.TCCUsefulFunctions \
Oliver Smith66fde762019-11-29 15:38:52 +010023 titan.ProtocolModules.DNS \
Harald Welte68079822017-12-12 16:30:53 +010024 titan.ProtocolModules.ICMP \
25 titan.ProtocolModules.ICMPv6 \
26 titan.ProtocolModules.IP \
Harald Weltefaa42922019-03-04 18:31:11 +010027 titan.ProtocolModules.JSON_v07_2006 \
Harald Welte68079822017-12-12 16:30:53 +010028 titan.ProtocolModules.L2TP \
Harald Welteb82ca2f2020-01-10 14:51:58 +010029 titan.ProtocolModules.M3UA \
Harald Welte36296dc2018-04-16 17:37:31 +020030 titan.ProtocolModules.SMPP \
Harald Welte68079822017-12-12 16:30:53 +010031 titan.ProtocolModules.TCP \
32 titan.ProtocolModules.UDP \
33 titan.ProtocolModules.RTP \
Harald Welte56071b72019-08-18 19:31:26 +020034 titan.ProtocolModules.DIAMETER_ProtocolModule_Generator \
Harald Welte68079822017-12-12 16:30:53 +010035 titan.TestPorts.Common_Components.Socket-API \
Harald Weltefaa42922019-03-04 18:31:11 +010036 titan.TestPorts.Common_Components.Abstract_Socket \
37 titan.TestPorts.HTTPmsg \
Harald Welte68079822017-12-12 16:30:53 +010038 titan.TestPorts.IPL4asp \
39 titan.TestPorts.LANL2asp \
40 titan.TestPorts.PCAPasp \
Harald Welte34b9da22020-02-18 21:55:07 +010041 titan.TestPorts.PIPEasp \
Harald Welte68079822017-12-12 16:30:53 +010042 titan.TestPorts.SIPmsg \
Harald Welte501e0702020-09-13 11:29:21 +020043 titan.TestPorts.TELNETasp \
Harald Welte68079822017-12-12 16:30:53 +010044 titan.TestPorts.TCPasp \
Harald Weltea28dce12018-04-14 22:04:05 +020045 titan.TestPorts.UNIX_DOMAIN_SOCKETasp
Harald Welte68079822017-12-12 16:30:53 +010046
Harald Welte501e0702020-09-13 11:29:21 +020047ECLIPSEGIT2_REPOS= titan.ProtocolEmulations.M3UA \
48 titan.ProtocolModules.GRE \
Harald Welte68079822017-12-12 16:30:53 +010049 titan.ProtocolModules.M2PA \
Harald Welte834d67e2018-05-26 13:58:03 +020050 titan.ProtocolModules.ROSE \
Harald Welte68079822017-12-12 16:30:53 +010051 titan.ProtocolModules.SCTP \
52 titan.ProtocolModules.SUA \
53 titan.ProtocolModules.SDP \
Harald Welte68079822017-12-12 16:30:53 +010054 titan.ProtocolModules.BSSAPP_v7.3.0 \
Harald Welte68079822017-12-12 16:30:53 +010055 titan.ProtocolModules.GTPv2_v13.7.0 \
56 titan.ProtocolModules.ISUP_Q.762 \
Oliver Smith36cb88c2020-02-10 10:38:13 +010057 titan.ProtocolModules.LLC_v7.1.0 \
58 titan.ProtocolModules.MobileL3_v13.4.0 \
Harald Weltefc5f6372019-07-09 14:10:05 +080059 titan.ProtocolModules.NAS_EPS_15.2.0.1 \
Harald Welte68079822017-12-12 16:30:53 +010060 titan.ProtocolModules.NS_v7.3.0 \
Harald Welteb82ca2f2020-01-10 14:51:58 +010061 titan.ProtocolModules.SGsAP_13.2.0 \
Harald Welte88b3ccb2020-03-12 21:36:32 +010062 titan.ProtocolModules.SNDCP_v7.0.0
Harald Welte68079822017-12-12 16:30:53 +010063
Pau Espin Pedrol8c74cbb2021-05-04 15:26:56 +020064ECLIPSEGITLAB_REPOS= titan.ProtocolModules.GTP_v13.5.0
65
Harald Welte6fc784e2018-02-25 23:31:37 +010066OSMOGITHUB_REPOS= titan.TestPorts.SCTPasp \
Harald Weltec87abfc2018-03-18 10:58:00 +010067 titan.TestPorts.MTP3asp \
Oliver Smith7c5cb6e2020-01-16 16:20:54 +010068 titan.TestPorts.UDPasp \
Harald Welte24f921b2021-02-10 19:37:45 +010069 titan.ProtocolEmulations.SCCP \
Philipp Maier8d095282020-12-15 22:31:03 +010070 titan.ProtocolModules.BSSGP_v13.0.0
Harald Welte701b5742018-01-22 11:29:13 +010071
Pau Espin Pedrolfe0c6082019-05-20 19:20:55 +020072OSMOGIT_REPOS= titan.ProtocolModules.MAP \
Harald Weltef30e22b2019-11-14 08:36:19 +010073 titan.ProtocolModules.BSSMAP \
Harald Welte88b3ccb2020-03-12 21:36:32 +010074 titan.TestPorts.USB \
Harald Welte023b61b2020-09-12 20:41:05 +020075 titan.TestPorts.AF_PACKET \
Harald Welte88b3ccb2020-03-12 21:36:32 +010076 osmo-uecups
Harald Welte3103fce2018-05-26 13:58:31 +020077
Pau Espin Pedrol8c74cbb2021-05-04 15:26:56 +020078ALL_REPOS=$(ECLIPSEGITHUB_REPOS) $(ECLIPSEGIT2_REPOS) $(ECLIPSEGITLAB_REPOS) $(OSMOGITHUB_REPOS) $(OSMOGIT_REPOS)
Harald Welte68079822017-12-12 16:30:53 +010079
Stefan Sperling61c11e92018-03-20 18:25:26 +010080# Tag names from 'git-describe --tags'; if not available, a commit hash may be used instead.
Pau Espin Pedrol36ef7fc2021-04-19 11:52:52 +020081# Do not put references to branches here, except for local testing: this breaks the caching
82# logic of docker containers, which only invalidate their cached ttcn3 dependencies if this
83# file changed.
Harald Welte6cb85a62020-01-10 16:36:29 +010084titan.Libraries.TCCUsefulFunctions_commit= R.35.B-6-gb3687da
Pau Espin Pedrolffe47392020-07-24 11:02:58 +020085titan.ProtocolEmulations.M3UA_commit= f086e78d74defa044d864f17adaad9433fedc961
Harald Welte24f921b2021-02-10 19:37:45 +010086titan.ProtocolEmulations.SCCP_commit= R.7.A-11-gd4b7a6d
Harald Welte6cb85a62020-01-10 16:36:29 +010087titan.ProtocolModules.BSSAPP_v7.3.0_commit= R.2.A-4-g20cfaf8
Harald Welte14c04452021-01-05 16:23:39 +010088titan.ProtocolModules.BSSGP_v13.0.0_commit= e97d92a8b66bec399babea52f593771b76cb175a
Pau Espin Pedrold5ba6ce2021-04-15 14:18:13 +020089titan.ProtocolModules.BSSMAP_commit= 24f967b2f77bfdd2e6eabf1e82fa76239095f772
Oliver Smith66fde762019-11-29 15:38:52 +010090titan.ProtocolModules.DNS_commit= R.7.B
Harald Welte6cb85a62020-01-10 16:36:29 +010091titan.ProtocolModules.GRE_commit= R.2.A-5-g654c446
Pau Espin Pedrol8c74cbb2021-05-04 15:26:56 +020092titan.ProtocolModules.GTP_v13.5.0_commit= 54219599037626c675610d3a44433d01af264fbb
Harald Welte6cb85a62020-01-10 16:36:29 +010093titan.ProtocolModules.GTPv2_v13.7.0_commit= R.2.A-5-g85cb124
94titan.ProtocolModules.ICMP_commit= e49d9fb9f7de637b4bf4803dc6b6e911a8661640
95titan.ProtocolModules.ICMPv6_commit= 46f4d9b6e1e3c794294a92588401a81e4881dd27
96titan.ProtocolModules.IP_commit= 1be86705f39ae38f3c04b2109806ee20d25e91d0
97titan.ProtocolModules.ISUP_Q.762_commit= R.8.A-5-g42d428b
Harald Weltefaa42922019-03-04 18:31:11 +010098titan.ProtocolModules.JSON_v07_2006_commit= R.1.A
Harald Welte6cb85a62020-01-10 16:36:29 +010099titan.ProtocolModules.L2TP_commit= 17e76d3662bd0bb815158e8a9de1ec413f21b530
Harald Welteb82ca2f2020-01-10 14:51:58 +0100100titan.ProtocolModules.LLC_v7.1.0_commit= 09817f113255d7fb56f1d45d3dd629a093d9248d
Harald Welte3103fce2018-05-26 13:58:31 +0200101titan.ProtocolModules.MAP_commit= R.2.A-1-g79c6a3d
Harald Welte6cb85a62020-01-10 16:36:29 +0100102titan.ProtocolModules.M2PA_commit= R.2.A-5-ga75b589
Harald Welteb82ca2f2020-01-10 14:51:58 +0100103titan.ProtocolModules.M3UA_commit= c496d298876fed55c2b730278b7ee77982555563
Vadim Yanitskiy35d3a152020-03-28 00:45:56 +0700104titan.ProtocolModules.MobileL3_v13.4.0_commit= badbad680df216b3211260d56b14734eeb2c9028
Harald Welte6cb85a62020-01-10 16:36:29 +0100105titan.ProtocolModules.NAS_EPS_15.2.0.1_commit= R.1.A-2-g2ba853c
106titan.ProtocolModules.NS_v7.3.0_commit= R.2.A-6-gf73f195
107titan.ProtocolModules.RTP_commit= R.5.A-4-g83ee83a
Harald Welte56071b72019-08-18 19:31:26 +0200108titan.ProtocolModules.DIAMETER_ProtocolModule_Generator_commit= ffd939595a08da1b8c8176aaa1f8578bfe02a912
Harald Welte6cb85a62020-01-10 16:36:29 +0100109titan.ProtocolModules.ROSE_commit= R.1.C-5-g0f6774c
110titan.ProtocolModules.SCTP_commit= R.2.A-5-g556ef3f
111titan.ProtocolModules.SGsAP_13.2.0_commit= R.1.B-3-g5ccaeab
112titan.ProtocolModules.SDP_commit= R.14.A-6-g7f00ea0
113titan.ProtocolModules.SMPP_commit= R.2.A-5-gf2c9017
114titan.ProtocolModules.SNDCP_v7.0.0_commit= R.2.A-5-gd0f0ce6
115titan.ProtocolModules.SUA_commit= R.5.A-5-gcf1137a
116titan.ProtocolModules.TCP_commit= R.3.A-5-g39e5f45
117titan.ProtocolModules.UDP_commit= R.4.A-5-geea8aa3
Harald Weltea8dc1982021-02-16 20:01:40 +0100118titan.TestPorts.AF_PACKET_commit= 0.1-5-g89ebea6
Harald Weltebc88eac2020-01-14 22:20:41 +0100119titan.TestPorts.Common_Components.Socket-API_commit= R.6.A-6-gf4380d0
Harald Welte6cb85a62020-01-10 16:36:29 +0100120titan.TestPorts.Common_Components.Abstract_Socket_commit= R.9.B-4-gbd41994
Harald Welte6cb85a62020-01-10 16:36:29 +0100121titan.TestPorts.HTTPmsg_commit= R.9.B-4-g9a0dfde
Harald Weltebc88eac2020-01-14 22:20:41 +0100122titan.TestPorts.IPL4asp_commit= R.30.E
Harald Welte6cb85a62020-01-10 16:36:29 +0100123titan.TestPorts.LANL2asp_commit= R.8.C-3-gb07c265
Stefan Sperling61c11e92018-03-20 18:25:26 +0100124titan.TestPorts.MTP3asp_commit= 1cecdad6f3641a5f19b3833703bff6e5005eff11
Harald Welte6cb85a62020-01-10 16:36:29 +0100125titan.TestPorts.PCAPasp_commit= R.8.A-3-g9ad320f
Harald Welte34b9da22020-02-18 21:55:07 +0100126titan.TestPorts.PIPEasp_commit= R.7.D-3-g8b01154
Harald Welte61b3a872021-02-03 17:17:26 +0100127titan.TestPorts.SCTPasp_commit= R.11.A-7-ga21b94f
Stefan Sperling61c11e92018-03-20 18:25:26 +0100128titan.TestPorts.SIPmsg_commit= R.15.A-1-ge4f9dd0
Harald Welte6cb85a62020-01-10 16:36:29 +0100129titan.TestPorts.TCPasp_commit= R.9.A-5-g2c91bc6
Harald Welte501e0702020-09-13 11:29:21 +0200130titan.TestPorts.TELNETasp_commit= 873fe539642542cd9a901c208f1ec11c6d2f5387
Oliver Smith39ca7c32020-01-24 15:36:39 +0100131titan.TestPorts.UDPasp_commit= c20d77a34f288dd70dd4aaa30e520778876e9336
Vadim Yanitskiy94bbe992021-03-23 07:23:34 +0100132titan.TestPorts.UNIX_DOMAIN_SOCKETasp_commit= R.2.A-13-gd34ab71
Pau Espin Pedrol36ef7fc2021-04-19 11:52:52 +0200133titan.TestPorts.USB_commit= 4c742e931aae66c0046cebfe3c1de4618b6f9ffc
134osmo-uecups_commit= 8362efef7c6fa341eb947a75786878e0685767b7
Harald Welte68079822017-12-12 16:30:53 +0100135
Stefan Sperling61c11e92018-03-20 18:25:26 +0100136all: $(foreach dir,$(ALL_REPOS),$(dir)/update)
Harald Welte68079822017-12-12 16:30:53 +0100137clean: $(foreach dir,$(ALL_REPOS),$(dir)/clean)
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100138distclean: $(foreach dir,$(ALL_REPOS),$(dir)/distclean)
Harald Welte68079822017-12-12 16:30:53 +0100139
140define GIT_template
Stefan Sperling61c11e92018-03-20 18:25:26 +0100141$(1)_ORIGIN!= if [ -d $(1) ]; then cd $(1) && git remote get-url origin; fi
142$(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 +0100143$(1)_MODIFIED!= if [ -d $(1) ]; then cd $(1) && git diff --quiet --exit-code || echo -n "1"; fi
Stefan Sperling61c11e92018-03-20 18:25:26 +0100144
Harald Welte68079822017-12-12 16:30:53 +0100145$(1):
146 git clone $(2)/$(1)
147
Stefan Sperling61c11e92018-03-20 18:25:26 +0100148.PHONY: $(1)/update
Harald Welte68079822017-12-12 16:30:53 +0100149$(1)/update: $(1)
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100150ifeq ($$($(1)_MODIFIED),1)
151 @echo "WARNING: $(1) skipped because it contains uncommitted modifications!"
152else
Stefan Sperling61c11e92018-03-20 18:25:26 +0100153ifneq ($$($(1)_ORIGIN),$(2)/$(1))
154 cd $(1) && git remote set-url origin $(2)/$(1) && git fetch
155endif
156ifneq ($$($(1)_HEAD),$($(1)_commit))
Oliver Smitha25525d2021-04-19 12:22:29 +0200157 cd $(1) && \
158 git fetch && \
159 if git rev-parse "origin/$($(1)_commit)" 2>/dev/null; then \
160 set -x && \
161 git checkout -q -f "origin/$($(1)_commit)"; \
162 else \
163 set -x && \
164 git checkout -q -f "$($(1)_commit)"; \
165 fi
Stefan Sperling61c11e92018-03-20 18:25:26 +0100166endif
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100167endif
Harald Welte68079822017-12-12 16:30:53 +0100168
169.PHONY: $(1)/clean
Harald Welte4c294b62018-02-15 18:27:10 +0100170$(1)/clean: $(1)
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100171ifeq ($$($(1)_MODIFIED),1)
172 @echo "WARNING: $(1) skipped because it contains uncommitted modifications!"
173else
Harald Welte035f7f82018-03-27 20:49:27 +0200174 cd $(1) && git fetch && git checkout -q -f "$($(1)_commit)" && git reset --hard
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100175endif
Harald Welte4c294b62018-02-15 18:27:10 +0100176
177.PHONY: $(1)/distclean
178$(1)/distclean:
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100179ifeq ($$($(1)_MODIFIED),1)
180 @echo "WARNING: $(1) skipped because it contains uncommitted modifications!"
181else
Harald Welte68079822017-12-12 16:30:53 +0100182 @rm -rf $(1)
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100183endif
Harald Welte68079822017-12-12 16:30:53 +0100184endef
185
Harald Welte8aefd112020-02-18 21:47:06 +0100186$(foreach dir,$(ECLIPSEGITHUB_REPOS), \
187 $(eval $(call GIT_template,$(dir),$(ECLIPSEGITHUB))))
Harald Welte68079822017-12-12 16:30:53 +0100188
189$(foreach dir,$(ECLIPSEGIT2_REPOS), \
190 $(eval $(call GIT_template,$(dir),$(ECLIPSEGIT2))))
Harald Welte701b5742018-01-22 11:29:13 +0100191
Pau Espin Pedrol8c74cbb2021-05-04 15:26:56 +0200192$(foreach dir,$(ECLIPSEGITLAB_REPOS), \
193 $(eval $(call GIT_template,$(dir),$(ECLIPSEGITLAB))))
194
Harald Welte701b5742018-01-22 11:29:13 +0100195$(foreach dir,$(OSMOGITHUB_REPOS), \
196 $(eval $(call GIT_template,$(dir),$(OSMOGITHUB))))
Harald Welte3103fce2018-05-26 13:58:31 +0200197
198$(foreach dir,$(OSMOGIT_REPOS), \
199 $(eval $(call GIT_template,$(dir),$(OSMOGIT))))