From 350a7f035e93df88a2472e953e82d05ad5753ae1 Mon Sep 17 00:00:00 2001 From: Eugeniy Mikhailov Date: Wed, 15 Jan 2014 22:36:43 -0500 Subject: gnuplot helper make file --- gnuplot_eps.mk | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 gnuplot_eps.mk (limited to 'gnuplot_eps.mk') diff --git a/gnuplot_eps.mk b/gnuplot_eps.mk new file mode 100644 index 0000000..aa7730a --- /dev/null +++ b/gnuplot_eps.mk @@ -0,0 +1,38 @@ +# -*- make -*- + +CLEAN_TARGETS += clean_gnuplot_eps_targets +REAL_CLEAN_TARGETS += real_clean_gnuplot_eps_targets + +gnuplot_sources = $(wildcard *.gp) +gnuplot_eps_targets = $(gnuplot_sources:%.gp=%.eps) +gnuplot_pdf_targets = $(gnuplot_eps_targets:%.eps=$(pics_destdir)/%.pdf) + + +copy_gnuplot_pdf_targets: dest_dir_gnuplot $(gnuplot_pdf_targets) + +$(gnuplot_eps_targets): %.eps : %.gp + echo "set output '$@'" \ + | cat - \ + $(GNUPLOT_TEMPLATES_DIR)/terminal_eps_settings.gp_tmplt \ + $(GNUPLOT_TEMPLATES_DIR)/lines_specifications.gp_tmplt \ + $< \ + | gnuplot + rm -f fit.log + +$(gnuplot_pdf_targets): $(pics_destdir)/%.pdf : %.eps + epstopdf --autorotate=All --outfile=$@ $< + +clean_gnuplot_eps_targets: + rm -f fit.log +ifneq ($(strip $(gnuplot_eps_targets)),) + rm -f $(gnuplot_eps_targets) +endif + +real_clean_gnuplot_eps_targets: clean_gnuplot_eps_targets +ifneq ($(strip $(gnuplot_pdf_targets)),) + rm -f $(gnuplot_pdf_targets) +endif + +dest_dir_gnuplot: + $(INSTALL) -d -m 0755 $(pics_destdir) + -- cgit v1.2.3