Section 1.4 of Writing R Extensions is very clear about what not to do with
makefiles in the vignettes or inst/doc directory.  It provides a BAD
EXAMPLE.
But it doesn't say (to me) what does work.  So what does?

As I read the text, it seems that just removing the clean prerequisite from
the all target in the BAD EXAMPLE would give something that works.  I am
referring to the language "Finally, if there is a Makefile and it has
a ‘clean:’ target, make clean is run."  This doesn't seem to happen when
R CMD build is done, and consequently there are *.aux, *.log, and *.dvi
files in the package build that R CMD check --as-cran then complains about.

The only thing I can figure out that works is remove the makefile.  That
does work, but makes it difficult to make the vignettes.

Is my only option to remove the Makefile?  If so, why discuss makefiles
under vignettes at all?


-- 
Charles Geyer
Professor, School of Statistics
University of Minnesota
charlie@stat.umn.edu

	[[alternative HTML version deleted]]

