Created
May 28, 2017 10:47
Star
You must be signed in to star a gist
Makefile que usa pandoc o markdown-html dependiendo de cuál esté presente
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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