Skip to content

Commit c1485af

Browse files
Merge pull request #13385 from kartg/build-dist-make-target
Adding a "source-bundle" target to the Makefile (cherry picked from commit ea4bdac) Conflicts: Makefile
1 parent 8dbdf95 commit c1485af

File tree

4 files changed

+31
-8
lines changed

4 files changed

+31
-8
lines changed

Makefile

+28-5
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ endef
111111
# --------------------------------------------------------------------
112112

113113
.PHONY: source-dist clean-source-dist
114+
.PHONY: source-bundle clean-source-bundle
114115

115116
SOURCE_DIST_BASE ?= rabbitmq-server
116117
SOURCE_DIST_SUFFIXES ?= tar.xz
@@ -122,6 +123,13 @@ SOURCE_DIST_FILES = $(addprefix $(SOURCE_DIST).,$(SOURCE_DIST_SUFFIXES))
122123

123124
.PHONY: $(SOURCE_DIST_FILES)
124125

126+
# Override rsync flags as a pre-requisite
127+
source-bundle: RSYNC_FLAGS = $(SOURCE_BUNDLE_RSYNC_FLAGS)
128+
source-bundle: $(SOURCE_DIST_FILES)
129+
@:
130+
131+
# Override rsync flags as a pre-requisite
132+
source-dist: RSYNC_FLAGS = $(SOURCE_DIST_RSYNC_FLAGS)
125133
source-dist: $(SOURCE_DIST_FILES)
126134
@:
127135

@@ -130,7 +138,9 @@ RSYNC_V_0 =
130138
RSYNC_V_1 = -v
131139
RSYNC_V_2 = -v
132140
RSYNC_V = $(RSYNC_V_$(V))
133-
RSYNC_FLAGS += -a $(RSYNC_V) \
141+
BASE_RSYNC_FLAGS += -a $(RSYNC_V) \
142+
--delete \
143+
--delete-excluded \
134144
--exclude '.sw?' --exclude '.*.sw?' \
135145
--exclude '*.beam' \
136146
--exclude '*.d' \
@@ -162,7 +172,6 @@ RSYNC_FLAGS += -a $(RSYNC_V) \
162172
--exclude '$(notdir $(DEPS_DIR))/' \
163173
--exclude 'hexer*' \
164174
--exclude 'logs/' \
165-
--exclude 'packaging' \
166175
--exclude 'PKG_*.md' \
167176
--exclude '/plugins/' \
168177
--include 'cli/plugins' \
@@ -185,9 +194,21 @@ RSYNC_FLAGS += -a $(RSYNC_V) \
185194
--exclude '/ranch/doc/' \
186195
--exclude '/ranch/examples/' \
187196
--exclude '/sockjs/examples/' \
188-
--exclude '/workflow_sources/' \
189-
--delete \
190-
--delete-excluded
197+
--exclude '/workflow_sources/'
198+
199+
SOURCE_DIST_RSYNC_FLAGS += $(BASE_RSYNC_FLAGS) \
200+
--exclude 'packaging' \
201+
--exclude 'test'
202+
203+
# For source-bundle, explicitly include folders that are needed
204+
# for tests to execute. These are added before excludes from
205+
# the base flags so rsync honors the first match.
206+
SOURCE_BUNDLE_RSYNC_FLAGS += \
207+
--include 'rabbit_shovel_test/ebin' \
208+
--include 'rabbit_shovel_test/ebin/*' \
209+
--include 'rabbitmq_ct_helpers/tools' \
210+
--include 'rabbitmq_ct_helpers/tools/*' \
211+
$(BASE_RSYNC_FLAGS)
191212

192213
TAR ?= tar
193214
TAR_V_0 =
@@ -352,6 +373,8 @@ $(SOURCE_DIST).zip: $(SOURCE_DIST).manifest
352373

353374
clean:: clean-source-dist
354375

376+
clean-source-bundle:: clean-source-dist
377+
355378
clean-source-dist:
356379
$(gen_verbose) rm -rf -- $(SOURCE_DIST_BASE)-*
357380

deps/rabbit_common/include/rabbit_framing.hrl

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
%% License, v. 2.0. If a copy of the MPL was not distributed with this
55
%% file, You can obtain one at https://mozilla.org/MPL/2.0/.
66
%%
7-
%% Copyright (c) 2007-2025 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved.
7+
%% Copyright (c) 2007-2024 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved.
88
%%
99
-define(PROTOCOL_PORT, 5672).
1010
-define(FRAME_METHOD, 1).

deps/rabbit_common/src/rabbit_framing_amqp_0_8.erl

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
%% License, v. 2.0. If a copy of the MPL was not distributed with this
55
%% file, You can obtain one at https://mozilla.org/MPL/2.0/.
66
%%
7-
%% Copyright (c) 2007-2025 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved.
7+
%% Copyright (c) 2007-2024 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved.
88
%%
99
-module(rabbit_framing_amqp_0_8).
1010
-include("rabbit_framing.hrl").

deps/rabbit_common/src/rabbit_framing_amqp_0_9_1.erl

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
%% License, v. 2.0. If a copy of the MPL was not distributed with this
55
%% file, You can obtain one at https://mozilla.org/MPL/2.0/.
66
%%
7-
%% Copyright (c) 2007-2025 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved.
7+
%% Copyright (c) 2007-2024 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries. All rights reserved.
88
%%
99
-module(rabbit_framing_amqp_0_9_1).
1010
-include("rabbit_framing.hrl").

0 commit comments

Comments
 (0)