You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

91 lines
2.5 KiB

9 years ago
source := src
output := out
sources := $(wildcard $(source)/*_es.md)
9 years ago
lang := es-ES
target := documento
# pdf control, other fonts could be:
# 'Liberation Sans', 'Liberation Mono'
# 'Source Sans Pro', 'Source Code Pro'
9 years ago
# 'Arial'
mainfont := 'Ubuntu'
monofont := 'Ubuntu Mono'
9 years ago
pdf_opt := --smart --standalone --variable geometry:a4paper --variable lang=$(lang) \
--number-sections --toc --from=markdown --to latex --latex-engine=xelatex \
--variable colorlinks \
9 years ago
--variable mainfont=$(mainfont) \
--variable monofont=$(monofont) \
--variable fontsize='12pt' \
## Recipes for targets
# These targets are not files
.PHONY: clean pdf latex mediawiki epub github
# all -- This target try to build every thing
all: pdf latex mediawiki epub github docx
9 years ago
# reset -- This target deletes every target and then tries to build everithing
reset: clean all
# pdf -- buid pdf into output directory
9 years ago
pdf: $(output)/$(target).pdf $(sources)
$(output)/$(target).pdf: $(sources)
pandoc $(pdf_opt) \
--output=$(output)/$(target).pdf \
$(sources)
# latex -- buid latex file into output directory
9 years ago
latex: $(output)/$(target).tex $(sources)
$(output)/$(target).tex: $(sources)
pandoc $(pdf_opt) \
--output=$(output)/$(target).tex \
$(sources)
# mediawiki -- buid mediawiki file into output directory
9 years ago
mediawiki: $(output)/$(target).mw $(sources)
$(output)/$(target).mw: $(sources)
pandoc --from markdown --to mediawiki \
--output=$(output)/$(target).mw \
$(sources)
#epub -- buid epub file into output directory
9 years ago
epub: $(output)/$(target).epub $(sources)
$(output)/$(target).epub: $(sources)
pandoc --from markdown --to epub \
--output=$(output)/$(target).epub \
$(sources)
#odt -- buid odt file into output directory
9 years ago
odt: $(output)/$(target).odt $(sources)
$(output)/$(target).odt: $(sources)
pandoc --from markdown --to odt \
--output=$(output)/$(target).odt \
$(sources)
#docx -- buid docx file into output directory
docx: $(output)/$(target).docx $(sources)
$(output)/$(target).docx: $(sources)
pandoc --from markdown --to docx \
--output=$(output)/$(target).docx \
$(sources)
# github -- buid github README.md file into repo root directory
9 years ago
github: README.md $(sources)
README.md: $(sources)
pandoc --from markdown --to markdown_github \
--output=README.md \
$(sources)
clean:
rm -f $(output)/*.pdf
rm -f $(output)/*.tex
rm -f $(output)/*.mw
rm -f $(output)/*.odt
rm -f $(output)/*.epub
rm -f $(output)/*.docx
rm -r README.md