OK, here is my Makefile.am, which at this point works. But it does not include the data dependency:
@SET_MAKE@ ACLOCAL_AMFLAGS = -I share/misc/m4 SUFFIXES = .R .pdf noinst_PLOTS = R_Double_new.pdf sample_distris.pdf noinst_DATA = R_Double_new.histo noinst_R = R_Double_new.R sample_distris.R noinst_SCRIPTS= if !CRB_NO_RSCRIPTS noinst_SCRIPTS += R_Double_new sample_distris endif CLEANFILES = $(noinst_SCRIPTS) $(noinst_PLOTS) EXTRA_DIST = $(noinst_PLOTS) $(noinst_DATA) $(noinst_R) do_subst = sed \ -e 's,[@]RSCRIPT[@],$(CRB_RSCRIPT),g' \ -e 's,[@]configure_input[@],Generated from $@.R; do not edit by hand.,g' .R: rm -f $@ .$@.tmp $(do_subst) $(srcdir)/$@.R >.$@.tmp chmod +x .$@.tmp chmod a-w .$@.tmp mv -f .$@.tmp $@ .R.pdf: ./$* all-local: $(noinst_PLOTS) greetings & thanks for looking at my stuff, Stefan Am 06.11.2011 um 10:14 schrieb Stefano Lattarini: > On Saturday 05 November 2011, Stefan wrote: >> Hi automake list! >> >> I'm trying to write a Makefile(.am) to make pdf plots from R scripts. >> Hence the plot is depending on the script and the data. What I tried >> is: >> >> SUFFIXES = .R .data .pdf >> >> .R >> make R script executable >> > [Nit: does this rule really work?] > >> .R.pdf: >> Do stuff >> >> .data.pdf: >> Do the same stuff as for .R >> >> in the Makefile.am (plus a bit of other settings). >> >> For changes in the R-script, the pdfs are updated, but not if I >> change something in the data. >> > Weird... can you show a complete, working example? (i.e., post a > reduced but working Makefile.am, and the exact commands you use > to update a *.R and/or *.data file and to rebuild the associated > *.pdf file). Also, telling us which make version you are using > would be useful. > >> What am I doing wrong, here? >> >> greetings, >> >> Stefan >> > > Regards, > Stefano