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

Making Makefiles

Making Makefiles

Makefiles are pretty if you learned to appreciate their beauty.

Alex Tercete

February 21, 2020
Tweet

More Decks by Alex Tercete

Other Decks in Programming

Transcript

  1. Makefile build: docker build -t my_image . run: build docker

    run -w /app -v $(realpath .):/app my_image
  2. Makefile LS = docker run \ --rm -w /app -v

    "$(realpath .):/app" bash:5 \ ls list_all: @ $(LS) -la
  3. 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)