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 | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 5 | |
| 6 | ECLIPSEGIT_REPOS= titan.Libraries.TCCUsefulFunctions \ |
| 7 | titan.ProtocolModules.ICMP \ |
| 8 | titan.ProtocolModules.ICMPv6 \ |
| 9 | titan.ProtocolModules.IP \ |
| 10 | titan.ProtocolModules.L2TP \ |
| 11 | titan.ProtocolModules.M3UA \ |
Harald Welte | 36296dc | 2018-04-16 17:37:31 +0200 | [diff] [blame] | 12 | titan.ProtocolModules.SMPP \ |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 13 | titan.ProtocolModules.TCP \ |
| 14 | titan.ProtocolModules.UDP \ |
| 15 | titan.ProtocolModules.RTP \ |
| 16 | titan.TestPorts.Common_Components.Socket-API \ |
| 17 | titan.TestPorts.IPL4asp \ |
| 18 | titan.TestPorts.LANL2asp \ |
| 19 | titan.TestPorts.PCAPasp \ |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 20 | titan.TestPorts.SIPmsg \ |
| 21 | titan.TestPorts.TCPasp \ |
| 22 | titan.TestPorts.TELNETasp \ |
Harald Welte | a28dce1 | 2018-04-14 22:04:05 +0200 | [diff] [blame] | 23 | titan.TestPorts.UDPasp \ |
| 24 | titan.TestPorts.UNIX_DOMAIN_SOCKETasp |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 25 | |
| 26 | ECLIPSEGIT2_REPOS= titan.ProtocolModules.GRE \ |
| 27 | titan.ProtocolModules.M2PA \ |
| 28 | titan.ProtocolModules.SCTP \ |
| 29 | titan.ProtocolModules.SUA \ |
| 30 | titan.ProtocolModules.SDP \ |
| 31 | titan.TestPorts.GPIO \ |
| 32 | titan.ProtocolModules.BSSAPP_v7.3.0 \ |
| 33 | titan.ProtocolModules.BSSGP_v13.0.0 \ |
| 34 | titan.ProtocolModules.BSSMAP_v11.2.0 \ |
| 35 | titan.ProtocolModules.GTP_v13.5.0 \ |
| 36 | titan.ProtocolModules.GTPv2_v13.7.0 \ |
| 37 | titan.ProtocolModules.ISUP_Q.762 \ |
| 38 | titan.ProtocolModules.LLC_v7.1.0 \ |
| 39 | titan.ProtocolModules.MobileL3_v13.4.0 \ |
| 40 | titan.ProtocolModules.NS_v7.3.0 \ |
Harald Welte | b1add59 | 2018-03-27 20:43:40 +0200 | [diff] [blame] | 41 | titan.ProtocolModules.SNDCP_v7.0.0 \ |
| 42 | titan.ProtocolEmulations.SCCP |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 43 | |
Harald Welte | 6fc784e | 2018-02-25 23:31:37 +0100 | [diff] [blame] | 44 | OSMOGITHUB_REPOS= titan.TestPorts.SCTPasp \ |
Harald Welte | c87abfc | 2018-03-18 10:58:00 +0100 | [diff] [blame] | 45 | titan.TestPorts.MTP3asp \ |
Harald Welte | b1add59 | 2018-03-27 20:43:40 +0200 | [diff] [blame] | 46 | titan.ProtocolEmulations.M3UA |
Harald Welte | 701b574 | 2018-01-22 11:29:13 +0100 | [diff] [blame] | 47 | |
| 48 | ALL_REPOS=$(ECLIPSEGIT_REPOS) $(ECLIPSEGIT2_REPOS) $(OSMOGITHUB_REPOS) |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 49 | |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 50 | # Tag names from 'git-describe --tags'; if not available, a commit hash may be used instead. |
| 51 | # In order to keep local changes in the repository of a dependency, set its commit to the |
| 52 | # name of a local branch here (e.g. 'master'). |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 53 | titan.Libraries.TCCUsefulFunctions_commit= R.30.A |
Harald Welte | b1add59 | 2018-03-27 20:43:40 +0200 | [diff] [blame] | 54 | titan.ProtocolEmulations.M3UA_commit= R.2.A-1-g53dead2 |
| 55 | titan.ProtocolEmulations.SCCP_commit= R.7.A-2-g724c83f |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 56 | titan.ProtocolModules.BSSAPP_v7.3.0_commit= R.2.A |
| 57 | titan.ProtocolModules.BSSGP_v13.0.0_commit= R.2.A |
| 58 | titan.ProtocolModules.BSSMAP_v11.2.0_commit= R.2.A |
| 59 | titan.ProtocolModules.GRE_commit= R.2.A |
| 60 | titan.ProtocolModules.GTP_v13.5.0_commit= R.2.A |
| 61 | titan.ProtocolModules.GTPv2_v13.7.0_commit= R.2.A |
| 62 | titan.ProtocolModules.ICMP_commit= R.2.A |
| 63 | titan.ProtocolModules.ICMPv6_commit= R.2.A |
| 64 | titan.ProtocolModules.IP_commit= R.10.B-1-g99d0ec9 |
| 65 | titan.ProtocolModules.ISUP_Q.762_commit= R.8.A |
| 66 | titan.ProtocolModules.L2TP_commit= R.2.A |
| 67 | titan.ProtocolModules.LLC_v7.1.0_commit= R.2.A |
| 68 | titan.ProtocolModules.M2PA_commit= R.2.A |
| 69 | titan.ProtocolModules.M3UA_commit= R.2.A |
| 70 | titan.ProtocolModules.MobileL3_v13.4.0_commit= R.2.A |
| 71 | titan.ProtocolModules.NS_v7.3.0_commit= R.2.A |
| 72 | titan.ProtocolModules.RTP_commit= R.5.A |
| 73 | titan.ProtocolModules.SCTP_commit= R.2.A |
| 74 | titan.ProtocolModules.SDP_commit= R.14.A |
Harald Welte | 36296dc | 2018-04-16 17:37:31 +0200 | [diff] [blame] | 75 | titan.ProtocolModules.SMPP_commit= R.2.A-2-gb7aee69 |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 76 | titan.ProtocolModules.SNDCP_v7.0.0_commit= R.2.A |
| 77 | titan.ProtocolModules.SUA_commit= R.5.A |
| 78 | titan.ProtocolModules.TCP_commit= R.3.A |
| 79 | titan.ProtocolModules.UDP_commit= R.4.A |
| 80 | titan.TestPorts.Common_Components.Socket-API_commit= R.6.A |
| 81 | titan.TestPorts.GPIO_commit= R.3.A |
| 82 | titan.TestPorts.IPL4asp_commit= R.29.A |
| 83 | titan.TestPorts.LANL2asp_commit= R.8.B |
| 84 | titan.TestPorts.MTP3asp_commit= 1cecdad6f3641a5f19b3833703bff6e5005eff11 |
| 85 | titan.TestPorts.PCAPasp_commit= R.7.A |
| 86 | titan.TestPorts.SCTPasp_commit= R.11.A-2-g2faa9cf |
| 87 | titan.TestPorts.SIPmsg_commit= R.15.A-1-ge4f9dd0 |
| 88 | titan.TestPorts.TCPasp_commit= R.9.A |
| 89 | titan.TestPorts.TELNETasp_commit= R.9.A |
| 90 | titan.TestPorts.UDPasp_commit= R.8.A |
Harald Welte | 0a068c3 | 2018-04-06 13:52:35 +0200 | [diff] [blame] | 91 | titan.TestPorts.UNIX_DOMAIN_SOCKETasp_commit= R.2.A-4-gbacd73d |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 92 | |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 93 | all: $(foreach dir,$(ALL_REPOS),$(dir)/update) |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 94 | clean: $(foreach dir,$(ALL_REPOS),$(dir)/clean) |
Stefan Sperling | a2b5449 | 2018-03-22 10:22:25 +0100 | [diff] [blame] | 95 | distclean: $(foreach dir,$(ALL_REPOS),$(dir)/distclean) |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 96 | |
| 97 | define GIT_template |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 98 | $(1)_ORIGIN!= if [ -d $(1) ]; then cd $(1) && git remote get-url origin; fi |
| 99 | $(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] | 100 | $(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] | 101 | |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 102 | $(1): |
| 103 | git clone $(2)/$(1) |
| 104 | |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 105 | .PHONY: $(1)/update |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 106 | $(1)/update: $(1) |
Stefan Sperling | a2b5449 | 2018-03-22 10:22:25 +0100 | [diff] [blame] | 107 | ifeq ($$($(1)_MODIFIED),1) |
| 108 | @echo "WARNING: $(1) skipped because it contains uncommitted modifications!" |
| 109 | else |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 110 | ifneq ($$($(1)_ORIGIN),$(2)/$(1)) |
| 111 | cd $(1) && git remote set-url origin $(2)/$(1) && git fetch |
| 112 | endif |
| 113 | ifneq ($$($(1)_HEAD),$($(1)_commit)) |
Harald Welte | 035f7f8 | 2018-03-27 20:49:27 +0200 | [diff] [blame] | 114 | cd $(1) && git fetch && git checkout -q -f "$($(1)_commit)" |
Stefan Sperling | 61c11e9 | 2018-03-20 18:25:26 +0100 | [diff] [blame] | 115 | endif |
Stefan Sperling | a2b5449 | 2018-03-22 10:22:25 +0100 | [diff] [blame] | 116 | endif |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 117 | |
| 118 | .PHONY: $(1)/clean |
Harald Welte | 4c294b6 | 2018-02-15 18:27:10 +0100 | [diff] [blame] | 119 | $(1)/clean: $(1) |
Stefan Sperling | a2b5449 | 2018-03-22 10:22:25 +0100 | [diff] [blame] | 120 | ifeq ($$($(1)_MODIFIED),1) |
| 121 | @echo "WARNING: $(1) skipped because it contains uncommitted modifications!" |
| 122 | else |
Harald Welte | 035f7f8 | 2018-03-27 20:49:27 +0200 | [diff] [blame] | 123 | 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] | 124 | endif |
Harald Welte | 4c294b6 | 2018-02-15 18:27:10 +0100 | [diff] [blame] | 125 | |
| 126 | .PHONY: $(1)/distclean |
| 127 | $(1)/distclean: |
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 | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 131 | @rm -rf $(1) |
Stefan Sperling | a2b5449 | 2018-03-22 10:22:25 +0100 | [diff] [blame] | 132 | endif |
Harald Welte | 6807982 | 2017-12-12 16:30:53 +0100 | [diff] [blame] | 133 | endef |
| 134 | |
| 135 | $(foreach dir,$(ECLIPSEGIT_REPOS), \ |
| 136 | $(eval $(call GIT_template,$(dir),$(ECLIPSEGIT)))) |
| 137 | |
| 138 | $(foreach dir,$(ECLIPSEGIT2_REPOS), \ |
| 139 | $(eval $(call GIT_template,$(dir),$(ECLIPSEGIT2)))) |
Harald Welte | 701b574 | 2018-01-22 11:29:13 +0100 | [diff] [blame] | 140 | |
| 141 | $(foreach dir,$(OSMOGITHUB_REPOS), \ |
| 142 | $(eval $(call GIT_template,$(dir),$(OSMOGITHUB)))) |