# Use Makefiles in hanami gems

**URL:** <https://discourse.hanakai.org/t/use-makefiles-in-hanami-gems/1346>\
**Category:** proposals\
**Created:** [November 7, 2025, 12:41pm UTC](https://discourse.hanakai.org/t/use-makefiles-in-hanami-gems/1346 "2025-11-07T12:41:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![inouire](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.hanakai.org/inouire/32/816_2.png) [@inouire](https://discourse.hanakai.org/u/inouire)\
**Post date:** [November 7, 2025, 12:41pm UTC](https://discourse.hanakai.org/t/use-makefiles-in-hanami-gems/1346/1 "2025-11-07T12:41:27Z")

</div>

Hi everyone. I was wondering if any of you ever has experienced the use the “make” utiliity for project tasks?

It’s a simple technique that I’ve learnt in my previous job 10 years ago, that I’m still using today with my team. I’m loving it so much that I cannot resist to share it with you all.

The idea is to wrap main project commands (related to build, test, setup…) in a Makefile with (phony) targets. It has several advantages:

- leveraging muscle memory to speed up repetitive actions around project contributions
- documenting the “entry points” for contributors without writing to much bash scripts
- reducing cognitive load between projects, because most of the tasks often have the same name

Here how it can look like in real life:

```Makefile
# Makefile
.PHONY: install update ci test
	
# Install gems & deps
install:
	bundle install
	npm install

# Update gems & dependencies
update: install
	bundle update
	npm update

# Launch CI checks
ci:
	./script/ci

# Launch automated tests only
test:
	bundle exec rake

```

You can then use any of the previously described tasks like that:

```bash
make install
make update
make test
make ci

```

It’s so simple that even on projects on which I contribute, I create this file without commiting it, to help me go faster.

Is it just a personnal taste, or do you think it would benefit to others?  
Let me know!

Cheers, Edouard

---

<div class="post-metadata">

**Author:** ![katafrakt](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.hanakai.org/katafrakt/32/735_2.png) [@katafrakt](https://discourse.hanakai.org/u/katafrakt)\
**Post date:** [November 7, 2025, 5:39pm UTC](https://discourse.hanakai.org/t/use-makefiles-in-hanami-gems/1346/2 "2025-11-07T17:39:54Z")

</div>

You are certainly not alone. The biggest Ruby project using Makefiles I know is [RailsEventStore](https://github.com/RailsEventStore/rails_event_store/blob/master/rails_event_store/Makefile). I’m personally not a fan of the syntax, but the idea alone is fine IMO. I would, however, probably opt for [Just](https://github.com/casey/just) myself.

---

<div class="post-metadata">

**Author:** ![davidcelis](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.hanakai.org/davidcelis/32/966_2.png) [@davidcelis](https://discourse.hanakai.org/u/davidcelis)\
**Post date:** [November 7, 2025, 5:45pm UTC](https://discourse.hanakai.org/t/use-makefiles-in-hanami-gems/1346/3 "2025-11-07T17:45:11Z")

</div>

Yeah you’re very likely not alone, but personally I wouldn’t be sure about including Makefiles as a default. Ruby’s default tends to be to use `rake`, not `make`, and Hanami does already generate a Rakefile for applications!

---

<div class="post-metadata">

**Author:** ![inouire](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.hanakai.org/inouire/32/816_2.png) [@inouire](https://discourse.hanakai.org/u/inouire)\
**Post date:** [November 8, 2025, 8:32am UTC](https://discourse.hanakai.org/t/use-makefiles-in-hanami-gems/1346/4 "2025-11-08T08:32:22Z")

</div>

Thank you for the feedback. “Just” indeed looks awesome, more modern than Make, but with the same idea of productivity in mind.  
I’d love to help deploying it across hanami gems

---

<div class="post-metadata">

**Author:** ![inouire](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.hanakai.org/inouire/32/816_2.png) [@inouire](https://discourse.hanakai.org/u/inouire)\
**Post date:** [November 8, 2025, 8:35am UTC](https://discourse.hanakai.org/t/use-makefiles-in-hanami-gems/1346/5 "2025-11-08T08:35:08Z")

</div>

Thank you for the feedback. As a heavy user of Rakefile for my project tasks, I still think that they do not serve the same purpose as Makefile (or equivalent). Rake is for the “inside” of the project, the ruby part, whereas Makefile is for the outside, the gluing of tools together, that are not necessarily in ruby.

“Just”, proposed by @katafrakt , seems like a great approach, and does things really differently than rake tasks.

---

<div class="post-metadata">

**Author:** ![inouire](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.hanakai.org/inouire/32/816_2.png) [@inouire](https://discourse.hanakai.org/u/inouire)\
**Post date:** [November 8, 2025, 8:39am UTC](https://discourse.hanakai.org/t/use-makefiles-in-hanami-gems/1346/6 "2025-11-08T08:39:17Z")

</div>

One advantage of Make compared to Just, however, is how widespread it is in operating systems & distros. There’s nowhere that you don’t have (or can’t easily get) `make` installed.
