Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Making Makefiles
Search
Alex Tercete
February 21, 2020
Programming
0
82
Making Makefiles
Makefiles are pretty if you learned to appreciate their beauty.
Alex Tercete
February 21, 2020
Tweet
Share
More Decks by Alex Tercete
See All by Alex Tercete
Shipping containers
alextercete
0
67
Parallelism and Symmetry
alextercete
0
230
Porting to .NET Standard
alextercete
0
68
Prepping Commits
alextercete
1
140
The end of your line-endings nightmare
alextercete
0
200
I love sushi, therefore I love rebase
alextercete
0
110
ReadyRoll for DotNet developers
alextercete
0
96
Coding Dojo: The Randori Kata
alextercete
1
550
How to be a good pair [programmer]
alextercete
0
130
Other Decks in Programming
See All in Programming
DMMを支える決済基盤の技術的負債にどう立ち向かうか / Addressing Technical Debt in Payment Infrastructure
yoshiyoshifujii
4
600
[SRE NEXT] 複雑なシステムにおけるUser Journey SLOの導入
yakenji
0
750
CIを整備してメンテナンスを生成AIに任せる
hazumirr
0
210
SwiftでMCPサーバーを作ろう!
giginet
PRO
2
190
脱Riverpod?fqueryで考える、TanStack Queryライクなアーキテクチャの可能性
ostk0069
0
560
「次に何を学べばいいか分からない」あなたへ──若手エンジニアのための学習地図
panda_program
3
640
MySQL9でベクトルカラム登場!PHP×AWSでのAI/類似検索はこう変わる
suguruooki
1
220
Streamlitで実現できるようになったこと、実現してくれたこと
ayumu_yamaguchi
2
220
MCPを使ってイベントソーシングのAIコーディングを効率化する / Streamlining Event Sourcing AI Coding with MCP
tomohisa
0
180
What's new in AppKit on macOS 26
1024jp
0
170
AI Agent 時代のソフトウェア開発を支える AWS Cloud Development Kit (CDK)
konokenj
6
980
The Niche of CDK Grant オブジェクトって何者?/the-niche-of-cdk-what-isgrant-object
hassaku63
1
700
Featured
See All Featured
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
The Straight Up "How To Draw Better" Workshop
denniskardys
235
140k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
A Modern Web Designer's Workflow
chriscoyier
695
190k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Java REST API Framework Comparison - PWX 2021
mraible
31
8.7k
Navigating Team Friction
lara
187
15k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.1k
The Pragmatic Product Professional
lauravandoore
35
6.8k
Embracing the Ebb and Flow
colly
86
4.8k
Transcript
Alex Tercete @alextercete $ make Makefile
None
None
run.sh #!/bin/sh docker build -t my_image . docker run -w
/app -v $(pwd):/app my_image
None
run.ps1 docker build -t my_image . docker run -w /app
-v $PWD:/app my_image
None
Makefile build: docker build -t my_image . run: build docker
run -w /app -v $(realpath .):/app my_image
Make is pretty
Make is pretty old
None
Make is pretty popular
None
Make is pretty scary
None
Make is pretty weird
Makefile print_variable: my_variable='blah' echo $my_variable
Makefile print_variable: my_variable='blah' echo $my_variable
Makefile print_variable: @ my_variable='blah'; \ echo $$my_variable
Make is pretty cross-platform
Makefile VALUE = default print_value: @ echo Value is $(VALUE)
Makefile list_all: @ ls -la
Makefile list_all: @ ls -la
Makefile LS = docker run \ --rm -w /app -v
"$(realpath .):/app" bash:5 \ ls list_all: @ $(LS) -la
Makefile ifeq ($(OS), Windows_NT) HOME = $(USERPROFILE) endif home: @
echo There is no place like $(HOME)
Make is pretty powerful
Makefile VALUE ?= default print_value: @ echo Value is $(VALUE)
Makefile release: require_version @ echo "Starting $(VERSION) release..." require_version: ifndef
VERSION $(error You must specify a VERSION variable) endif
Makefile REMOTE_URL = $(shell git remote get-url origin) ifeq ($(subst
git@,,$(REMOTE_URL)), $(REMOTE_URL)) REMOTE_PROTOCOL = HTTPS else REMOTE_PROTOCOL = SSH endif print_remote_protocol: @ echo $(REMOTE_PROTOCOL)
Make is pretty
$ xcode-select --install $ sudo apt install build-essential > choco
install make
None
Alex Tercete @alextercete Thanks!