Skip to content

Instantly share code, notes, and snippets.

@JJ
Created May 28, 2017 10:47
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save JJ/5d37f99c732ee63735a1514b001bd27c to your computer and use it in GitHub Desktop.
Makefile que usa pandoc o markdown-html dependiendo de cuál esté presente
HTML = $(patsubst %.md,%.html,$(wildcard *.md))
all: $(HTML)
$(HTML): %.html: %.md
ifneq ($(shell command -v pandoc 2> /dev/null),)
pandoc $< -o $@
else
ifneq ($(shell command -v markdown-html 2> /dev/null),)
markdown-html $< -o $@
else
echo "No encuentro ni a pandoc ni a markdown-html"
exit 1
endif
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment