Merge pull request #11573 from rabbitmq/loic-more-make

Another make PR
This commit is contained in:
Loïc Hoguin 2024-07-01 14:27:04 +02:00 committed by GitHub
commit a561b45dcf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
57 changed files with 123 additions and 1158 deletions

100
.gitignore vendored
View File

@ -1,11 +1,30 @@
# Editor/OS temporary and unwanted files.
*~
\#*
.#*
.sw?
*.tmp
.*.sw?
/.erlang.mk/
/_build/
/ebin/
/bin/
*.orig
*.tmp
.idea/
.tool-versions
.vscode/
.DS_Store
# Erlang.mk temporary files and outputs.
*.plt
*.d
.erlang.mk/
cover/
docs/*.html
ebin/
logs/
**/test/*.beam
**/test/ct.cover.spec
elvis
# Dependencies excluding RabbitMQ applications.
/deps/*
!/deps/rabbit/
!/deps/rabbit_common/
@ -59,44 +78,57 @@
!/deps/rabbitmq_web_stomp/
!/deps/rabbitmq_web_stomp_examples/
!/deps/trust_store_http/
/escript/
/escript.lock
/plugins/
/plugins.lock
/sbin/
/sbin.lock
ct.cover.spec
erl_crash.dump
# Rebar3/Elixir temporary files and outputs.
.rebar3/
_build/
_checkouts/
rebar3.crashdump
.envrc
.exrc
.ignore
*.plt
# Automatically generated rebar.config files.
rebar.config
!/deps/amqp10_common/rebar.config
!/rebar.config
# Bazel.
.bazelrc
user.bazelrc
bazel-*
extra_deps/
# Erlang/OTP unwanted files.
.erlang.cookie
erl_crash.dump
MnesiaCore.*
# RabbitMQ Makefiles temporary files and outputs.
*.lock
/logs/
/genhtml/
/topic-branch-scratch/
escript/
plugins/
sbin/
git-revisions.txt
PACKAGES/
packaging/docker-image/rabbitmq_server-*/
# Source distribution.
rabbitmq-server-*/
rabbitmq-server-*.tar.gz
rabbitmq-server-*.tar.bz2
rabbitmq-server-*.tar.xz
rabbitmq-server-*.zip
# Trace tools output.
*-ttb
*.ti
*.lz4*
traces*
callgrind.out*
callgraph.dot*
# Unknown. If you know in which category this belongs to,
# please move it there. Thank you.
.envrc
.exrc
.ignore
/genhtml/
# @todo Should be moved to rabbitmq_stomp directly.
deps/rabbitmq_stomp/test/python_SUITE_data/src/deps
callgrand*
/user.bazelrc
/bazel-*
/extra_deps/
.tool-versions
.vscode
.idea

View File

@ -64,7 +64,6 @@ PROJECT_VERSION := $(PROJECT_VERSION)
include erlang.mk
include mk/github-actions.mk
include mk/bazel.mk
include mk/topic-branches.mk
# If PLUGINS was set when we use run-broker we want to
# fill in the enabled plugins list. PLUGINS is a more

View File

