Skip to content

Instantly share code, notes, and snippets.

@JohannesBuchner
Last active November 22, 2022 17:14
Show Gist options
  • Save JohannesBuchner/41d8c68fb4a80d8f272c81b0a131c38e to your computer and use it in GitHub Desktop.
Save JohannesBuchner/41d8c68fb4a80d8f272c81b0a131c38e to your computer and use it in GitHub Desktop.
Starting point for new make files
# run with: $ make
# or make -j4 to run in parallel
.PHONY: all help # rules that do not correspond to a output file
.SUFFIXES: # disable built-in rules
.SECONDARY: # do not delete intermediate products
# first rule is default
all: mytarget
help:
# self-document the available rules
@grep "^[^ ]*:" Makefile | grep -v "nohelp"
%.out: %.csv
echo "stem(% wildcard) is:" $*
echo "input:" $<
echo "output:" $@
# see https://www.gnu.org/software/make/manual/html_node/Automatic-Variables.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment