On Sunday 06 November 2011, Stefan wrote: > OK, here is my Makefile.am, which at this point works. > But it does not include the data dependency: > Yes, but we'd like to see the one that is failing, otherwise how can we see what's wrong? :-)
> @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: > ./$* > Here I can spot a first problem though: this rule doesn't ensure that the script used to build the PDF file will be created before being executed in the recipe. Let's see a minimal example showing the issue: $ cat Makefile .SUFFIXES: .R .pdf .R: cp $< >$@ && chmod a+x .R.pdf: echo $* >$@.tmp && mv $@.tmp $@ $ touch foo.R $ make foo.pdf; echo \$? = $? ./foo >foo.pdf.tmp && mv -f foo.pdf.tmp foo.pdf /bin/sh: ./foo: No such file or directory make: *** [foo.pdf] Error 127 $? = 2 # You have to explicitly create the `foo' script first, then # things will work. $ make foo && make foo.pdf; echo \$? = $? cp foo.R foo && chmod a+x foo ./foo >foo.pdf.tmp && mv -f foo.pdf.tmp foo.pdf $? = 0 > all-local: $(noinst_PLOTS) > > greetings & thanks for looking at my stuff, > > Oh, and my Automake Version is 1.10.1. But I asked your make version :-) This is mostly a make issue, not an automake one. Regards, Stefano