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
72
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
58
Parallelism and Symmetry
alextercete
0
220
Porting to .NET Standard
alextercete
0
62
Prepping Commits
alextercete
1
130
The end of your line-endings nightmare
alextercete
0
190
I love sushi, therefore I love rebase
alextercete
0
110
ReadyRoll for DotNet developers
alextercete
0
91
Coding Dojo: The Randori Kata
alextercete
1
530
How to be a good pair [programmer]
alextercete
0
130
Other Decks in Programming
See All in Programming
AIコーディングの理想と現実
tomohisa
35
36k
Fiber Scheduler vs. General-Purpose Parallel Client
hayaokimura
1
270
ニーリーQAのこれまでとこれから
nealle
2
110
State of Namespace
tagomoris
5
2.3k
オープンソースコントリビュート入門
_katsuma
0
110
Optimizing JRuby 10
headius
0
520
エンジニア向けCursor勉強会 @ SmartHR
yukisnow1823
3
11k
Bedrock×MCPで社内ブログ執筆文化を育てたい!
har1101
6
1.3k
大LLM時代にこの先生きのこるには-ITエンジニア編
fumiyakume
7
3.3k
fieldalignmentから見るGoの構造体
kuro_kurorrr
0
130
Road to RubyKaigi: Making Tinny Chiptunes with Ruby
makicamel
4
530
The Implementations of Advanced LR Parser Algorithm
junk0612
1
1.2k
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
40
7.2k
Designing for humans not robots
tammielis
253
25k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Large-scale JavaScript Application Architecture
addyosmani
512
110k
Embracing the Ebb and Flow
colly
85
4.7k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.3k
Rails Girls Zürich Keynote
gr2m
94
13k
4 Signs Your Business is Dying
shpigford
183
22k
Why Our Code Smells
bkeepers
PRO
336
57k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
The Straight Up "How To Draw Better" Workshop
denniskardys
233
140k
Designing for Performance
lara
608
69k
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!