X-Git-Url: https://git.llucax.com/personal/resume.git/blobdiff_plain/238b8f4ce28047b73ee04eab91779a1cf2916c98..b58a547ae43e16c28584f1dcafc25fa3204c8c83:/Build.mak?ds=sidebyside diff --git a/Build.mak b/Build.mak index 843f950..05cf465 100644 --- a/Build.mak +++ b/Build.mak @@ -1,24 +1,43 @@ 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 + +# Transform reST documents to PDF +$(VD)/%.pdf: $T/%.rst $G/rst2pdf-flags + $(call exec,$(RST2PDF) $(RST2PDFFLAGS) -o $@ $<) + +# Transform reST documents to HTML +$(VD)/%.html: $T/%.rst $G/rst2html-flags + $(call exec,$(RST2HTML) $(RST2HTMLFLAGS) $< $@) + +# The real targets +$(VD)/resume-en.pdf: RST2PDFFLAGS += -l en_US +$(VD)/resume-en.html: RST2HTMLFLAGS += -l en +$(VD)/resume-es.pdf: RST2PDFFLAGS += -l es_AR +$(VD)/resume-es.html: RST2HTMLFLAGS += -l es .PHONY: en -$(VD)/resume-en.pdf: RSTFLAGS += -l en_US -en: $(VD)/resume-en.pdf -all += en +en: $(VD)/resume-en.pdf $(VD)/resume-en.html .PHONY: es -$(VD)/resume-es.pdf: RSTFLAGS += -l es_AR -es: $(VD)/resume-es.pdf -all += es +es: $(VD)/resume-es.pdf $(VD)/resume-es.html + +.PHONY: pdf +pdf: $(VD)/resume-en.pdf $(VD)/resume-es.pdf + +.PHONY: html +html: $(VD)/resume-en.html $(VD)/resume-es.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 \