@ -1,24 +1,3 @@
.sw?
.*.sw?
*.beam
*.plt
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
elvis
amqp10_client.d
/*.coverdata
# Generated source files.
/include/rabbit_amqp1_0_framing.hrl
/src/rabbit_amqp1_0_framing0.erl

View File

@ -1,28 +1,3 @@
*~
.sw?
.*.sw?
*.beam
*.coverdata
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/git-revisions.txt
/logs/
/plugins/
/plugins.lock
/rebar.lock
/sbin/
/sbin.lock
/test/ct.cover.spec
_build
/amqp10_common.d
/*.plt
# Generated source files.
/include/amqp10_framing.hrl
/src/amqp10_framing0.erl

View File

@ -1,21 +0,0 @@
.sw?
.*.sw?
*.beam
*.coverdata
/.erlang.mk/
/_build/
/cover/
/deps/
/doc/
/ebin/
/escript/
/git-revisions.txt
/logs/
/PACKAGES/
*.plt
/plugins/
/rebar.config
/rebar.lock
/sbin
/test/ct.cover.spec
/amqp_client.d

View File

@ -1,20 +0,0 @@
.sw?
.*.sw?
*.beam
*.plt
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
elvis
/*.coverdata
oauth2_client.d

View File

@ -1,42 +1,6 @@
*~
.sw?
.*.sw?
*.beam
*.coverdata
MnesiaCore.*
/.erlang.mk/
/cover/
/debug/
/deps/
/debug/
/doc/
/ebin/
/escript/
/escript.lock
/etc/
/logs/
/plugins/
/plugins.lock
/test/ct.cover.spec
/test/config_schema_SUITE_data/schema/**
/sbin/
/sbin.lock
rabbit.d
# Generated documentation.
docs/*.html
# Dialyzer
*.plt
# Tracing tools
*-ttb
*.ti
*.lz4*
callgrind.out*
callgraph.dot*
PACKAGES/*
rabbit-rabbitmq-deps.mk

View File

@ -1,7 +0,0 @@
/.erlang.mk/
/deps/
/ebin/
/escript
/plugins/
/my_plugin.d
/sbin

View File

@ -1,25 +0,0 @@
*~
.sw?
.*.sw?
.*.plt
*.beam
*.coverdata
/.*.plt
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/git-revisions.txt
/logs/
/plugins/
/plugins.lock
/rebar.config
/rebar.lock
/sbin/
/sbin.lock
/test/ct.cover.spec
/rabbit_common.d

View File

@ -1,17 +0,0 @@
.sw?
.*.sw?
*.beam
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
/rabbitmq_amqp1_0.d

View File

@ -1,17 +0,0 @@
.sw?
.*.sw?
*.beam
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
/rabbitmq_amqp_client.d

View File

@ -1,19 +1 @@
.sw?
.*.sw?
*.beam
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
test/config_schema_SUITE_data/schema/
/rabbitmq_auth_backend_cache.d

View File

@ -1,22 +1 @@
.sw?
.*.sw?
*.beam
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
test/config_schema_SUITE_data/schema/
/rabbitmq_auth_backend_http.d
.idea

View File

@ -1,20 +1,3 @@
.sw?
.*.sw?
*.beam
.vagrant
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
test/config_schema_SUITE_data/schema/
rabbitmq_auth_backend_ldap.d

View File

@ -1,17 +0,0 @@
.sw?
.*.sw?
*.beam
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
/rabbitmq_auth_backend_oauth2.d

View File

@ -1,17 +0,0 @@
.sw?
.*.sw?
*.beam
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
/rabbitmq_auth_mechanism_ssl.d

View File

@ -1,29 +1,6 @@
.rebar3
_*
.eunit
*.o
*.beam
*.plt
*.swp
*.swo
.erlang.cookie
ebin
log
erl_crash.dump
.rebar
logs
_build
.idea
cobertura.xml
rebar.lock
.erlang.mk
deps
rabbitmq_aws.d
test/*xml
cover
/escript/
/escript.lock
/plugins/
/plugins.lock
/sbin/
/sbin.lock

View File

@ -1,13 +1 @@
/_build
/cover
/deps
/escript
/log
/.erlang.mk/
/ebin
/sbin
erl_crash.dump
mix.lock
*.ez
.sw?
.*.sw?
/deps/

View File

@ -1,11 +1,5 @@
*~
.sw?
.*.sw?
*.beam
*.pyc
erl_crash.dump
/build/
/cover/
/dist/
/ebin/
/tmp/

View File

@ -1,18 +1 @@
.sw?
.*.sw?
*.beam
/.erlang.mk/
/cover/
/debug/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
rabbitmq_consistent_hash_exchange.d

View File

@ -1,22 +0,0 @@
*~
.sw?
.*.sw?
*.beam
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
/rabbitmq_ct_client_helpers.d
/.rabbitmq_ct_client_helpers.plt
/.bazelrc
/bazel-*

View File

@ -1,26 +1,4 @@
*~
.sw?
.*.sw?
*.beam
.terraform/
.terraform-*
terraform.tfstate*
*terraform.lock*
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
/rabbitmq_ct_helpers.d
/.rabbitmq_ct_helpers.plt
/.bazelrc
/bazel-*

View File

@ -1,19 +1 @@
.sw?
.*.sw?
*.beam
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
test/config_schema_SUITE_data/schema/rabbit.schema
rabbitmq_event_exchange.d

View File

@ -1,17 +0,0 @@
.sw?
.*.sw?
*.beam
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
rabbitmq_federation.d

View File

@ -1,17 +0,0 @@
.sw?
.*.sw?
*.beam
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
/rabbitmq_federation_management.d

View File

@ -1,17 +0,0 @@
.sw?
.*.sw?
*.beam
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
rabbitmq_jms_topic_exchange.d

View File

@ -1,30 +1,6 @@
../../../.gitignore
.sw?
.*.sw?
*.beam
erl_crash.dump
MnesiaCore.*
/.erlang.mk/
/cover/
/debug/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
rabbitmq_management.d
.rabbitmq_management.plt
*.coverdata
test/config_schema_SUITE_data/schema/
.vscode/*
selenium/node_modules
selenium/package-lock.json

View File

@ -1,18 +0,0 @@
.sw?
.*.sw?
*.beam
*.plt
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
rabbitmq_management_agent.d

View File

@ -1,26 +1,4 @@
.sw?
.*.sw?
*.beam
*.coverdata
.idea/*
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/log/
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
/test/ct.cover.spec
debug/*
*.plt
test/config_schema_SUITE_data/schema/
test/.idea/*
rabbitmq_mqtt.d

View File

@ -1,24 +1 @@
*~
.sw?
.*.sw?
*.beam
*.coverdata
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/git-revisions.txt
/logs/
/plugins/
/plugins.lock
/rebar.config
/rebar.lock
/sbin/
/sbin.lock
/test/config_schema_SUITE_data/schema/
/test/ct.cover.spec
/rabbitmq_peer_discovery_aws.d

View File

@ -1,24 +1 @@
*~
.sw?
.*.sw?
*.beam
*.coverdata
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/git-revisions.txt
/logs/
/plugins/
/plugins.lock
/rebar.config
/rebar.lock
/sbin/
/sbin.lock
/test/config_schema_SUITE_data/schema/
/test/ct.cover.spec
/rabbitmq_peer_discovery_common.d

View File

@ -1,24 +1 @@
*~
.sw?
.*.sw?
*.beam
*.coverdata
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/git-revisions.txt
/logs/
/plugins/
/plugins.lock
/rebar.config
/rebar.lock
/sbin/
/sbin.lock
/test/config_schema_SUITE_data/schema/
/test/ct.cover.spec
/rabbitmq_peer_discovery_consul.d

View File

@ -1,25 +1,2 @@
*~
.sw?
.*.sw?
*.beam
*.coverdata
tags
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/git-revisions.txt
/logs/
/plugins/
/plugins.lock
/rebar.config
/rebar.lock
/sbin/
/sbin.lock
/test/config_schema_SUITE_data/schema/
/test/ct.cover.spec
/rabbitmq_peer_discovery_etcd.d

View File

@ -1,24 +1 @@
*~
.sw?
.*.sw?
*.beam
*.coverdata
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/git-revisions.txt
/logs/
/plugins/
/plugins.lock
/rebar.config
/rebar.lock
/sbin/
/sbin.lock
/test/config_schema_SUITE_data/schema/
/test/ct.cover.spec
/rabbitmq_peer_discovery_k8s.d

View File

@ -1,12 +0,0 @@
*~
.sw?
.*.sw?
*.beam
*.coverdata
/ebin/
/.erlang.mk/
/logs/
/rabbitmq_prelaunch.d
# Dialyzer
*.plt

View File

@ -1,24 +1,3 @@
.sw?
.*.sw?
*.beam
*~
\#*
.#*
*.d
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
erl_crash.dump
prometheus/data
test/config_schema_SUITE_data/schema/

View File

@ -1,19 +0,0 @@
.DS_Store
erl_crash.dump
.sw?
.*.sw?
*.beam
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
/rabbitmq_random_exchange.d

View File

@ -1,19 +0,0 @@
.DS_Store
erl_crash.dump
.sw?
.*.sw?
*.beam
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
rabbitmq_recent_history_exchange.d

View File

@ -1,17 +0,0 @@
.sw?
.*.sw?
*.beam
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
/rabbitmq_sharding.d

View File

@ -1,21 +1 @@
.sw?
.*.sw?
*.beam
*.plt
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
elvis
elvis.config
/rabbitmq_shovel.d

View File

@ -1,17 +0,0 @@
.sw?
.*.sw?
*.beam
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
/rabbitmq_shovel_management.d

View File

@ -1,22 +1,3 @@
.sw?
.*.sw?
*.beam
/.erlang.mk/
/cover/
/debug/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
rabbitmq_stomp.d
# Python testsuite.
.python-version
*.pyc

View File

@ -1,57 +1,11 @@
.eunit
*.o
*.beam
*.plt
erl_crash.dump
.concrete/DEV_MODE
# rebar 2.x
.rebar
rel/example_project
ebin/*.beam
deps
# rebar 3
.rebar3
_build/
_checkouts/
erl_crash.dump
.sw?
.*.sw?
*.beam
/.erlang.mk/
/cover/
/deps/
/ebin/
/escript/
/logs/
/plugins/
/sbin/
elvis
callgrind*
ct.coverdata
test/ct.cover.spec
_build
rabbitmq_stream.d
*.plt
*.d
*.jar
*~
.sw?
.*.sw?
*.beam
*.class
*.dat
*.dump
*.iml
*.ipr
*.iws
.DS_Store
\#~
/.idea/
/deps/

View File

@ -1,55 +1,11 @@
.eunit
*.o
*.beam
*.plt
erl_crash.dump
.concrete/DEV_MODE
# rebar 2.x
.rebar
rel/example_project
ebin/*.beam
deps
# rebar 3
.rebar3
_build/
_checkouts/
erl_crash.dump
.sw?
.*.sw?
*.beam
/.erlang.mk/
/cover/
/deps/
/ebin/
/logs/
/plugins/
elvis
callgrind*
ct.coverdata
test/ct.cover.spec
_build
rabbitmq_stream_common.d
*.plt
*.d
*.jar
*~
.sw?
.*.sw?
*.beam
*.class
*.dat
*.dump
*.iml
*.ipr
*.iws
.DS_Store
\#~
/.idea/
/deps/

View File

@ -1,59 +1,11 @@
.eunit
*.o
*.beam
*.plt
erl_crash.dump
.concrete/DEV_MODE
# rebar 2.x
.rebar
rel/example_project
ebin/*.beam
deps
# rebar 3
.rebar3
_build/
_checkouts/
erl_crash.dump
.sw?
.*.sw?
*.beam
/.erlang.mk/
/cover/
/deps/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
elvis
callgrind*
ct.coverdata
test/ct.cover.spec
_build
rabbitmq_stream.d
*.plt
*.d
*.jar
*~
.sw?
.*.sw?
*.beam
*.class
*.dat
*.dump
*.iml
*.ipr
*.iws
.DS_Store
\#~
/.idea/

View File

@ -1,17 +0,0 @@
.sw?
.*.sw?
*.beam
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
rabbitmq_top.d

View File

@ -1,17 +0,0 @@
.sw?
.*.sw?
*.beam
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
rabbitmq_tracing.d

View File

@ -1,21 +1,3 @@
.sw?
*.orig
.*.sw?
*.beam
/.erlang.mk/
/cover/
/debug/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
rabbitmq_trust_store.d
test/config_schema_SUITE_data/schema/

View File

@ -1,17 +0,0 @@
.sw?
.*.sw?
*.beam
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
rabbitmq_web_dispatch.d

View File

@ -1,17 +1 @@
*.swp
/.erlang.mk/
/cover/
/deps/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
/test/*.beam
/rabbitmq_web_mqtt.d
test/config_schema_SUITE_data/schema/

View File

@ -1,17 +0,0 @@
.sw?
.*.sw?
*.beam
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
/rabbitmq_web_mqtt_examples.d

View File

@ -1,19 +1 @@
.sw?
.*.sw?
*.beam
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
rabbitmq_web_stomp.d
test/config_schema_SUITE_data/schema/

View File

@ -1,17 +0,0 @@
.sw?
.*.sw?
*.beam
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/escript.lock
/logs/
/plugins/
/plugins.lock
/sbin/
/sbin.lock
/rabbitmq_web_stomp_examples.d

View File

@ -1,21 +0,0 @@
*~
.sw?
.*.sw?
*.beam
*.coverdata
/.erlang.mk/
/cover/
/deps/
/doc/
/ebin/
/escript/
/git-revisions.txt
/logs/
/plugins/
/rebar.config
/rebar.lock
/_rel/
/sbin/
/test/ct.cover.spec
/trust_store_http.d

56
erlang.mk vendored
View File

@ -17,7 +17,7 @@
ERLANG_MK_FILENAME := $(realpath $(lastword $(MAKEFILE_LIST)))
export ERLANG_MK_FILENAME
ERLANG_MK_VERSION = 3967614
ERLANG_MK_VERSION = 2022.05.31-72-gb8a27ab-dirty
ERLANG_MK_WITHOUT =
# Make 3.81 and 3.82 are deprecated.
@ -4442,6 +4442,49 @@ ERLANG_MK_QUERY_REL_DEPS_FILE = $(ERLANG_MK_TMP)/query-rel-deps.log
ERLANG_MK_QUERY_TEST_DEPS_FILE = $(ERLANG_MK_TMP)/query-test-deps.log
ERLANG_MK_QUERY_SHELL_DEPS_FILE = $(ERLANG_MK_TMP)/query-shell-deps.log
# Copyright (c) 2024, Loïc Hoguin <essen@ninenines.eu>
# This file is part of erlang.mk and subject to the terms of the ISC License.
.PHONY: beam-cache-restore-app beam-cache-restore-test clean-beam-cache distclean-beam-cache
BEAM_CACHE_DIR ?= $(ERLANG_MK_TMP)/beam-cache
PROJECT_BEAM_CACHE_DIR = $(BEAM_CACHE_DIR)/$(PROJECT)
clean:: clean-beam-cache
clean-beam-cache:
$(verbose) rm -rf $(PROJECT_BEAM_CACHE_DIR)
distclean:: distclean-beam-cache
$(PROJECT_BEAM_CACHE_DIR):
$(verbose) mkdir -p $(PROJECT_BEAM_CACHE_DIR)
distclean-beam-cache:
$(gen_verbose) rm -rf $(BEAM_CACHE_DIR)
beam-cache-restore-app: | $(PROJECT_BEAM_CACHE_DIR)
$(verbose) rm -rf $(PROJECT_BEAM_CACHE_DIR)/ebin-test
ifneq ($(wildcard ebin/),)
$(verbose) mv ebin/ $(PROJECT_BEAM_CACHE_DIR)/ebin-test
endif
ifneq ($(wildcard $(PROJECT_BEAM_CACHE_DIR)/ebin-app),)
$(gen_verbose) mv $(PROJECT_BEAM_CACHE_DIR)/ebin-app ebin/
else
$(verbose) $(MAKE) --no-print-directory clean-app
endif
beam-cache-restore-test: | $(PROJECT_BEAM_CACHE_DIR)
$(verbose) rm -rf $(PROJECT_BEAM_CACHE_DIR)/ebin-app
ifneq ($(wildcard ebin/),)
$(verbose) mv ebin/ $(PROJECT_BEAM_CACHE_DIR)/ebin-app
endif
ifneq ($(wildcard $(PROJECT_BEAM_CACHE_DIR)/ebin-test),)
$(gen_verbose) mv $(PROJECT_BEAM_CACHE_DIR)/ebin-test ebin/
else
$(verbose) $(MAKE) --no-print-directory clean-app
endif
# Copyright (c) 2013-2016, Loïc Hoguin <essen@ninenines.eu>
# This file is part of erlang.mk and subject to the terms of the ISC License.
@ -4497,7 +4540,7 @@ ifneq ($(wildcard src/),)
# Targets.
app:: $(if $(wildcard ebin/test),clean) deps
app:: $(if $(wildcard ebin/test),beam-cache-restore-app) deps
$(verbose) $(MAKE) --no-print-directory $(PROJECT).d
$(verbose) $(MAKE) --no-print-directory app-build
@ -4884,14 +4927,17 @@ define compile_test_erl
endef
ERL_TEST_FILES = $(call core_find,$(TEST_DIR)/,*.erl)
$(ERLANG_MK_TMP)/$(PROJECT).last-testdir-build: $(ERL_TEST_FILES) $(MAKEFILE_LIST)
$(eval FILES_TO_COMPILE := $(if $(filter $(MAKEFILE_LIST),$?),$(filter $(ERL_TEST_FILES),$^),$?))
# When we have to recompile files in src/ the .d file always gets rebuilt.
# Therefore we want to ignore it when rebuilding test files.
$(eval FILES_TO_COMPILE := $(if $(filter $(filter-out $(PROJECT).d,$(MAKEFILE_LIST)),$?),$(filter $(ERL_TEST_FILES),$^),$(filter $(ERL_TEST_FILES),$?)))
$(if $(strip $(FILES_TO_COMPILE)),$(call compile_test_erl,$(FILES_TO_COMPILE)) && touch $@)
endif
test-build:: IS_TEST=1
test-build:: ERLC_OPTS=$(TEST_ERLC_OPTS)
test-build:: $(if $(wildcard src),$(if $(wildcard ebin/test),,clean)) $(if $(IS_APP),,deps test-deps)
test-build:: $(if $(wildcard src),$(if $(wildcard ebin/test),,beam-cache-restore-test)) $(if $(IS_APP),,deps test-deps)
# We already compiled everything when IS_APP=1.
ifndef IS_APP
ifneq ($(wildcard src),)
@ -5495,7 +5541,7 @@ endif
$(verbose) mkdir config/
$(verbose) $(call core_render,bs_sys_config,config/sys.config)
$(verbose) $(call core_render,bs_vm_args,config/vm.args)
$(verbose) awk '/^include erlang.mk/ && !ins {print "BUILD_DEPS += relx";ins=1};{print}' Makefile > Makefile.bak
$(verbose) awk '/^include erlang.mk/ && !ins {print "REL_DEPS += relx";ins=1};{print}' Makefile > Makefile.bak
$(verbose) mv Makefile.bak Makefile
new-app:

View File

@ -1,48 +0,0 @@
SCRATCH := $(CURDIR)/topic-branch-scratch
GIT_FILTER_REPO := $(CURDIR)/bin/git-filter-repo
$(GIT_FILTER_REPO):
mkdir -p $(TMPDIR) \
&& cd $(TMPDIR) \
&& curl -LO https://github.com/newren/git-filter-repo/releases/download/v2.28.0/git-filter-repo-2.28.0.tar.xz \
&& tar -xJf git-filter-repo-*.tar.xz \
&& mkdir -p $(CURDIR)/bin \
&& cp git-filter-repo-*/git-filter-repo $(GIT_FILTER_REPO) \
&& chmod +x $(GIT_FILTER_REPO)
.PHONY: clean-state
clean-state:
@git diff-index --quiet HEAD -- \
|| (echo "Cannot proceed with uncommitted changes"; exit 1)
PARENT_BRANCH ?= $(shell git rev-parse --abbrev-ref HEAD)
define fetch_topic_branch
echo "Collecting commits from $(1)/$(2)..." \
&& git clone --quiet git@github.com:rabbitmq/$(call rmq_cmp_repo_name,$(1)).git $(SCRATCH)/$(2)/repo-$(1) \
&& cd $(SCRATCH)/$(2)/repo-$(1) \
&& $(GIT_FILTER_REPO) --quiet --to-subdirectory-filter deps/$(1) \
&& git checkout $(2) \
&& git format-patch $(PARENT_BRANCH) \
&& mkdir -p $(SCRATCH)/$(2)/$(1) \
&& cp *.patch $(SCRATCH)/$(2)/$(1) \
|| printf "Topic branch $(2) does not appear to exist in $(1).\n\n";
endef
define rebase_topic_branch
git am --reject $(sort $(wildcard $(1)/*.patch));
endef
fetch-topic-branch-%: $(GIT_FILTER_REPO)
$(eval TOPIC_BRANCH := $(subst fetch-topic-branch-,,$@))
mkdir -p $(SCRATCH)/$(TOPIC_BRANCH)
@$(foreach dep,$(VENDORED_COMPONENTS),$(call fetch_topic_branch,$(dep),$(TOPIC_BRANCH)))
rm -rf $(SCRATCH)/$(TOPIC_BRANCH)/repo-*
topic-branch-%: $(GIT_FILTER_REPO) clean-state
$(eval TOPIC_BRANCH := $(subst topic-branch-,,$@))
ls $(SCRATCH)/$(TOPIC_BRANCH) \
|| (echo "Fetch the branch first with 'make fetch-$@')"; exit 1)
git checkout -b $(TOPIC_BRANCH)
@$(foreach dir,$(wildcard $(SCRATCH)/$(TOPIC_BRANCH)/*),$(call rebase_topic_branch,$(dir)))

View File

@ -355,9 +355,14 @@ prepare-dist::
# If the top-level project is a RabbitMQ component, we override
# $(DEPS_DIR) for this project to point to the top-level's one.
#
# We do the same for $(ERLANG_MK_TMP) as we want to keep the
# beam cache regardless of where we build. We also want to
# share Hex tarballs.
ifneq ($(PROJECT),rabbitmq_server_release)
DEPS_DIR ?= $(abspath ..)
ERLANG_MK_TMP ?= $(abspath ../../.erlang.mk)
DISABLE_DISTCLEAN = 1
endif