Slide 1

Slide 1 text

Intro to Make @JaceBrowning

Slide 2

Slide 2 text

What is Make? ● Build automation tool ○ Builds executable programs from source code ○ Update files automatically when related files change ● Initial release: 1977 ● Filename: Makefile ○ Targets ○ Components ○ Commands

Slide 3

Slide 3 text

barcamp: barcamp.c gcc -o barcamp barcamp.c $ make barcamp

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

Motivation

Slide 6

Slide 6 text

Arguments against Grunt, Gulp, etc. ● Bootstrapping problem ● Limited dependency tracking ● Project switching overhead ○ How do I install the dependencies? ○ How do I run the tests?

Slide 7

Slide 7 text

Arguments for Make ● Ubiquitous ● Stable ● Self-contained ● Established conventions ○ make ○ make test ○ make clean

Slide 8

Slide 8 text

Advantages of Standardizing ● Reduced project switching overhead ● Shared Continuous Integration configuration ● Easier build debugging

Slide 9

Slide 9 text

before_script: - git submodule update --init --recursive - ./set_token.sh - bundle install script: - bundle exec rake secure_pipeline:network_attack - bundle exec rake secure_pipeline:ssl_attack - bundle exec rake secure_pipeline:xss - bundle exec rake secure_pipeline:information_leakage - bundle exec rake secure_pipeline:sql_injection before_script: - make script: - make ci

Slide 10

Slide 10 text

Features

Slide 11

Slide 11 text

Files and Timestamps ● Create missing files ● Traverse dependency chains ● Update files when dependencies are newer

Slide 12

Slide 12 text

Variables ● CONSTANT := value ● LAZY = $(shell ls *.py) ● OPTIONAL ?= value2 ○ make OPTIONAL=value3

Slide 13

Slide 13 text

Automatic Variables ● $@ ● $< ● $^ https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html

Slide 14

Slide 14 text

Demo

Slide 15

Slide 15 text

Thanks! @JaceBrowning