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
64
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
52
Parallelism and Symmetry
alextercete
0
210
Porting to .NET Standard
alextercete
0
55
Prepping Commits
alextercete
1
130
The end of your line-endings nightmare
alextercete
0
180
I love sushi, therefore I love rebase
alextercete
0
100
ReadyRoll for DotNet developers
alextercete
0
85
Coding Dojo: The Randori Kata
alextercete
1
500
How to be a good pair [programmer]
alextercete
0
130
Other Decks in Programming
See All in Programming
Software Architecture
hschwentner
6
2.1k
JavaScriptツール群「UnJS」を5分で一気に駆け巡る!
k1tikurisu
9
1.8k
法律の脱レガシーに学ぶフロントエンド刷新
oguemon
5
740
Pythonでもちょっとリッチな見た目のアプリを設計してみる
ueponx
1
570
AIの力でお手軽Chrome拡張機能作り
taiseiue
0
170
『GO』アプリ バックエンドサーバのコスト削減
mot_techtalk
0
150
Boost Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
350
密集、ドキュメントのコロケーション with AWS Lambda
satoshi256kbyte
0
190
PHPのバージョンアップ時にも役立ったAST
matsuo_atsushi
0
120
Serverless Rust: Your Low-Risk Entry Point to Rust in Production (and the benefits are huge)
lmammino
1
110
Open source software: how to live long and go far
gaelvaroquaux
0
640
定理証明プラットフォーム lapisla.net
abap34
1
1.8k
Featured
See All Featured
Writing Fast Ruby
sferik
628
61k
Making Projects Easy
brettharned
116
6k
Gamification - CAS2011
davidbonilla
80
5.1k
Building Your Own Lightsaber
phodgson
104
6.2k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.4k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.5k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
114
50k
Bootstrapping a Software Product
garrettdimon
PRO
306
110k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Facilitating Awesome Meetings
lara
52
6.2k
Scaling GitHub
holman
459
140k
Faster Mobile Websites
deanohume
306
31k
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!