Harald Welte | 0cdf071 | 2019-06-19 18:15:38 +0200 | [diff] [blame] | 1 | # 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 Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 15 | |
| 16 | ECLIPSEGIT:=https://github.com/eclipse |
| 17 | ECLIPSEGIT2:=git://git.eclipse.org/gitroot/titan |
Harald Welte | 701b574 | 2018-01-22 11:29:13 +0100 | [diff] [blame] | 18 | OSMOGITHUB:=https://github.com/osmocom |
Harald Welte | 3103fce | 2018-05-26 13:58:31 +0200 | [diff] [blame] | 19 | OSMOGIT:=git://git.osmocom.org |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 20 | |
| 21 | ECLIPSEGIT_REPOS= titan.Libraries.TCCUsefulFunctions \ |
| 22 | titan.ProtocolModules.ICMP \ |
| 23 | titan.ProtocolModules.ICMPv6 \ |
| 24 | titan.ProtocolModules.IP \ |
Harald Welte | faa4292 | 2019-03-04 18:31:11 +0100 | [diff] [blame] | 25 | titan.ProtocolModules.JSON_v07_2006 \ |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 26 | titan.ProtocolModules.L2TP \ |
Harald Welte | 36296dc | 2018-04-16 17:37:31 +0200 | [diff] [blame] | 27 | titan.ProtocolModules.SMPP \ |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 28 | titan.ProtocolModules.TCP \ |
| 29 | titan.ProtocolModules.UDP \ |
| 30 | titan.ProtocolModules.RTP \ |
Harald Welte | 56071b7 | 2019-08-18 19:31:26 +0200 | [diff] [blame] | 31 | titan.ProtocolModules.DIAMETER_ProtocolModule_Generator \ |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 32 | titan.TestPorts.Common_Components.Socket-API \ |
Harald Welte | faa4292 | 2019-03-04 18:31:11 +0100 | [diff] [blame] | 33 | titan.TestPorts.Common_Components.Abstract_Socket \ |
| 34 | titan.TestPorts.HTTPmsg \ |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 35 | titan.TestPorts.IPL4asp \ |
| 36 | titan.TestPorts.LANL2asp \ |
| 37 | titan.TestPorts.PCAPasp \ |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 38 | titan.TestPorts.SIPmsg \ |
| 39 | titan.TestPorts.TCPasp \ |
| 40 | titan.TestPorts.TELNETasp \ |
Harald Welte | a28dce1 | 2018-04-14 22:04:05 +0200 | [diff] [blame] | 41 | titan.TestPorts.UDPasp \ |
| 42 | titan.TestPorts.UNIX_DOMAIN_SOCKETasp |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 43 | |
| 44 | ECLIPSEGIT2_REPOS= titan.ProtocolModules.GRE \ |
| 45 | titan.ProtocolModules.M2PA \ |
Harald Welte | 834d67e | 2018-05-26 13:58:03 +0200 | [diff] [blame] | 46 | titan.ProtocolModules.ROSE \ |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 47 | titan.ProtocolModules.SCTP \ |
| 48 | titan.ProtocolModules.SUA \ |
| 49 | titan.ProtocolModules.SDP \ |
| 50 | titan.TestPorts.GPIO \ |
| 51 | titan.ProtocolModules.BSSAPP_v7.3.0 \ |
| 52 | titan.ProtocolModules.BSSGP_v13.0.0 \ |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 53 | titan.ProtocolModules.GTP_v13.5.0 \ |
| 54 | titan.ProtocolModules.GTPv2_v13.7.0 \ |
| 55 | titan.ProtocolModules.ISUP_Q.762 \ |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 56 | titan.ProtocolModules.MobileL3_v13.4.0 \ |
Harald Welte | fc5f637 | 2019-07-09 14:10:05 +0800 | [diff] [blame] | 57 | titan.ProtocolModules.NAS_EPS_15.2.0.1 \ |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 58 | titan.ProtocolModules.NS_v7.3.0 \ |
Harald Welte | b1add59 | 2018-03-27 20:43:40 +0200 | [diff] [blame] | 59 | titan.ProtocolModules.SNDCP_v7.0.0 \ |
| 60 | titan.ProtocolEmulations.SCCP |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 61 | |
Harald Welte | 6fc784e | 2018-02-25 23:31:37 +0100 | [diff] [blame] | 62 | OSMOGITHUB_REPOS= titan.TestPorts.SCTPasp \ |
Harald Welte | 2216b75 | 2019-04-23 22:13:51 +0200 | [diff] [blame] | 63 | titan.ProtocolModules.LLC_v7.1.0 \ |
Harald Welte | 1fd461a | 2018-10-28 10:26:13 +0100 | [diff] [blame] | 64 | titan.ProtocolModules.SGsAP_13.2.0 \ |
Harald Welte | c87abfc | 2018-03-18 10:58:00 +0100 | [diff] [blame] | 65 | titan.TestPorts.MTP3asp \ |
Harald Welte | 3ffb3af | 2019-10-20 18:28:34 +0200 | [diff] [blame] | 66 | titan.ProtocolModules.M3UA \ |
Harald Welte | b1add59 | 2018-03-27 20:43:40 +0200 | [diff] [blame] | 67 | titan.ProtocolEmulations.M3UA |
Harald Welte | 701b574 | 2018-01-22 11:29:13 +0100 | [diff] [blame] | 68 | |
Pau Espin Pedrol | fe0c608 | 2019-05-20 19:20:55 +0200 | [diff] [blame] | 69 | OSMOGIT_REPOS= titan.ProtocolModules.MAP \ |
Harald Welte | f30e22b | 2019-11-14 08:36:19 +0100 | [diff] [blame] | 70 | titan.ProtocolModules.BSSMAP \ |
| 71 | titan.TestPorts.USB |
Harald Welte | 3103fce | 2018-05-26 13:58:31 +0200 | [diff] [blame] | 72 | |
| 73 | ALL_REPOS=$(ECLIPSEGIT_REPOS) $(ECLIPSEGIT2_REPOS) $(OSMOGITHUB_REPOS) $(OSMOGIT_REPOS) |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 74 | |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 75 | # 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'). |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 78 | titan.Libraries.TCCUsefulFunctions_commit= R.30.A |
Harald Welte | 3ffb3af | 2019-10-20 18:28:34 +0200 | [diff] [blame] | 79 | titan.ProtocolEmulations.M3UA_commit= 06b0f71a7d13fafc6f778974f6b4379ad87511ea |
Harald Welte | b1add59 | 2018-03-27 20:43:40 +0200 | [diff] [blame] | 80 | titan.ProtocolEmulations.SCCP_commit= R.7.A-2-g724c83f |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 81 | titan.ProtocolModules.BSSAPP_v7.3.0_commit= R.2.A |
| 82 | titan.ProtocolModules.BSSGP_v13.0.0_commit= R.2.A |
Pau Espin Pedrol | fe0c608 | 2019-05-20 19:20:55 +0200 | [diff] [blame] | 83 | titan.ProtocolModules.BSSMAP_commit= master |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 84 | titan.ProtocolModules.GRE_commit= R.2.A |
| 85 | titan.ProtocolModules.GTP_v13.5.0_commit= R.2.A |
| 86 | titan.ProtocolModules.GTPv2_v13.7.0_commit= R.2.A |
| 87 | titan.ProtocolModules.ICMP_commit= R.2.A |
| 88 | titan.ProtocolModules.ICMPv6_commit= R.2.A |
| 89 | titan.ProtocolModules.IP_commit= R.10.B-1-g99d0ec9 |
| 90 | titan.ProtocolModules.ISUP_Q.762_commit= R.8.A |
Harald Welte | faa4292 | 2019-03-04 18:31:11 +0100 | [diff] [blame] | 91 | titan.ProtocolModules.JSON_v07_2006_commit= R.1.A |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 92 | titan.ProtocolModules.L2TP_commit= R.2.A |
Harald Welte | 2216b75 | 2019-04-23 22:13:51 +0200 | [diff] [blame] | 93 | titan.ProtocolModules.LLC_v7.1.0_commit= 2a3c09fbf7bae22f802aa88689800f38a1f3732d |
Harald Welte | 3103fce | 2018-05-26 13:58:31 +0200 | [diff] [blame] | 94 | titan.ProtocolModules.MAP_commit= R.2.A-1-g79c6a3d |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 95 | titan.ProtocolModules.M2PA_commit= R.2.A |
Harald Welte | 3ffb3af | 2019-10-20 18:28:34 +0200 | [diff] [blame] | 96 | titan.ProtocolModules.M3UA_commit= 2544b6bdc76d18313a235fbfdaf0cac04ebdd603 |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 97 | titan.ProtocolModules.MobileL3_v13.4.0_commit= R.2.A |
Harald Welte | c4148da | 2019-08-18 19:42:04 +0200 | [diff] [blame] | 98 | titan.ProtocolModules.NAS_EPS_15.2.0.1_commit= 2ba853c7d197f7f39d97b76fca4726a7143fb4ad |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 99 | titan.ProtocolModules.NS_v7.3.0_commit= R.2.A |
| 100 | titan.ProtocolModules.RTP_commit= R.5.A |
Harald Welte | 56071b7 | 2019-08-18 19:31:26 +0200 | [diff] [blame] | 101 | titan.ProtocolModules.DIAMETER_ProtocolModule_Generator_commit= ffd939595a08da1b8c8176aaa1f8578bfe02a912 |
Harald Welte | 834d67e | 2018-05-26 13:58:03 +0200 | [diff] [blame] | 102 | titan.ProtocolModules.ROSE_commit= R.1.C |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 103 | titan.ProtocolModules.SCTP_commit= R.2.A |
Harald Welte | 1fd461a | 2018-10-28 10:26:13 +0100 | [diff] [blame] | 104 | titan.ProtocolModules.SGsAP_13.2.0_commit= 520dc48dd41ee15c9fd77e71d2ea7a05c58770b9 |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 105 | titan.ProtocolModules.SDP_commit= R.14.A |
Harald Welte | 36296dc | 2018-04-16 17:37:31 +0200 | [diff] [blame] | 106 | titan.ProtocolModules.SMPP_commit= R.2.A-2-gb7aee69 |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 107 | titan.ProtocolModules.SNDCP_v7.0.0_commit= R.2.A |
| 108 | titan.ProtocolModules.SUA_commit= R.5.A |
| 109 | titan.ProtocolModules.TCP_commit= R.3.A |
| 110 | titan.ProtocolModules.UDP_commit= R.4.A |
| 111 | titan.TestPorts.Common_Components.Socket-API_commit= R.6.A |
Harald Welte | faa4292 | 2019-03-04 18:31:11 +0100 | [diff] [blame] | 112 | titan.TestPorts.Common_Components.Abstract_Socket_commit= R.9.B |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 113 | titan.TestPorts.GPIO_commit= R.3.A |
Harald Welte | faa4292 | 2019-03-04 18:31:11 +0100 | [diff] [blame] | 114 | titan.TestPorts.HTTPmsg_commit= R.9.B |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 115 | titan.TestPorts.IPL4asp_commit= R.29.A |
| 116 | titan.TestPorts.LANL2asp_commit= R.8.B |
| 117 | titan.TestPorts.MTP3asp_commit= 1cecdad6f3641a5f19b3833703bff6e5005eff11 |
| 118 | titan.TestPorts.PCAPasp_commit= R.7.A |
| 119 | titan.TestPorts.SCTPasp_commit= R.11.A-2-g2faa9cf |
| 120 | titan.TestPorts.SIPmsg_commit= R.15.A-1-ge4f9dd0 |
| 121 | titan.TestPorts.TCPasp_commit= R.9.A |
| 122 | titan.TestPorts.TELNETasp_commit= R.9.A |
| 123 | titan.TestPorts.UDPasp_commit= R.8.A |
Harald Welte | 0a068c3 | 2018-04-06 13:52:35 +0200 | [diff] [blame] | 124 | titan.TestPorts.UNIX_DOMAIN_SOCKETasp_commit= R.2.A-4-gbacd73d |
Harald Welte | f30e22b | 2019-11-14 08:36:19 +0100 | [diff] [blame] | 125 | titan.TestPorts.USB_commit= master |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 126 | |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 127 | all: $(foreach dir,$(ALL_REPOS),$(dir)/update) |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 128 | clean: $(foreach dir,$(ALL_REPOS),$(dir)/clean) |
Stefan Sperling | a2b5449 | 2018-03-22 10:22:25 +0100 | [diff] [blame] | 129 | distclean: $(foreach dir,$(ALL_REPOS),$(dir)/distclean) |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 130 | |
| 131 | define GIT_template |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 132 | $(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 Sperling | a2b5449 | 2018-03-22 10:22:25 +0100 | [diff] [blame] | 134 | $(1)_MODIFIED!= if [ -d $(1) ]; then cd $(1) && git diff --quiet --exit-code || echo -n "1"; fi |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 135 | |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 136 | $(1): |
| 137 | git clone $(2)/$(1) |
| 138 | |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 139 | .PHONY: $(1)/update |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 140 | $(1)/update: $(1) |
Stefan Sperling | a2b5449 | 2018-03-22 10:22:25 +0100 | [diff] [blame] | 141 | ifeq ($$($(1)_MODIFIED),1) |
| 142 | @echo "WARNING: $(1) skipped because it contains uncommitted modifications!" |
| 143 | else |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 144 | ifneq ($$($(1)_ORIGIN),$(2)/$(1)) |
| 145 | cd $(1) && git remote set-url origin $(2)/$(1) && git fetch |
| 146 | endif |
| 147 | ifneq ($$($(1)_HEAD),$($(1)_commit)) |
Harald Welte | 035f7f8 | 2018-03-27 20:49:27 +0200 | [diff] [blame] | 148 | cd $(1) && git fetch && git checkout -q -f "$($(1)_commit)" |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 149 | endif |
Stefan Sperling | a2b5449 | 2018-03-22 10:22:25 +0100 | [diff] [blame] | 150 | endif |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 151 | |
| 152 | .PHONY: $(1)/clean |
Harald Welte | 4c294b6 | 2018-02-15 18:27:10 +0100 | [diff] [blame] | 153 | $(1)/clean: $(1) |
Stefan Sperling | a2b5449 | 2018-03-22 10:22:25 +0100 | [diff] [blame] | 154 | ifeq ($$($(1)_MODIFIED),1) |
| 155 | @echo "WARNING: $(1) skipped because it contains uncommitted modifications!" |
| 156 | else |
Harald Welte | 035f7f8 | 2018-03-27 20:49:27 +0200 | [diff] [blame] | 157 | cd $(1) && git fetch && git checkout -q -f "$($(1)_commit)" && git reset --hard |
Stefan Sperling | a2b5449 | 2018-03-22 10:22:25 +0100 | [diff] [blame] | 158 | endif |
Harald Welte | 4c294b6 | 2018-02-15 18:27:10 +0100 | [diff] [blame] | 159 | |
| 160 | .PHONY: $(1)/distclean |
| 161 | $(1)/distclean: |
Stefan Sperling | a2b5449 | 2018-03-22 10:22:25 +0100 | [diff] [blame] | 162 | ifeq ($$($(1)_MODIFIED),1) |
| 163 | @echo "WARNING: $(1) skipped because it contains uncommitted modifications!" |
| 164 | else |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 165 | @rm -rf $(1) |
Stefan Sperling | a2b5449 | 2018-03-22 10:22:25 +0100 | [diff] [blame] | 166 | endif |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 167 | endef |
| 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 Welte | 701b574 | 2018-01-22 11:29:13 +0100 | [diff] [blame] | 174 | |
| 175 | $(foreach dir,$(OSMOGITHUB_REPOS), \ |
| 176 | $(eval $(call GIT_template,$(dir),$(OSMOGITHUB)))) |
Harald Welte | 3103fce | 2018-05-26 13:58:31 +0200 | [diff] [blame] | 177 | |
| 178 | $(foreach dir,$(OSMOGIT_REPOS), \ |
| 179 | $(eval $(call GIT_template,$(dir),$(OSMOGIT)))) |