blob: 012b9251df8a35d36072d4a1dd05b7fc98c3da79 [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
16ECLIPSEGIT:=https://github.com/eclipse
17ECLIPSEGIT2:=git://git.eclipse.org/gitroot/titan
Harald Welte701b5742018-01-22 11:29:13 +010018OSMOGITHUB:=https://github.com/osmocom
Harald Welte3103fce2018-05-26 13:58:31 +020019OSMOGIT:=git://git.osmocom.org
Harald Welte68079822017-12-12 16:30:53 +010020
21ECLIPSEGIT_REPOS= titan.Libraries.TCCUsefulFunctions \
22 titan.ProtocolModules.ICMP \
23 titan.ProtocolModules.ICMPv6 \
24 titan.ProtocolModules.IP \
Harald Weltefaa42922019-03-04 18:31:11 +010025 titan.ProtocolModules.JSON_v07_2006 \
Harald Welte68079822017-12-12 16:30:53 +010026 titan.ProtocolModules.L2TP \
Harald Welteb82ca2f2020-01-10 14:51:58 +010027 titan.ProtocolModules.M3UA \
Harald Welte36296dc2018-04-16 17:37:31 +020028 titan.ProtocolModules.SMPP \
Harald Welte68079822017-12-12 16:30:53 +010029 titan.ProtocolModules.TCP \
30 titan.ProtocolModules.UDP \
31 titan.ProtocolModules.RTP \
Harald Welte56071b72019-08-18 19:31:26 +020032 titan.ProtocolModules.DIAMETER_ProtocolModule_Generator \
Harald Welte68079822017-12-12 16:30:53 +010033 titan.TestPorts.Common_Components.Socket-API \
Harald Weltefaa42922019-03-04 18:31:11 +010034 titan.TestPorts.Common_Components.Abstract_Socket \
35 titan.TestPorts.HTTPmsg \
Harald Welte68079822017-12-12 16:30:53 +010036 titan.TestPorts.IPL4asp \
37 titan.TestPorts.LANL2asp \
38 titan.TestPorts.PCAPasp \
Harald Welte68079822017-12-12 16:30:53 +010039 titan.TestPorts.SIPmsg \
40 titan.TestPorts.TCPasp \
41 titan.TestPorts.TELNETasp \
Harald Weltea28dce12018-04-14 22:04:05 +020042 titan.TestPorts.UDPasp \
43 titan.TestPorts.UNIX_DOMAIN_SOCKETasp
Harald Welte68079822017-12-12 16:30:53 +010044
45ECLIPSEGIT2_REPOS= titan.ProtocolModules.GRE \
46 titan.ProtocolModules.M2PA \
Harald Welte834d67e2018-05-26 13:58:03 +020047 titan.ProtocolModules.ROSE \
Harald Welte68079822017-12-12 16:30:53 +010048 titan.ProtocolModules.SCTP \
49 titan.ProtocolModules.SUA \
50 titan.ProtocolModules.SDP \
51 titan.TestPorts.GPIO \
52 titan.ProtocolModules.BSSAPP_v7.3.0 \
53 titan.ProtocolModules.BSSGP_v13.0.0 \
Harald Welte68079822017-12-12 16:30:53 +010054 titan.ProtocolModules.GTP_v13.5.0 \
55 titan.ProtocolModules.GTPv2_v13.7.0 \
56 titan.ProtocolModules.ISUP_Q.762 \
Harald Welteb82ca2f2020-01-10 14:51:58 +010057 titan.ProtocolModules.LLC_v7.1.0 \
Harald Welte68079822017-12-12 16:30:53 +010058 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 Welteb1add592018-03-27 20:43:40 +020062 titan.ProtocolModules.SNDCP_v7.0.0 \
Harald Welte68079822017-12-12 16:30:53 +010063
Harald Welte6fc784e2018-02-25 23:31:37 +010064OSMOGITHUB_REPOS= titan.TestPorts.SCTPasp \
Harald Weltec87abfc2018-03-18 10:58:00 +010065 titan.TestPorts.MTP3asp \
Harald Welted0575c22020-01-10 14:20:18 +010066 titan.ProtocolEmulations.M3UA \
67 titan.ProtocolEmulations.SCCP
Harald Welte701b5742018-01-22 11:29:13 +010068
Pau Espin Pedrolfe0c6082019-05-20 19:20:55 +020069OSMOGIT_REPOS= titan.ProtocolModules.MAP \
Harald Weltef30e22b2019-11-14 08:36:19 +010070 titan.ProtocolModules.BSSMAP \
71 titan.TestPorts.USB
Harald Welte3103fce2018-05-26 13:58:31 +020072
73ALL_REPOS=$(ECLIPSEGIT_REPOS) $(ECLIPSEGIT2_REPOS) $(OSMOGITHUB_REPOS) $(OSMOGIT_REPOS)
Harald Welte68079822017-12-12 16:30:53 +010074
Stefan Sperling61c11e92018-03-20 18:25:26 +010075# Tag names from 'git-describe --tags'; if not available, a commit hash may be used instead.
76# In order to keep local changes in the repository of a dependency, set its commit to the
77# name of a local branch here (e.g. 'master').
Harald Welte6cb85a62020-01-10 16:36:29 +010078titan.Libraries.TCCUsefulFunctions_commit= R.35.B-6-gb3687da
Harald Welte3ffb3af2019-10-20 18:28:34 +020079titan.ProtocolEmulations.M3UA_commit= 06b0f71a7d13fafc6f778974f6b4379ad87511ea
Harald Welte6cb85a62020-01-10 16:36:29 +010080titan.ProtocolEmulations.SCCP_commit= R.7.A-9-g9e70fba
81titan.ProtocolModules.BSSAPP_v7.3.0_commit= R.2.A-4-g20cfaf8
82titan.ProtocolModules.BSSGP_v13.0.0_commit= R.2.A-6-gc447f28
Pau Espin Pedrolfe0c6082019-05-20 19:20:55 +020083titan.ProtocolModules.BSSMAP_commit= master
Harald Welte6cb85a62020-01-10 16:36:29 +010084titan.ProtocolModules.GRE_commit= R.2.A-5-g654c446
85titan.ProtocolModules.GTP_v13.5.0_commit= R.2.A-5-ge120ace
86titan.ProtocolModules.GTPv2_v13.7.0_commit= R.2.A-5-g85cb124
87titan.ProtocolModules.ICMP_commit= e49d9fb9f7de637b4bf4803dc6b6e911a8661640
88titan.ProtocolModules.ICMPv6_commit= 46f4d9b6e1e3c794294a92588401a81e4881dd27
89titan.ProtocolModules.IP_commit= 1be86705f39ae38f3c04b2109806ee20d25e91d0
90titan.ProtocolModules.ISUP_Q.762_commit= R.8.A-5-g42d428b
Harald Weltefaa42922019-03-04 18:31:11 +010091titan.ProtocolModules.JSON_v07_2006_commit= R.1.A
Harald Welte6cb85a62020-01-10 16:36:29 +010092titan.ProtocolModules.L2TP_commit= 17e76d3662bd0bb815158e8a9de1ec413f21b530
Harald Welteb82ca2f2020-01-10 14:51:58 +010093titan.ProtocolModules.LLC_v7.1.0_commit= 09817f113255d7fb56f1d45d3dd629a093d9248d
Harald Welte3103fce2018-05-26 13:58:31 +020094titan.ProtocolModules.MAP_commit= R.2.A-1-g79c6a3d
Harald Welte6cb85a62020-01-10 16:36:29 +010095titan.ProtocolModules.M2PA_commit= R.2.A-5-ga75b589
Harald Welteb82ca2f2020-01-10 14:51:58 +010096titan.ProtocolModules.M3UA_commit= c496d298876fed55c2b730278b7ee77982555563
Harald Welte6cb85a62020-01-10 16:36:29 +010097titan.ProtocolModules.MobileL3_v13.4.0_commit= 2b5149e158e8077a7b9cf431b0c6b635f874c63b
98titan.ProtocolModules.NAS_EPS_15.2.0.1_commit= R.1.A-2-g2ba853c
99titan.ProtocolModules.NS_v7.3.0_commit= R.2.A-6-gf73f195
100titan.ProtocolModules.RTP_commit= R.5.A-4-g83ee83a
Harald Welte56071b72019-08-18 19:31:26 +0200101titan.ProtocolModules.DIAMETER_ProtocolModule_Generator_commit= ffd939595a08da1b8c8176aaa1f8578bfe02a912
Harald Welte6cb85a62020-01-10 16:36:29 +0100102titan.ProtocolModules.ROSE_commit= R.1.C-5-g0f6774c
103titan.ProtocolModules.SCTP_commit= R.2.A-5-g556ef3f
104titan.ProtocolModules.SGsAP_13.2.0_commit= R.1.B-3-g5ccaeab
105titan.ProtocolModules.SDP_commit= R.14.A-6-g7f00ea0
106titan.ProtocolModules.SMPP_commit= R.2.A-5-gf2c9017
107titan.ProtocolModules.SNDCP_v7.0.0_commit= R.2.A-5-gd0f0ce6
108titan.ProtocolModules.SUA_commit= R.5.A-5-gcf1137a
109titan.ProtocolModules.TCP_commit= R.3.A-5-g39e5f45
110titan.ProtocolModules.UDP_commit= R.4.A-5-geea8aa3
111titan.TestPorts.Common_Components.Socket-API_commit= R.6.A-5-g86b7d7f
112titan.TestPorts.Common_Components.Abstract_Socket_commit= R.9.B-4-gbd41994
113titan.TestPorts.GPIO_commit= R.2.A-8-g9728492
114titan.TestPorts.HTTPmsg_commit= R.9.B-4-g9a0dfde
115titan.TestPorts.IPL4asp_commit= R.30.C-3-g24f0681
116titan.TestPorts.LANL2asp_commit= R.8.C-3-gb07c265
Stefan Sperling61c11e92018-03-20 18:25:26 +0100117titan.TestPorts.MTP3asp_commit= 1cecdad6f3641a5f19b3833703bff6e5005eff11
Harald Welte6cb85a62020-01-10 16:36:29 +0100118titan.TestPorts.PCAPasp_commit= R.8.A-3-g9ad320f
Stefan Sperling61c11e92018-03-20 18:25:26 +0100119titan.TestPorts.SCTPasp_commit= R.11.A-2-g2faa9cf
120titan.TestPorts.SIPmsg_commit= R.15.A-1-ge4f9dd0
Harald Welte6cb85a62020-01-10 16:36:29 +0100121titan.TestPorts.TCPasp_commit= R.9.A-5-g2c91bc6
122titan.TestPorts.TELNETasp_commit= R.9.A-3-g62f281b
123titan.TestPorts.UDPasp_commit= R.8.B-3-gbf5e87b
124titan.TestPorts.UNIX_DOMAIN_SOCKETasp_commit= R.2.A-8-g7ec4fe0
Harald Weltef30e22b2019-11-14 08:36:19 +0100125titan.TestPorts.USB_commit= master
Harald Welte68079822017-12-12 16:30:53 +0100126
Stefan Sperling61c11e92018-03-20 18:25:26 +0100127all: $(foreach dir,$(ALL_REPOS),$(dir)/update)
Harald Welte68079822017-12-12 16:30:53 +0100128clean: $(foreach dir,$(ALL_REPOS),$(dir)/clean)
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100129distclean: $(foreach dir,$(ALL_REPOS),$(dir)/distclean)
Harald Welte68079822017-12-12 16:30:53 +0100130
131define GIT_template
Stefan Sperling61c11e92018-03-20 18:25:26 +0100132$(1)_ORIGIN!= if [ -d $(1) ]; then cd $(1) && git remote get-url origin; fi
133$(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 +0100134$(1)_MODIFIED!= if [ -d $(1) ]; then cd $(1) && git diff --quiet --exit-code || echo -n "1"; fi
Stefan Sperling61c11e92018-03-20 18:25:26 +0100135
Harald Welte68079822017-12-12 16:30:53 +0100136$(1):
137 git clone $(2)/$(1)
138
Stefan Sperling61c11e92018-03-20 18:25:26 +0100139.PHONY: $(1)/update
Harald Welte68079822017-12-12 16:30:53 +0100140$(1)/update: $(1)
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100141ifeq ($$($(1)_MODIFIED),1)
142 @echo "WARNING: $(1) skipped because it contains uncommitted modifications!"
143else
Stefan Sperling61c11e92018-03-20 18:25:26 +0100144ifneq ($$($(1)_ORIGIN),$(2)/$(1))
145 cd $(1) && git remote set-url origin $(2)/$(1) && git fetch
146endif
147ifneq ($$($(1)_HEAD),$($(1)_commit))
Harald Welte035f7f82018-03-27 20:49:27 +0200148 cd $(1) && git fetch && git checkout -q -f "$($(1)_commit)"
Stefan Sperling61c11e92018-03-20 18:25:26 +0100149endif
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100150endif
Harald Welte68079822017-12-12 16:30:53 +0100151
152.PHONY: $(1)/clean
Harald Welte4c294b62018-02-15 18:27:10 +0100153$(1)/clean: $(1)
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100154ifeq ($$($(1)_MODIFIED),1)
155 @echo "WARNING: $(1) skipped because it contains uncommitted modifications!"
156else
Harald Welte035f7f82018-03-27 20:49:27 +0200157 cd $(1) && git fetch && git checkout -q -f "$($(1)_commit)" && git reset --hard
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100158endif
Harald Welte4c294b62018-02-15 18:27:10 +0100159
160.PHONY: $(1)/distclean
161$(1)/distclean:
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100162ifeq ($$($(1)_MODIFIED),1)
163 @echo "WARNING: $(1) skipped because it contains uncommitted modifications!"
164else
Harald Welte68079822017-12-12 16:30:53 +0100165 @rm -rf $(1)
Stefan Sperlinga2b54492018-03-22 10:22:25 +0100166endif
Harald Welte68079822017-12-12 16:30:53 +0100167endef
168
169$(foreach dir,$(ECLIPSEGIT_REPOS), \
170 $(eval $(call GIT_template,$(dir),$(ECLIPSEGIT))))
171
172$(foreach dir,$(ECLIPSEGIT2_REPOS), \
173 $(eval $(call GIT_template,$(dir),$(ECLIPSEGIT2))))
Harald Welte701b5742018-01-22 11:29:13 +0100174
175$(foreach dir,$(OSMOGITHUB_REPOS), \
176 $(eval $(call GIT_template,$(dir),$(OSMOGITHUB))))
Harald Welte3103fce2018-05-26 13:58:31 +0200177
178$(foreach dir,$(OSMOGIT_REPOS), \
179 $(eval $(call GIT_template,$(dir),$(OSMOGIT))))