Skip to content

Instantly share code, notes, and snippets.

@AdamBrouwersHarries
Created January 6, 2014 18:18
Show Gist options
  • Save AdamBrouwersHarries/8287044 to your computer and use it in GitHub Desktop.
Save AdamBrouwersHarries/8287044 to your computer and use it in GitHub Desktop.
An example makefile using wildcards and pattern substitution to compile a load of files of the same type
CPP_FILES = $(wildcard *.markdown)
OBJ_FILES = $(patsubst %.markdown,%.pdf,$(CPP_FILES))
%.pdf: %.markdown
pandoc -V geometry:margin=1in -S -o $@ $(patsubst %.pdf,%.markdown,$@)
all: $(OBJ_FILES)
clean:
rm -f *.pdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment