From ripley at stats.ox.ac.uk  Sat Apr 30 07:36:17 2011
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Sat, 30 Apr 2011 06:36:17 +0100 (BST)
Subject: [Rd] R CMD build processes inst/doc/Makefile only if there are
 vignette files?
In-Reply-To: <4DBB4191.80809@fhcrc.org>
References: <BANLkTinYAyuKfHy74QKkqOBFfT3tiF8t5g@mail.gmail.com>
	<alpine.LFD.2.02.1103300946510.20705@gannet.stats.ox.ac.uk>
	<4DBB4191.80809@fhcrc.org>
Message-ID: <alpine.LFD.2.02.1104300630100.15222@gannet.stats.ox.ac.uk>

On Fri, 29 Apr 2011, Herv? Pag?s wrote:

> On 11-03-30 01:55 AM, Prof Brian Ripley wrote:
>> What R CMD build (and check) does is to call tools::buildVignettes.
>> That has been true for a while, and buildVignettes() returns if no
>> vignettes are found. The docs are out-of-date.
>> 
>> My view is that you are misusing inst/doc: it is intended *only* for
>> files which are going to be installed and hence report.tex should not
>> really be there. So you should be doing this in another source directory
>> and copying report.pdf to inst/doc. Use configure to arrange this.
>> 
>> Shortly vignettes to be built will be moved out of inst/doc.
>
> Could you please elaborate on this? I just found this in the NEWS for
> R 2.14.0:
>
>  o The preferred location for vignette sources is now the directory
>    ?vignettes? and not ?inst/doc?: R CMD build will now re-build
>    vignettes in ?vignettes? and copy the ?.Rnw? (etc) files and
>    the corresponding PDFs to ?inst/doc?.
>
> Sounds like an important move. What are the long term plans: keep
> both inst/doc/ and vignettes/ as places for vignettes to be built?
> Or drop inst/doc/ at some point?

Drop inst/doc at some point.  It doesn't make much difference to the 
codebase: all the work is done in pkgVignettes().

>
> Thanks!
> H.
>
>
>> 
>> On Tue, 29 Mar 2011, Henrik Bengtsson wrote:
>> 
>>> Hi,
>>> 
>>> in Section 'Writing package vignettes' of 'Writing R Extensions' it says:
>>> 
>>> "Whenever a Makefile is found, then R CMD build will try to run make
>>> after the Sweave runs, so PDF manuals can be created from arbitrary
>>> source formats (plain LaTeX files, ...). [...] Note that the make step
>>> is executed even if there are no files in Sweave format, [...]".
>>> 
>>> In my package, inst/doc/ file contains two files: Makefile, and
>>> report.tex. However, when running 'Rcmd build' on Windows with R
>>> v2.13.0 alpha (2011-03-27 r55091) I can only get 'make' to run
>>> (process inst/doc/Makefile) if I add a inst/doc/dummy.Rnw file,
>>> otherwise nothing happens. My Makefile contains:
>>> 
>>> all: pdf
>>> 
>>> pdf: report.tex
>>> texi2dvi --pdf report.tex
>>> 
>>> clean:
>>> rm dummy.Rnw dummy.tex
>>> rm *.aux *.log *.toc
>>> 
>>> Is it really necessary to add dummy.Rnw? Am I missing something?
>>> 
>>> /Henrik
>>> 
>>>> sessionInfo()
>>> R version 2.13.0 alpha (2011-03-27 r55091)
>>> Platform: x86_64-pc-mingw32/x64 (64-bit)
>>> 
>>> locale:
>>> [1] LC_COLLATE=English_United States.1252
>>> [2] LC_CTYPE=English_United States.1252
>>> [3] LC_MONETARY=English_United States.1252
>>> [4] LC_NUMERIC=C
>>> [5] LC_TIME=English_United States.1252
>>> 
>>> attached base packages:
>>> [1] stats graphics grDevices utils datasets methods base
>>> 
>>> loaded via a namespace (and not attached):
>>> [1] tools_2.13.0
>>> 
>>> ______________________________________________
>>> R-devel at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>> 
>> 
>
>
> -- 
> Herv? Pag?s
>
> Program in Computational Biology
> Division of Public Health Sciences
> Fred Hutchinson Cancer Research Center
> 1100 Fairview Ave. N, M2-B876
> P.O. Box 19024
> Seattle, WA 98109-1024
>
> E-mail: hpages at fhcrc.org
> Phone:  (206) 667-5791
> Fax:    (206) 667-1319
>

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


[Rd] R CMD build processes inst/doc/Makefile only if there are vignette files?
Prof Brian Ripley