diff options
Diffstat (limited to 'gnuplot_ltx_eps.mk')
-rw-r--r-- | gnuplot_ltx_eps.mk | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/gnuplot_ltx_eps.mk b/gnuplot_ltx_eps.mk new file mode 100644 index 0000000..2b3eaa0 --- /dev/null +++ b/gnuplot_ltx_eps.mk @@ -0,0 +1,54 @@ +# -*- make -*- + +CLEAN_TARGETS += clean_gnuplot_ltx_eps_targets clean_gnuplot_ltx_tex_temporary +REAL_CLEAN_TARGETS += real_clean_gnuplot_ltx_eps_targets + +gnuplot_ltx_sources = $(wildcard *.lgp) +gnuplot_ltx_sources_bases = $(gnuplot_ltx_sources:%.lgp=%) +gnuplot_ltx_eps_targets = $(gnuplot_ltx_sources:%.lgp=%.eps) +gnuplot_ltx_tex_targets = $(gnuplot_ltx_sources:%.lgp=%.tex) +gnuplot_ltx_pdf_targets = $(gnuplot_ltx_eps_targets:%.eps=$(pics_destdir)/%.pdf) + + +copy_gnuplot_ltx_pdf_targets: dest_dir_ltx_gnuplot $(gnuplot_ltx_pdf_targets) + +$(gnuplot_ltx_tex_targets): %.tex : %.lgp + echo "set output '$@'" \ + | cat - \ + $(GNUPLOT_TEMPLATES_DIR)/terminal_epslatex_settings.gp_tmplt \ + $(GNUPLOT_TEMPLATES_DIR)/lines_specifications.gp_tmplt \ + $< \ + | gnuplot + rm -f fit.log + +$(gnuplot_ltx_eps_targets): %.eps : %.tex + latex $< + dvips -o - $(basename $<).dvi \ + > $@ + +$(gnuplot_ltx_pdf_targets): $(pics_destdir)/%.pdf : %.eps + epstopdf --autorotate=All --outfile=$@ $< + +clean_gnuplot_ltx_tex_temporary: +ifneq ($(strip $(gnuplot_ltx_sources_bases)),) + rm -f $(gnuplot_ltx_sources_bases:%=%.tex) + rm -f $(gnuplot_ltx_sources_bases:%=%.dvi) + rm -f $(gnuplot_ltx_sources_bases:%=%.aux) + rm -f $(gnuplot_ltx_sources_bases:%=%.log) + rm -f $(gnuplot_ltx_sources_bases:%=%-inc.eps) +endif + +clean_gnuplot_ltx_eps_targets: + rm -f fit.log +ifneq ($(strip $(gnuplot_ltx_eps_targets)),) + rm -f $(gnuplot_ltx_eps_targets) +endif + +real_clean_gnuplot_ltx_eps_targets: clean_gnuplot_ltx_eps_targets +ifneq ($(strip $(gnuplot_ltx_pdf_targets)),) + rm -f $(gnuplot_ltx_pdf_targets) +endif + +dest_dir_ltx_gnuplot: + $(INSTALL) -d -m 0755 $(pics_destdir) + |