R = $(R_HOME)/bin/R

# rules
%.R: %.Rnw
	@echo "Stangle $<";$(R) CMD Stangle $<

%.tex:%.Rnw
	@echo "Sweave $<";$(R) CMD Sweave $<

%.pdf:%.tex
	@echo "making $@";$(R) CMD texi2dvi --pdf -c $<

install:
	R CMD INSTALL --clean ../../../CSAMA10

all:
	echo "Usage: R CMD make -f devmakefile YourSlides.pdf"
