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
83
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
69
Parallelism and Symmetry
alextercete
0
240
Porting to .NET Standard
alextercete
0
70
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
560
How to be a good pair [programmer]
alextercete
0
130
Other Decks in Programming
See All in Programming
AI Coding Agentのセキュリティリスク:PRの自己承認とメルカリの対策
s3h
0
240
スケールする組織の実現に向けた インナーソース育成術 - ISGT2025
teamlab
PRO
2
170
機能追加とリーダー業務の類似性
rinchoku
2
1.3k
Putting The Genie in the Bottle - A Crash Course on running LLMs on Android
iurysza
0
140
Performance for Conversion! 分散トレーシングでボトルネックを 特定せよ
inetand
0
3.4k
パッケージ設計の黒魔術/Kyoto.go#63
lufia
3
440
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
420
AIでLINEスタンプを作ってみた
eycjur
1
230
Navigating Dependency Injection with Metro
zacsweers
3
3.5k
How Android Uses Data Structures Behind The Scenes
l2hyunwoo
0
480
デザイナーが Androidエンジニアに 挑戦してみた
874wokiite
0
550
Ruby×iOSアプリ開発 ~共に歩んだエコシステムの物語~
temoki
0
350
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
15k
Mobile First: as difficult as doing things right
swwweet
224
9.9k
Designing for humans not robots
tammielis
253
25k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4k
Imperfection Machines: The Place of Print at Facebook
scottboms
268
13k
KATA
mclloyd
32
14k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.5k
Side Projects
sachag
455
43k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.9k
Rails Girls Zürich Keynote
gr2m
95
14k
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!