Created
May 28, 2017 10:47
-
-
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
This file contains hidden or 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