RST2PDF := rst2pdf RSTFLAGS := --compressed --smart-quotes=1 # Transform reST documents $(VD)/%.pdf: $T/%.rst $G/rst-flags $(call exec,$(RST2PDF) $(RSTFLAGS) -o $@ $<) .PHONY: en $(VD)/resume-en.pdf: RSTFLAGS += -l en_US en: $(VD)/resume-en.pdf all += en .PHONY: es $(VD)/resume-es.pdf: RSTFLAGS += -l es_AR es: $(VD)/resume-es.pdf all += es # 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) # Print any generated message (if verbose) $(if $V,$(if $(setup_flag_files__), \ $(info !! Flags or commands changed:$(setup_flag_files__) re-building \ affected files...)))