X-Git-Url: https://git.llucax.com/personal/resume.git/blobdiff_plain/238b8f4ce28047b73ee04eab91779a1cf2916c98..refs/heads/master:/Build.mak diff --git a/Build.mak b/Build.mak index 843f950..c380506 100644 --- a/Build.mak +++ b/Build.mak @@ -1,24 +1,35 @@ RST2PDF := rst2pdf -RSTFLAGS := --compressed --smart-quotes=1 +RST2PDFFLAGS := --compressed --smart-quotes=1 -# Transform reST documents -$(VD)/%.pdf: $T/%.rst $G/rst-flags - $(call exec,$(RST2PDF) $(RSTFLAGS) -o $@ $<) +RST2HTML := rst2html +RST2HTMLFLAGS := --section-subtitles -.PHONY: en -$(VD)/resume-en.pdf: RSTFLAGS += -l en_US -en: $(VD)/resume-en.pdf -all += en +# Transform reST documents to PDF +$(VD)/%.pdf: $T/%.rst $G/rst2pdf-flags + $(call exec,$(RST2PDF) $(RST2PDFFLAGS) -o $@ $<) -.PHONY: es -$(VD)/resume-es.pdf: RSTFLAGS += -l es_AR -es: $(VD)/resume-es.pdf -all += es +# Transform reST documents to HTML +$(VD)/%.html: $T/%.rst $G/rst2html-flags + $(call exec,$(RST2HTML) $(RST2HTMLFLAGS) $< $@) + +# The real targets +$(VD)/resume.pdf: RST2PDFFLAGS += -l en_US +$(VD)/resume.html: RST2HTMLFLAGS += -l en + +.PHONY: pdf +pdf: $(VD)/resume.pdf + +.PHONY: html +html: $(VD)/resume.html + +all += pdf # Create files containing the current flags to trigger a rebuild if they change -setup_flag_files__ := $(call gen_rebuild_flags,$G/rst-flags, \ - $(RSTFLAGS) $(RST2PDF),rst2pdf) +setup_flag_files__ := $(call gen_rebuild_flags,$G/rst2pdf-flags,\ + $(RST2PDFFLAGS) $(RST2PDF),rst2pdf) +setup_flag_files__ := $(setup_flag_files__)$(call gen_rebuild_flags,\ + $G/rst2html-flags,$(RST2HTMLFLAGS) $(RST2HTML),rst2html) # Print any generated message (if verbose) $(if $V,$(if $(setup_flag_files__), \ $(info !! Flags or commands changed:$(setup_flag_files__) re-building \