Cheat sheets for various stuff
See my Makefile template: https://github.com/bertvv/dotfiles/blob/master/.vim/templates/make
.POSIX:
get reliable POSIX behaviour (first non-comment line).SUFFIXES:
ignore built-in inference rules (beginning of Makefile).PHONY:
specified targets aren’t file names, always considered “unclean” (warning: NOT POSIX, GNU Make extension)Macros are defined with NAME = VALUE
and are expanded with $(NAME)
.
$<
The target’s prerequisitesE.g. you want to convert .foo files into .bar
.SUFFIXES: .foo .bar
.foo.bar:
foo2bar $<