blob: 11ff460b11377874e368dbc88a506a0929f28457 [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
Pau Espin Pedrol8c74cbb2021-05-04 15:26:56 +020016ECLIPSEGITLAB:=https://gitlab.eclipse.org/eclipse/titan
Harald Welte701b5742018-01-22 11:29:13 +010017OSMOGITHUB:=https://github.com/osmocom
Oliver Smitha80e7a92023-02-21 18:40:46 +010018OSMOGERRIT:=https://gerrit.osmocom.org
19OSMOGITEA:=https://gitea.osmocom.org/ttcn3
Harald Welte68079822017-12-12 16:30:53 +010020
Harald Welte65b3ca72021-05-21 20:50:20 +020021ECLIPSEGITLAB_REPOS= titan.Libraries.TCCUsefulFunctions \
22 titan.ProtocolEmulations.M3UA \
23 titan.ProtocolModules.BSSAPP_v7.3.0 \
24 titan.ProtocolModules.DIAMETER_ProtocolModule_Generator \
Oliver Smith66fde762019-11-29 15:38:52 +010025 titan.ProtocolModules.DNS \
Harald Welte65b3ca72021-05-21 20:50:20 +020026 titan.ProtocolModules.GRE \
27 titan.ProtocolModules.GTP_v13.5.0 \
28 titan.ProtocolModules.GTPv2_v13.7.0 \
Harald Welte68079822017-12-12 16:30:53 +010029 titan.ProtocolModules.ICMP \
30 titan.ProtocolModules.ICMPv6 \
31 titan.ProtocolModules.IP \
Harald Welte65b3ca72021-05-21 20:50:20 +020032 titan.ProtocolModules.ISUP_Q.762 \
Harald Weltefaa42922019-03-04 18:31:11 +010033 titan.ProtocolModules.JSON_v07_2006 \
Harald Welte68079822017-12-12 16:30:53 +010034 titan.ProtocolModules.L2TP \
Harald Welte65b3ca72021-05-21 20:50:20 +020035 titan.ProtocolModules.LLC_v7.1.0 \
Harald Welteb82ca2f2020-01-10 14:51:58 +010036 titan.ProtocolModules.M3UA \
Harald Welte65b3ca72021-05-21 20:50:20 +020037 titan.ProtocolModules.MobileL3_v13.4.0 \
Harald Welte36296dc2018-04-16 17:37:31 +020038 titan.ProtocolModules.SMPP \
Harald Welte68079822017-12-12 16:30:53 +010039 titan.ProtocolModules.TCP \
40 titan.ProtocolModules.UDP \
41 titan.ProtocolModules.RTP \
Harald Welte65b3ca72021-05-21 20:50:20 +020042 titan.ProtocolModules.M2PA \
43 titan.ProtocolModules.ROSE \
44 titan.ProtocolModules.SCTP \
45 titan.ProtocolModules.SDP \
46 titan.ProtocolModules.SUA \
47 titan.ProtocolModules.NAS_EPS_15.2.0.1 \
48 titan.ProtocolModules.NS_v7.3.0 \
49 titan.ProtocolModules.SGsAP_13.2.0 \
50 titan.ProtocolModules.SNDCP_v7.0.0 \
Neels Hofmeyra2d1d7a2022-01-20 23:11:38 +010051 titan.ProtocolModules.PFCP_v15.1.0 \
Harald Welte68079822017-12-12 16:30:53 +010052 titan.TestPorts.Common_Components.Socket-API \
Harald Weltefaa42922019-03-04 18:31:11 +010053 titan.TestPorts.Common_Components.Abstract_Socket \
54 titan.TestPorts.HTTPmsg \
Daniel Willmann095b3e02022-01-11 15:54:46 +010055 titan.TestPorts.IPL4asp \
Harald Welte68079822017-12-12 16:30:53 +010056 titan.TestPorts.LANL2asp \
57 titan.TestPorts.PCAPasp \
Harald Welte34b9da22020-02-18 21:55:07 +010058 titan.TestPorts.PIPEasp \
Harald Welte68079822017-12-12 16:30:53 +010059 titan.TestPorts.SIPmsg \
Harald Welte501e0702020-09-13 11:29:21 +020060 titan.TestPorts.TELNETasp \
Harald Welte68079822017-12-12 16:30:53 +010061 titan.TestPorts.TCPasp \
Vadim Yanitskiyd079b3f2022-08-12 03:17:27 +070062 titan.TestPorts.UDPasp \
Harald Weltea28dce12018-04-14 22:04:05 +020063 titan.TestPorts.UNIX_DOMAIN_SOCKETasp
Harald Welte68079822017-12-12 16:30:53 +010064
Harald Welte6fc784e2018-02-25 23:31:37 +010065OSMOGITHUB_REPOS= titan.TestPorts.SCTPasp \
Harald Weltec87abfc2018-03-18 10:58:00 +010066 titan.TestPorts.MTP3asp \
Harald Welte24f921b2021-02-10 19:37:45 +010067 titan.ProtocolEmulations.SCCP \
Philipp Maier8d095282020-12-15 22:31:03 +010068 titan.ProtocolModules.BSSGP_v13.0.0
Harald Welte701b5742018-01-22 11:29:13 +010069
Pau Espin Pedrol18c15da2023-05-04 13:31:02 +020070OSMOGERRIT_REPOS= osmo-uecups
Harald Welte3103fce2018-05-26 13:58:31 +020071
Pau Espin Pedrol18c15da2023-05-04 13:31:02 +020072OSMOGITEA_REPOS= titan.ProtocolModules.BSSMAP \
73 titan.ProtocolModules.MAP \
Oliver Smitha80e7a92023-02-21 18:40:46 +010074 titan.TestPorts.USB \
75 titan.TestPorts.AF_PACKET
76
Vadim Yanitskiya64fc212023-02-24 15:17:44 +070077ALL_REPOS= $(ECLIPSEGITLAB_REPOS) \
78 $(OSMOGITHUB_REPOS) \
79 $(OSMOGERRIT_REPOS) \
80 $(OSMOGITEA_REPOS) \
81 $(FORKEDGITLAB_REPOS)
Harald Welte68079822017-12-12 16:30:53 +010082
Stefan Sperling61c11e92018-03-20 18:25:26 +010083# Tag names from 'git-describe --tags'; if not available, a commit hash may be used instead.
Pau Espin Pedrol36ef7fc2021-04-19 11:52:52 +020084# Do not put references to branches here, except for local testing: this breaks the caching
85# logic of docker containers, which only invalidate their cached ttcn3 dependencies if this
86# file changed.
Harald Welte6cb85a62020-01-10 16:36:29 +010087titan.Libraries.TCCUsefulFunctions_commit= R.35.B-6-gb3687da
Pau Espin Pedrolffe47392020-07-24 11:02:58 +020088titan.ProtocolEmulations.M3UA_commit= f086e78d74defa044d864f17adaad9433fedc961
Pau Espin Pedrol43799922023-09-20 19:33:12 +020089titan.ProtocolEmulations.SCCP_commit= f8a44f2cdef44d0c3adf787ab3184c293a9a58be
Harald Welte6cb85a62020-01-10 16:36:29 +010090titan.ProtocolModules.BSSAPP_v7.3.0_commit= R.2.A-4-g20cfaf8
Harald Welte14c04452021-01-05 16:23:39 +010091titan.ProtocolModules.BSSGP_v13.0.0_commit= e97d92a8b66bec399babea52f593771b76cb175a
Pau Espin Pedrold35cd6a2023-10-19 16:04:56 +020092titan.ProtocolModules.BSSMAP_commit= 4acb6ab5f058477f0b90c2da182d52054e3614b0
Oliver Smith66fde762019-11-29 15:38:52 +010093titan.ProtocolModules.DNS_commit= R.7.B
Harald Welte6cb85a62020-01-10 16:36:29 +010094titan.ProtocolModules.GRE_commit= R.2.A-5-g654c446
Pau Espin Pedrol60b5e182024-01-08 16:03:42 +010095titan.ProtocolModules.GTP_v13.5.0_commit= 6b769f985eb91bf5a4332f29faa4a043b23ce62e
Harald Welte6cb85a62020-01-10 16:36:29 +010096titan.ProtocolModules.GTPv2_v13.7.0_commit= R.2.A-5-g85cb124
97titan.ProtocolModules.ICMP_commit= e49d9fb9f7de637b4bf4803dc6b6e911a8661640
98titan.ProtocolModules.ICMPv6_commit= 46f4d9b6e1e3c794294a92588401a81e4881dd27
99titan.ProtocolModules.IP_commit= 1be86705f39ae38f3c04b2109806ee20d25e91d0
100titan.ProtocolModules.ISUP_Q.762_commit= R.8.A-5-g42d428b
Harald Weltefaa42922019-03-04 18:31:11 +0100101titan.ProtocolModules.JSON_v07_2006_commit= R.1.A
Harald Welte6cb85a62020-01-10 16:36:29 +0100102titan.ProtocolModules.L2TP_commit= 17e76d3662bd0bb815158e8a9de1ec413f21b530
Harald Welteb82ca2f2020-01-10 14:51:58 +0100103titan.ProtocolModules.LLC_v7.1.0_commit= 09817f113255d7fb56f1d45d3dd629a093d9248d
Harald Welte3103fce2018-05-26 13:58:31 +0200104titan.ProtocolModules.MAP_commit= R.2.A-1-g79c6a3d
Harald Welte6cb85a62020-01-10 16:36:29 +0100105titan.ProtocolModules.M2PA_commit= R.2.A-5-ga75b589
Harald Welteb82ca2f2020-01-10 14:51:58 +0100106titan.ProtocolModules.M3UA_commit= c496d298876fed55c2b730278b7ee77982555563
Andreas Eversberg1a8ed1e2023-08-23 12:23:34 +0200107titan.ProtocolModules.MobileL3_v13.4.0_commit= b6602eb357673f097ea1a1d22edd568ecd239da1
Harald Welte6cb85a62020-01-10 16:36:29 +0100108titan.ProtocolModules.NAS_EPS_15.2.0.1_commit= R.1.A-2-g2ba853c
109titan.ProtocolModules.NS_v7.3.0_commit= R.2.A-6-gf73f195
110titan.ProtocolModules.RTP_commit= R.5.A-4-g83ee83a
Harald Welte56071b72019-08-18 19:31:26 +0200111titan.ProtocolModules.DIAMETER_ProtocolModule_Generator_commit= ffd939595a08da1b8c8176aaa1f8578bfe02a912
Harald Welte6cb85a62020-01-10 16:36:29 +0100112titan.ProtocolModules.ROSE_commit= R.1.C-5-g0f6774c
113titan.ProtocolModules.SCTP_commit= R.2.A-5-g556ef3f
114titan.ProtocolModules.SGsAP_13.2.0_commit= R.1.B-3-g5ccaeab
115titan.ProtocolModules.SDP_commit= R.14.A-6-g7f00ea0
116titan.ProtocolModules.SMPP_commit= R.2.A-5-gf2c9017
117titan.ProtocolModules.SNDCP_v7.0.0_commit= R.2.A-5-gd0f0ce6
118titan.ProtocolModules.SUA_commit= R.5.A-5-gcf1137a
119titan.ProtocolModules.TCP_commit= R.3.A-5-g39e5f45
120titan.ProtocolModules.UDP_commit= R.4.A-5-geea8aa3
Neels Hofmeyra2d1d7a2022-01-20 23:11:38 +0100121titan.ProtocolModules.PFCP_v15.1.0_commit= d550ad9ddb6f9c823c9a555254cd76cf0e738d18
Harald Weltea8dc1982021-02-16 20:01:40 +0100122titan.TestPorts.AF_PACKET_commit= 0.1-5-g89ebea6
Harald Weltebc88eac2020-01-14 22:20:41 +0100123titan.TestPorts.Common_Components.Socket-API_commit= R.6.A-6-gf4380d0
Harald Welte6cb85a62020-01-10 16:36:29 +0100124titan.TestPorts.Common_Components.Abstract_Socket_commit= R.9.B-4-gbd41994
Harald Welte6cb85a62020-01-10 16:36:29 +0100125titan.TestPorts.HTTPmsg_commit= R.9.B-4-g9a0dfde
Daniel Willmann095b3e02022-01-11 15:54:46 +0100126titan.TestPorts.IPL4asp_commit= R.30.E-7-g029bccb
Harald Welte6cb85a62020-01-10 16:36:29 +0100127titan.TestPorts.LANL2asp_commit= R.8.C-3-gb07c265
Stefan Sperling61c11e92018-03-20 18:25:26 +0100128titan.TestPorts.MTP3asp_commit= 1cecdad6f3641a5f19b3833703bff6e5005eff11
Harald Welte6cb85a62020-01-10 16:36:29 +0100129titan.TestPorts.PCAPasp_commit= R.8.A-3-g9ad320f
Harald Welte34b9da22020-02-18 21:55:07 +0100130titan.TestPorts.PIPEasp_commit= R.7.D-3-g8b01154
Daniel Willmann4a8c45f2021-12-22 15:20:35 +0100131titan.TestPorts.SCTPasp_commit= R.11.A-8-g2e911c3
Stefan Sperling61c11e92018-03-20 18:25:26 +0100132titan.TestPorts.SIPmsg_commit= R.15.A-1-ge4f9dd0
Harald Welte6cb85a62020-01-10 16:36:29 +0100133titan.TestPorts.TCPasp_commit= R.9.A-5-g2c91bc6
Harald Welte501e0702020-09-13 11:29:21 +0200134titan.TestPorts.TELNETasp_commit= 873fe539642542cd9a901c208f1ec11c6d2f5387
Vadim Yanitskiyd079b3f2022-08-12 03:17:27 +0700135titan.TestPorts.UDPasp_commit= 54176e95850654e5e8b0ffa2f1b5f35c412b949c
Vadim Yanitskiy94bbe992021-03-23 07:23:34 +0100136titan.TestPorts.UNIX_DOMAIN_SOCKETasp_commit= R.2.A-13-gd34ab71
Harald Welte6220dc72021-06-03 22:45:01 +0200137titan.TestPorts.USB_commit= a9470fdc99c82fbf988f4508c3161118c9106e28
Pau Espin Pedrol36ef7fc2021-04-19 11:52:52 +0200138osmo-uecups_commit= 8362efef7c6fa341eb947a75786878e0685767b7
Harald Welte68079822017-12-12 16:30:53 +0100139
Stefan Sperling61c11e92018-03-20 18:25:26 +0100140all: $(foreach dir,$(ALL_REPOS),$(dir)/update)
Harald Welte68079822017-12-12 16:30:53 +0100141clean: $(foreach dir,$(ALL_REPOS),$(dir)/clean)
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100142distclean: $(foreach dir,$(ALL_REPOS),$(dir)/distclean)
Harald Welte68079822017-12-12 16:30:53 +0100143
144define GIT_template
Stefan Sperling61c11e92018-03-20 18:25:26 +0100145$(1)_ORIGIN!= if [ -d $(1) ]; then cd $(1) && git remote get-url origin; fi
146$(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 +0100147$(1)_MODIFIED!= if [ -d $(1) ]; then cd $(1) && git diff --quiet --exit-code || echo -n "1"; fi
Stefan Sperling61c11e92018-03-20 18:25:26 +0100148
Harald Welte68079822017-12-12 16:30:53 +0100149$(1):
150 git clone $(2)/$(1)
151
Stefan Sperling61c11e92018-03-20 18:25:26 +0100152.PHONY: $(1)/update
Harald Welte68079822017-12-12 16:30:53 +0100153$(1)/update: $(1)
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100154ifeq ($$($(1)_MODIFIED),1)
155 @echo "WARNING: $(1) skipped because it contains uncommitted modifications!"
156else
Stefan Sperling61c11e92018-03-20 18:25:26 +0100157ifneq ($$($(1)_ORIGIN),$(2)/$(1))
158 cd $(1) && git remote set-url origin $(2)/$(1) && git fetch
159endif
160ifneq ($$($(1)_HEAD),$($(1)_commit))
Oliver Smitha25525d2021-04-19 12:22:29 +0200161 cd $(1) && \
162 git fetch && \
163 if git rev-parse "origin/$($(1)_commit)" 2>/dev/null; then \
164 set -x && \
165 git checkout -q -f "origin/$($(1)_commit)"; \
166 else \
167 set -x && \
168 git checkout -q -f "$($(1)_commit)"; \
169 fi
Stefan Sperling61c11e92018-03-20 18:25:26 +0100170endif
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100171endif
Harald Welte68079822017-12-12 16:30:53 +0100172
173.PHONY: $(1)/clean
Harald Welte4c294b62018-02-15 18:27:10 +0100174$(1)/clean: $(1)
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100175ifeq ($$($(1)_MODIFIED),1)
176 @echo "WARNING: $(1) skipped because it contains uncommitted modifications!"
177else
Harald Welte035f7f82018-03-27 20:49:27 +0200178 cd $(1) && git fetch && git checkout -q -f "$($(1)_commit)" && git reset --hard
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100179endif
Harald Welte4c294b62018-02-15 18:27:10 +0100180
181.PHONY: $(1)/distclean
182$(1)/distclean:
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100183ifeq ($$($(1)_MODIFIED),1)
184 @echo "WARNING: $(1) skipped because it contains uncommitted modifications!"
185else
Harald Welte68079822017-12-12 16:30:53 +0100186 @rm -rf $(1)
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100187endif
Harald Welte68079822017-12-12 16:30:53 +0100188endef
189
Pau Espin Pedrol8c74cbb2021-05-04 15:26:56 +0200190$(foreach dir,$(ECLIPSEGITLAB_REPOS), \
191 $(eval $(call GIT_template,$(dir),$(ECLIPSEGITLAB))))
192
Harald Welte701b5742018-01-22 11:29:13 +0100193$(foreach dir,$(OSMOGITHUB_REPOS), \
194 $(eval $(call GIT_template,$(dir),$(OSMOGITHUB))))
Harald Welte3103fce2018-05-26 13:58:31 +0200195
Oliver Smitha80e7a92023-02-21 18:40:46 +0100196$(foreach dir,$(OSMOGERRIT_REPOS), \
197 $(eval $(call GIT_template,$(dir),$(OSMOGERRIT))))
198
199$(foreach dir,$(OSMOGITEA_REPOS), \
200 $(eval $(call GIT_template,$(dir),$(OSMOGITEA))))
Daniel Willmannaa9220a2022-01-05 09:03:59 +0100201
202$(foreach dir,$(FORKEDGITLAB_REPOS), \
203 $(eval $(call GIT_template,$(dir),$(FORKEDGITLAB))))