How to specify required dependencies version in Makefile

58 views
Skip to first unread message

manch...@gmail.com

unread,
Aug 24, 2020, 8:13:16 AM8/24/20
to rabbitmq-users
Hi Team, 

I am building a sample plugin and inside my Makefile if I have to provide some dependencies to rabbit_common, rabbit & amqp_clent how to specify the appropriate versions of these required dependencies ? If I write below lines in my Makefile, by default it downloads from master branch. I want them to be downloaded from v3.8.x instead of master branch. 

My Makefile has below line : 

DEPS = rabbit_common rabbit amqp_clent


Regards
Parikshit

Luke Bakken

unread,
Aug 25, 2020, 12:09:32 PM8/25/20
to rabbitmq-users
Hello,

RabbitMQ uses erlang.mk for builds. Please see section 7.2.1 of this document: https://erlang.mk/guide/deps.html

Thanks,
Luke

Parikshit Manchare

unread,
Aug 28, 2020, 5:59:09 AM8/28/20
to rabbitm...@googlegroups.com
Thanks Luke. 
Above link is indeed very helpful and explains in detail about dependencies. 
But even after trying those steps, it didn't help me much. What worked for me was adding below lines of code in the Makefile. 

DEPS = rabbit_common rabbit
override dep_rabbit = git https://github.com/rabbitmq/rabbitmq-server 'v3.8.x'
override dep_rabbit_common = git https://github.com/rabbitmq/rabbitmq-common 'v3.8.x'

Using override keyword is important here i believe. I could now download dependencies from v3.8.x branch instead of master. 


Regards
Parikshit


--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rabbitmq-users/2c64c3e5-38d0-4df3-b7ba-6a147943f74an%40googlegroups.com.

Luke Bakken

unread,
Aug 28, 2020, 8:08:04 AM8/28/20
to rabbitmq-users
Hello,

I'm glad you found a solution. I have never seen the "override" keyword used in a Makefile, and we do not have to use it with RabbitMQ's build system. The order in which you declare variables matters. You may have to include erlang.mk later in your Makefile.

Thanks,
Luke

Reply all
Reply to author
Forward
0 new messages