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
57
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
50
Parallelism and Symmetry
alextercete
0
170
Porting to .NET Standard
alextercete
0
53
Prepping Commits
alextercete
1
120
The end of your line-endings nightmare
alextercete
0
160
I love sushi, therefore I love rebase
alextercete
0
99
ReadyRoll for DotNet developers
alextercete
0
84
Coding Dojo: The Randori Kata
alextercete
1
400
How to be a good pair [programmer]
alextercete
0
110
Other Decks in Programming
See All in Programming
Hanami and htmx
bkuhlmann
0
210
Compose-View Interop in Practice (mDevCamp 2024)
stewemetal
0
140
Tailwind CSSを本気でカスタマイズする方法
fsubal
14
5.3k
コーンフレークから始める モデリング会話入門
ogurotakayuki
0
380
if constexpr文はテンプレート世界のラムダ式である
faithandbrave
3
650
Micro Frontends for Java Microservices - Devnexus 2024
mraible
PRO
0
500
Fragment Composition of GraphQL
quramy
7
1k
Ruby Pattern Matching
bkuhlmann
0
930
見た目から始める生産性向上
ikumatadokoro
8
970
TYPO3 v13 – The road to LTS: What's new and new APIs
luisasofie_xoxo
0
210
R言語の環境構築と基礎 Tokyo.R 112
bob3bob3
0
270
Code Reviews
bkuhlmann
4
890
Featured
See All Featured
Embracing the Ebb and Flow
colly
80
4.1k
Building a Scalable Design System with Sketch
lauravandoore
456
32k
KATA
mclloyd
15
12k
StorybookのUI Testing Handbookを読んだ
zakiyama
13
4.6k
The Invisible Customer
myddelton
114
12k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
352
28k
Learning to Love Humans: Emotional Interface Design
aarron
267
39k
Rebuilding a faster, lazier Slack
samanthasiow
73
8.2k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
7
1k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
241
1.2M
How GitHub Uses GitHub to Build GitHub
holman
468
290k
Principles of Awesome APIs and How to Build Them.
keavy
121
16k
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!