Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Intro to Make

Intro to Make

An introduction to Makefiles given at BarCamp GR.

Jace Browning

August 26, 2016
Tweet

More Decks by Jace Browning

Other Decks in Programming

Transcript

  1. 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
  2. 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?
  3. Arguments for Make • Ubiquitous • Stable • Self-contained •

    Established conventions ◦ make ◦ make test ◦ make clean
  4. Advantages of Standardizing • Reduced project switching overhead • Shared

    Continuous Integration configuration • Easier build debugging
  5. 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
  6. Files and Timestamps • Create missing files • Traverse dependency

    chains • Update files when dependencies are newer
  7. Variables • CONSTANT := value • LAZY = $(shell ls

    *.py) • OPTIONAL ?= value2 ◦ make <target> OPTIONAL=value3