Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 1 | |
| 2 | ECLIPSEGIT:=https://github.com/eclipse |
| 3 | ECLIPSEGIT2:=git://git.eclipse.org/gitroot/titan |
Harald Welte | 701b574 | 2018-01-22 11:29:13 +0100 | [diff] [blame] | 4 | OSMOGITHUB:=https://github.com/osmocom |
Harald Welte | 3103fce | 2018-05-26 13:58:31 +0200 | [diff] [blame] | 5 | OSMOGIT:=git://git.osmocom.org |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 6 | |
| 7 | ECLIPSEGIT_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 Welte | 36296dc | 2018-04-16 17:37:31 +0200 | [diff] [blame] | 13 | titan.ProtocolModules.SMPP \ |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 14 | 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 Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 21 | titan.TestPorts.SIPmsg \ |
| 22 | titan.TestPorts.TCPasp \ |
| 23 | titan.TestPorts.TELNETasp \ |
Harald Welte | a28dce1 | 2018-04-14 22:04:05 +0200 | [diff] [blame] | 24 | titan.TestPorts.UDPasp \ |
| 25 | titan.TestPorts.UNIX_DOMAIN_SOCKETasp |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 26 | |
| 27 | ECLIPSEGIT2_REPOS= titan.ProtocolModules.GRE \ |
| 28 | titan.ProtocolModules.M2PA \ |
Harald Welte | 834d67e | 2018-05-26 13:58:03 +0200 | [diff] [blame] | 29 | titan.ProtocolModules.ROSE \ |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 30 | 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 \ |
| 40 | titan.ProtocolModules.LLC_v7.1.0 \ |
| 41 | titan.ProtocolModules.MobileL3_v13.4.0 \ |
| 42 | titan.ProtocolModules.NS_v7.3.0 \ |
Harald Welte | b1add59 | 2018-03-27 20:43:40 +0200 | [diff] [blame] | 43 | titan.ProtocolModules.SNDCP_v7.0.0 \ |
| 44 | titan.ProtocolEmulations.SCCP |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 45 | |
Harald Welte | 6fc784e | 2018-02-25 23:31:37 +0100 | [diff] [blame] | 46 | OSMOGITHUB_REPOS= titan.TestPorts.SCTPasp \ |
Harald Welte | 1fd461a | 2018-10-28 10:26:13 +0100 | [diff] [blame] | 47 | titan.ProtocolModules.SGsAP_13.2.0 \ |
Harald Welte | c87abfc | 2018-03-18 10:58:00 +0100 | [diff] [blame] | 48 | titan.TestPorts.MTP3asp \ |
Harald Welte | b1add59 | 2018-03-27 20:43:40 +0200 | [diff] [blame] | 49 | titan.ProtocolEmulations.M3UA |
Harald Welte | 701b574 | 2018-01-22 11:29:13 +0100 | [diff] [blame] | 50 | |
Harald Welte | 3103fce | 2018-05-26 13:58:31 +0200 | [diff] [blame] | 51 | OSMOGIT_REPOS= titan.ProtocolModules.MAP |
| 52 | |
| 53 | ALL_REPOS=$(ECLIPSEGIT_REPOS) $(ECLIPSEGIT2_REPOS) $(OSMOGITHUB_REPOS) $(OSMOGIT_REPOS) |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 54 | |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 55 | # 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 Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 58 | titan.Libraries.TCCUsefulFunctions_commit= R.30.A |
Stefan Sperling | e6bf4ac | 2018-06-12 17:36:26 +0200 | [diff] [blame] | 59 | titan.ProtocolEmulations.M3UA_commit= R.2.A-2-g742cf02 |
Harald Welte | b1add59 | 2018-03-27 20:43:40 +0200 | [diff] [blame] | 60 | titan.ProtocolEmulations.SCCP_commit= R.7.A-2-g724c83f |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 61 | titan.ProtocolModules.BSSAPP_v7.3.0_commit= R.2.A |
| 62 | titan.ProtocolModules.BSSGP_v13.0.0_commit= R.2.A |
| 63 | titan.ProtocolModules.BSSMAP_v11.2.0_commit= R.2.A |
| 64 | titan.ProtocolModules.GRE_commit= R.2.A |
| 65 | titan.ProtocolModules.GTP_v13.5.0_commit= R.2.A |
| 66 | titan.ProtocolModules.GTPv2_v13.7.0_commit= R.2.A |
| 67 | titan.ProtocolModules.ICMP_commit= R.2.A |
| 68 | titan.ProtocolModules.ICMPv6_commit= R.2.A |
| 69 | titan.ProtocolModules.IP_commit= R.10.B-1-g99d0ec9 |
| 70 | titan.ProtocolModules.ISUP_Q.762_commit= R.8.A |
| 71 | titan.ProtocolModules.L2TP_commit= R.2.A |
| 72 | titan.ProtocolModules.LLC_v7.1.0_commit= R.2.A |
Harald Welte | 3103fce | 2018-05-26 13:58:31 +0200 | [diff] [blame] | 73 | titan.ProtocolModules.MAP_commit= R.2.A-1-g79c6a3d |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 74 | titan.ProtocolModules.M2PA_commit= R.2.A |
| 75 | titan.ProtocolModules.M3UA_commit= R.2.A |
| 76 | titan.ProtocolModules.MobileL3_v13.4.0_commit= R.2.A |
| 77 | titan.ProtocolModules.NS_v7.3.0_commit= R.2.A |
| 78 | titan.ProtocolModules.RTP_commit= R.5.A |
Harald Welte | 834d67e | 2018-05-26 13:58:03 +0200 | [diff] [blame] | 79 | titan.ProtocolModules.ROSE_commit= R.1.C |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 80 | titan.ProtocolModules.SCTP_commit= R.2.A |
Harald Welte | 1fd461a | 2018-10-28 10:26:13 +0100 | [diff] [blame] | 81 | titan.ProtocolModules.SGsAP_13.2.0_commit= 520dc48dd41ee15c9fd77e71d2ea7a05c58770b9 |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 82 | titan.ProtocolModules.SDP_commit= R.14.A |
Harald Welte | 36296dc | 2018-04-16 17:37:31 +0200 | [diff] [blame] | 83 | titan.ProtocolModules.SMPP_commit= R.2.A-2-gb7aee69 |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 84 | titan.ProtocolModules.SNDCP_v7.0.0_commit= R.2.A |
| 85 | titan.ProtocolModules.SUA_commit= R.5.A |
| 86 | titan.ProtocolModules.TCP_commit= R.3.A |
| 87 | titan.ProtocolModules.UDP_commit= R.4.A |
| 88 | titan.TestPorts.Common_Components.Socket-API_commit= R.6.A |
| 89 | titan.TestPorts.GPIO_commit= R.3.A |
| 90 | titan.TestPorts.IPL4asp_commit= R.29.A |
| 91 | titan.TestPorts.LANL2asp_commit= R.8.B |
| 92 | titan.TestPorts.MTP3asp_commit= 1cecdad6f3641a5f19b3833703bff6e5005eff11 |
| 93 | titan.TestPorts.PCAPasp_commit= R.7.A |
| 94 | titan.TestPorts.SCTPasp_commit= R.11.A-2-g2faa9cf |
| 95 | titan.TestPorts.SIPmsg_commit= R.15.A-1-ge4f9dd0 |
| 96 | titan.TestPorts.TCPasp_commit= R.9.A |
| 97 | titan.TestPorts.TELNETasp_commit= R.9.A |
| 98 | titan.TestPorts.UDPasp_commit= R.8.A |
Harald Welte | 0a068c3 | 2018-04-06 13:52:35 +0200 | [diff] [blame] | 99 | titan.TestPorts.UNIX_DOMAIN_SOCKETasp_commit= R.2.A-4-gbacd73d |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 100 | |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 101 | all: $(foreach dir,$(ALL_REPOS),$(dir)/update) |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 102 | clean: $(foreach dir,$(ALL_REPOS),$(dir)/clean) |
Stefan Sperling | a2b5449 | 2018-03-22 10:22:25 +0100 | [diff] [blame] | 103 | distclean: $(foreach dir,$(ALL_REPOS),$(dir)/distclean) |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 104 | |
| 105 | define GIT_template |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 106 | $(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 Sperling | a2b5449 | 2018-03-22 10:22:25 +0100 | [diff] [blame] | 108 | $(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] | 109 | |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 110 | $(1): |
| 111 | git clone $(2)/$(1) |
| 112 | |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 113 | .PHONY: $(1)/update |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 114 | $(1)/update: $(1) |
Stefan Sperling | a2b5449 | 2018-03-22 10:22:25 +0100 | [diff] [blame] | 115 | ifeq ($$($(1)_MODIFIED),1) |
| 116 | @echo "WARNING: $(1) skipped because it contains uncommitted modifications!" |
| 117 | else |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 118 | ifneq ($$($(1)_ORIGIN),$(2)/$(1)) |
| 119 | cd $(1) && git remote set-url origin $(2)/$(1) && git fetch |
| 120 | endif |
| 121 | ifneq ($$($(1)_HEAD),$($(1)_commit)) |
Harald Welte | 035f7f8 | 2018-03-27 20:49:27 +0200 | [diff] [blame] | 122 | cd $(1) && git fetch && git checkout -q -f "$($(1)_commit)" |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 123 | endif |
Stefan Sperling | a2b5449 | 2018-03-22 10:22:25 +0100 | [diff] [blame] | 124 | endif |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 125 | |
| 126 | .PHONY: $(1)/clean |
Harald Welte | 4c294b6 | 2018-02-15 18:27:10 +0100 | [diff] [blame] | 127 | $(1)/clean: $(1) |
Stefan Sperling | a2b5449 | 2018-03-22 10:22:25 +0100 | [diff] [blame] | 128 | ifeq ($$($(1)_MODIFIED),1) |
| 129 | @echo "WARNING: $(1) skipped because it contains uncommitted modifications!" |
| 130 | else |
Harald Welte | 035f7f8 | 2018-03-27 20:49:27 +0200 | [diff] [blame] | 131 | 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] | 132 | endif |
Harald Welte | 4c294b6 | 2018-02-15 18:27:10 +0100 | [diff] [blame] | 133 | |
| 134 | .PHONY: $(1)/distclean |
| 135 | $(1)/distclean: |
Stefan Sperling | a2b5449 | 2018-03-22 10:22:25 +0100 | [diff] [blame] | 136 | ifeq ($$($(1)_MODIFIED),1) |
| 137 | @echo "WARNING: $(1) skipped because it contains uncommitted modifications!" |
| 138 | else |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 139 | @rm -rf $(1) |
Stefan Sperling | a2b5449 | 2018-03-22 10:22:25 +0100 | [diff] [blame] | 140 | endif |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 141 | endef |
| 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 Welte | 701b574 | 2018-01-22 11:29:13 +0100 | [diff] [blame] | 148 | |
| 149 | $(foreach dir,$(OSMOGITHUB_REPOS), \ |
| 150 | $(eval $(call GIT_template,$(dir),$(OSMOGITHUB)))) |
Harald Welte | 3103fce | 2018-05-26 13:58:31 +0200 | [diff] [blame] | 151 | |
| 152 | $(foreach dir,$(OSMOGIT_REPOS), \ |
| 153 | $(eval $(call GIT_template,$(dir),$(OSMOGIT)))) |