Skip to content

Instantly share code, notes, and snippets.

@achalddave
Created August 6, 2013 17:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save achalddave/6166728 to your computer and use it in GitHub Desktop.
Save achalddave/6166728 to your computer and use it in GitHub Desktop.
Makefile for generating html files to an output folder from markdown files
SRCS=$(filter-out readme.md, $(wildcard *.md))
FILES=$(patsubst %.md, output/%.html,$(SRCS))
all : output $(FILES)
output :
mkdir -p output
output/%.html : %.md
pandoc --section-divs -c ../docs.css -s --smart -t html5 $< -o $@
rebuild : clean output $(FILES)
clean :
rm -rf output/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment